Last updated: 2022-12-20

Checks: 7 0

Knit directory: cirrhosis-metabolism/

This reproducible R Markdown analysis was created with workflowr (version 1.7.0). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.


Great! Since the R Markdown file has been committed to the Git repository, you know the exact version of the code that produced these results.

Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.

The command set.seed(20221024) was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.

Great job! Recording the operating system, R version, and package versions is critical for reproducibility.

Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.

Great job! Using relative paths to the files within your workflowr project makes it easier to run your code on other machines.

Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.

The results in this page were generated with repository version d33540f. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.

Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish or wflow_git_commit). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:


Ignored files:
    Ignored:    .DS_Store
    Ignored:    .Rhistory
    Ignored:    .Rproj.user/
    Ignored:    analysis/.DS_Store
    Ignored:    data/README.html
    Ignored:    data/annotation/
    Ignored:    data/data.zip
    Ignored:    data/meta-mouse-vs-human/
    Ignored:    data/mouse-chronic-ccl4/
    Ignored:    data/output.zip
    Ignored:    figures/ADH_ALDH.pdf
    Ignored:    figures/Blood.pdf
    Ignored:    figures/CYP.pdf
    Ignored:    figures/Canalicular.pdf
    Ignored:    figures/DH.pdf
    Ignored:    figures/EPH.pdf
    Ignored:    figures/FMO.pdf
    Ignored:    figures/Figure 1.pdf
    Ignored:    figures/GST.pdf
    Ignored:    figures/MAO.pdf
    Ignored:    figures/MT.pdf
    Ignored:    figures/NAT.pdf
    Ignored:    figures/SULT.pdf
    Ignored:    figures/UGT.pdf
    Ignored:    figures/collages.pptx
    Ignored:    figures/correlation.pdf
    Ignored:    figures/enriched_go_terms.pdf
    Ignored:    figures/enriched_kegg_pathways.pdf
    Ignored:    figures/pca_plot.pdf
    Ignored:    figures/~$collages.pptx
    Ignored:    output/mouse-chronic-ccl4/
    Ignored:    output/seddik/
    Ignored:    renv/library/
    Ignored:    renv/sandbox/
    Ignored:    renv/staging/

Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.


These are the previous versions of the repository in which changes were made to the R Markdown (analysis/metabolic_genes.Rmd) and HTML (docs/metabolic_genes.html) files. If you’ve configured a remote Git repository (see ?wflow_git_remote), click on the hyperlinks in the table below to view the files as they were in that past version.

File Version Author Date Message
Rmd d33540f christianholland 2022-12-20 wflow_publish("analysis/*.Rmd")
html 6fdf2b4 christianholland 2022-12-08 Build site.
html 5b439f5 christianholland 2022-12-08 Build site.
html 0258d2a christianholland 2022-12-07 Build site.
Rmd 9ef8432 christianholland 2022-12-07 wflow_publish("analysis/*.Rmd")
html 535b720 christianholland 2022-12-01 Build site.
Rmd 4715892 christianholland 2022-11-29 wflow_publish("analysis/*.Rmd")

Introduction

This script analyzes the expression of genes involved in the metabolism of xenobiotic substances in one of our previously published mouse model that develops chronic liver disease induced by administration of CCl4 for 2, 6 and 12 months (Holland et al. 2021).

The focus is on the following gene families:

  • Phase I Metablism
    • Cytochrome p450 dependent monooxygenase (CYP)
    • Flavin dependent monooxygenases (FMO)
    • Monoamine oxidase (MAO)
    • Cyclooxgenase (COX)
    • Dihydrodioldehydrogenase (DH)
    • DT-Diaphorase (NQOR)
    • Alcohol- and Aldehyddehydrogenase (ADH/ALDH)
    • Epoxidhydrolase (EPH)
  • Phase II Metabolism
    • Glutathiontransferase (GST)
    • UDP-glucuronosyltransferase (UGT)
    • Sulfotransferase (SULT)
    • Acetyltransferase (NAT)
    • Methyltransferase (MT)
  • Carrier
    • Blood side
    • Canalicular side

Libraries and sources

These libraries and sources are used for this analysis.

# data wrangling
library(tidyverse)

# statistics
library(fgsea)
library(msigdf)
library(survcomp)

# plotting
library(cowplot)
library(lemon)
library(tidytext)
library(UpSetR)
library(plotly)
library(scales)
library(patchwork)
library(gtools)

# colors
library(AachenColorPalette)
library(RColorBrewer)

# display tables
library(DT)
library(knitr)

# development helpers
library(here)
library(devtools)

# other
library(htmltools)

# source scripts
source(here("code/plots.R"))

# source scripts from external projects
base_url <- "https://raw.githubusercontent.com/saezlab/liver-disease-atlas"
source_url(file.path(base_url, "master", "code", "utils-plots.R"))
source_url(file.path(base_url, "master", "code", "utils-utils.R"))

Definition of global variables that are used throughout this analysis.

Descriptive data analysis

PCA plots

Version Author Date
bacff3d christianholland 2022-11-29

Enrichment analysis

Version Author Date
bacff3d christianholland 2022-11-29

Metabolic genes

Annotate metabolic genes

This table displays all genes that are considered in this analysis

# extract all possible genes
genes <- readRDS(here(data_path, "count_matrix.rds")) |>
  rownames_to_column("gene") |>
  as_tibble() |>
  select(gene)

genes <- genes |>
  mutate(family = case_when(
    str_detect(gene, "^Cyp") ~ "CYP",
    str_detect(gene, "^Ugt") ~ "UGT",
    str_detect(gene, "^Fmo") ~ "FMO",
    str_detect(gene, "^Mao") ~ "MAO",
    str_detect(gene, "^Cox") ~ "COX",
    str_detect(gene, "^Adh|Aldh") ~ "ADH/ALDH",
    str_detect(gene, "^Sult") ~ "SULT",
    str_detect(gene, "^Nat") ~ "NAT",
    str_detect(gene, "^Mt") ~ "MT",
    str_detect(gene, "^Nqor") ~ "NQOR",
    str_detect(gene, "^Gst") ~ "GST",
    str_detect(gene, "^Eph") ~ "EPH",
    str_detect(gene, "^Dh") ~ "DH",
    TRUE ~ NA_character_
  )) |>
  drop_na(family) |>
  mutate(phase = case_when(
    family %in% c(
      "CYP", "FMO", "MAO", "COX", "NQOR", "ADH/ALDH", "EPH", "DH"
    ) ~ "Phase I",
    family %in% c("GST", "UGT", "SULT", "NAT", "MT") ~ "Phase II",
  )) |>
  mutate(
    family = as_factor(family),
    phase = as_factor(phase)
  ) |>
  select(phase, family, gene)

saveRDS(genes, here(output_path, "metabolic_genes.rds"))

datatable(genes)

Number of metabolic genes

Version Author Date
bacff3d christianholland 2022-11-29

Fraction of differentially expressed metabolic genes

Fraction of gene family members that are differentially expressed
phase family size n fraction
Phase I MAO 2 1 0.5000000
Phase I FMO 8 3 0.3750000
Phase II UGT 22 8 0.3636364
Phase II GST 23 8 0.3478261
Phase II NAT 18 6 0.3333333
Phase II SULT 27 9 0.3333333
Phase I CYP 126 40 0.3174603
Phase I ADH/ALDH 29 9 0.3103448
Phase I EPH 18 4 0.2222222
Phase II MT 72 7 0.0972222
Phase I DH 35 1 0.0285714

Enrichment analysis

Version Author Date
bacff3d christianholland 2022-11-29

Carrier genes

Annotate carrier genes

Number of carrier genes

Version Author Date
bacff3d christianholland 2022-11-29

Fraction of differentially expressed carrier genes

Fraction of gene family members that are differentially expressed
side size n fraction
Blood 8 5 0.625
Canalicular 10 4 0.400

Enrichment analysis

Version Author Date
bacff3d christianholland 2022-11-29

Overlap of metabolic, carrier and pericentral genes

Version Author Date
bacff3d christianholland 2022-11-29

Top differentially expressed metabolic and carrier genes

Pure CCl4

Version Author Date
bacff3d christianholland 2022-11-29

Tranlational analysis

Translation of human genes to mouse genes

Correlation of mouse-human-genes

Version Author Date
0258d2a christianholland 2022-12-07

Trajectories

Metabolic genes

Only metabolic genes that are differentially expressed in at least one timepoint are considered.

Carrier genes

Only genes that are differentially expressed in at least one timepoint are considered.

Publication figures

Figure 1

PCA

Enrichemnt

Top DEGs

Warning: Removed 1 rows containing missing values (geom_text).
Warning: Removed 2 rows containing missing values (geom_text).
Warning: Removed 1 rows containing missing values (geom_text).
Removed 1 rows containing missing values (geom_text).
Warning: Removed 2 rows containing missing values (geom_text).
Warning: Removed 3 rows containing missing values (geom_text).
Warning: Removed 6 rows containing missing values (geom_text).
Warning: Removed 1 rows containing missing values (geom_text).
Warning: Removed 5 rows containing missing values (geom_text).
Warning: Removed 6 rows containing missing values (geom_text).
Warning: Removed 5 rows containing missing values (geom_text).
Warning: Removed 2 rows containing missing values (geom_text).
# A tibble: 13 × 7
   geneset     phase    geneset_label             n data     p          pp      
   <fct>       <fct>    <chr>                 <int> <list>   <list>     <list>  
 1 Blood       <NA>     Blood side carrier        3 <tibble> <patchwrk> <tibble>
 2 Canalicular <NA>     Canalicular side car…     3 <tibble> <patchwrk> <tibble>
 3 ADH/ALDH    Phase I  Alcohol- and aldehyd…     5 <tibble> <patchwrk> <tibble>
 4 CYP         Phase I  Cytochrome p450 depe…    10 <tibble> <patchwrk> <tibble>
 5 DH          Phase I  Dihydrodioldehydroge…     1 <tibble> <patchwrk> <tibble>
 6 EPH         Phase I  Epoxidhydrolases (EP…     3 <tibble> <patchwrk> <tibble>
 7 FMO         Phase I  Flavin dependent mon…     3 <tibble> <patchwrk> <tibble>
 8 GST         Phase II Glutathiontransferas…     7 <tibble> <patchwrk> <tibble>
 9 MAO         Phase I  Monoamine oxidases (…     1 <tibble> <patchwrk> <tibble>
10 MT          Phase II Methyltransferases (…     6 <tibble> <patchwrk> <tibble>
11 NAT         Phase II Acetyltransferases (…     6 <tibble> <patchwrk> <tibble>
12 SULT        Phase II Sulfotransferases (S…     7 <tibble> <patchwrk> <tibble>
13 UGT         Phase II UDP-glucuronosyltran…     5 <tibble> <patchwrk> <tibble>

Figure 2

Single correlations

Correlation heatmap

References

Holland, Christian H., Ricardo O. Ramirez Flores, Maiju Myllys, Reham Hassan, Karolina Edlund, Ute Hofmann, Rosemarie Marchan, et al. 2021. “Transcriptomic Cross-Species Analysis of Chronic Liver Disease Reveals Consistent Regulation Between Humans and Mice.” Hepatology Communications 6 (1): 161–77. https://doi.org/10.1002/hep4.1797.

R version 4.2.1 (2022-06-23)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur ... 10.16

Matrix products: default
BLAS:   /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib

locale:
[1] de_DE.UTF-8/de_DE.UTF-8/de_DE.UTF-8/C/de_DE.UTF-8/de_DE.UTF-8

attached base packages:
[1] stats     graphics  grDevices datasets  utils     methods   base     

other attached packages:
 [1] htmltools_0.5.3          devtools_2.4.5.9000      usethis_2.1.6           
 [4] here_1.0.1               knitr_1.40               DT_0.26                 
 [7] RColorBrewer_1.1-3       AachenColorPalette_1.1.3 gtools_3.9.4            
[10] patchwork_1.1.2          scales_1.2.1             plotly_4.10.0           
[13] UpSetR_1.4.0             tidytext_0.3.4           lemon_0.4.5             
[16] cowplot_1.1.1            survcomp_1.46.0          prodlim_2019.11.13      
[19] survival_3.3-1           msigdf_7.4               fgsea_1.22.0            
[22] forcats_0.5.2            stringr_1.4.1            dplyr_1.0.10            
[25] purrr_0.3.5              readr_2.1.3              tidyr_1.2.1             
[28] tibble_3.1.8             ggplot2_3.3.6            tidyverse_1.3.2         
[31] workflowr_1.7.0         

loaded via a namespace (and not attached):
  [1] readxl_1.4.1        backports_1.4.1     fastmatch_1.1-3    
  [4] systemfonts_1.0.4   plyr_1.8.7          lazyeval_0.2.2     
  [7] splines_4.2.1       crosstalk_1.2.0     BiocParallel_1.30.4
 [10] listenv_0.8.0       SnowballC_0.7.0     digest_0.6.30      
 [13] SuppDists_1.1-9.7   fansi_1.0.3         magrittr_2.0.3     
 [16] memoise_2.0.1       googlesheets4_1.0.1 tzdb_0.3.0         
 [19] remotes_2.4.2       globals_0.16.2      modelr_0.1.9       
 [22] prettyunits_1.1.1   colorspace_2.0-3    rvest_1.0.3        
 [25] textshaping_0.3.6   haven_2.5.1         xfun_0.34          
 [28] callr_3.7.2         crayon_1.5.2        jsonlite_1.8.3     
 [31] glue_1.6.2          gtable_0.3.1        gargle_1.2.1       
 [34] pkgbuild_1.3.1      future.apply_1.10.0 DBI_1.1.3          
 [37] miniUI_0.1.1.1      Rcpp_1.0.9          viridisLite_0.4.1  
 [40] xtable_1.8-4        lava_1.7.0          profvis_0.3.7      
 [43] htmlwidgets_1.5.4   httr_1.4.4          ellipsis_0.3.2     
 [46] farver_2.1.1        urlchecker_1.0.1    pkgconfig_2.0.3    
 [49] sass_0.4.2          dbplyr_2.2.1        utf8_1.2.2         
 [52] labeling_0.4.2      tidyselect_1.2.0    rlang_1.0.6        
 [55] later_1.3.0         munsell_0.5.0       cellranger_1.1.0   
 [58] tools_4.2.1         cachem_1.0.6        cli_3.4.1          
 [61] generics_0.1.3      broom_1.0.1         evaluate_0.17      
 [64] fastmap_1.1.0       ragg_1.2.3          yaml_2.3.6         
 [67] bootstrap_2019.6    processx_3.7.0      fs_1.5.2           
 [70] nlme_3.1-157        future_1.29.0       whisker_0.4        
 [73] mime_0.12           xml2_1.3.3          tokenizers_0.2.3   
 [76] compiler_4.2.1      rstudioapi_0.14     curl_4.3.3         
 [79] reprex_2.0.2        bslib_0.4.0         stringi_1.7.8      
 [82] highr_0.9           ps_1.7.1            lattice_0.20-45    
 [85] Matrix_1.4-1        survivalROC_1.0.3.1 vctrs_0.5.0        
 [88] pillar_1.8.1        lifecycle_1.0.3     jquerylib_0.1.4    
 [91] data.table_1.14.4   httpuv_1.6.6        R6_2.5.1           
 [94] promises_1.2.0.1    renv_0.16.0         KernSmooth_2.23-20 
 [97] gridExtra_2.3       janeaustenr_1.0.0   parallelly_1.32.1  
[100] sessioninfo_1.2.2   codetools_0.2-18    assertthat_0.2.1   
[103] pkgload_1.3.0       rprojroot_2.0.3     withr_2.5.0        
[106] mgcv_1.8-40         parallel_4.2.1      hms_1.1.2          
[109] grid_4.2.1          rmarkdown_2.17      googledrive_2.0.0  
[112] git2r_0.30.1        getPass_0.2-2       shiny_1.7.2        
[115] lubridate_1.8.0     rmeta_3.0