Source: https://github.com/markziemann/bioinformatics_intro_workshop
Original Source: https://github.com/markziemann/mitch_example_workflows
Six male participants underwent 1 hr endurance exercise (~70% VO2 peak) with skeletal muscle biopsy before and immediately after exercise. These skeletal muscle samples underwent mRNA-seq, and ChIP-seq for H3K9/K14ac and H3K36ac. The goal is to understand the coordination between RNA expression and histone acetylation, and also to characterise the pathway expression changes. Gene expression was quantified using STAR uniquely mapped reads and promoter based histone acetylation changes were quantified by read counting within 3 kbp of the TSS. In this analysis we will perform correlation analysis between these omics and conduct a multivariate REACTOME pathway enrichment analysis.
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("mitch")
library("mitch")
library("eulerr")
library("kableExtra")
if ( ! file.exists("data/ReactomePathways_2025-09-02.gmt") ) {
download.file("https://ziemann-lab.net/public/bioinfo_workshop/2026/ReactomePathways_2025-09-02.gmt",
destfile="data/ReactomePathways_2025-09-02.gmt")
}
gs <- gmt_import("data/ReactomePathways_2025-09-02.gmt")
head(gs,3)
## $`2-LTR circle formation`
## [1] "BANF1" "HMGA1" "LIG4" "PSIP1" "XRCC4" "XRCC5" "XRCC6"
## [8] "gag" "gag-pol" "rev" "vif" "vpr" "vpu"
##
## $`3-Methylcrotonyl-CoA carboxylase deficiency`
## [1] "MCCC1" "MCCC2"
##
## $`3-hydroxyisobutyryl-CoA hydrolase deficiency`
## [1] "HIBCH"
DE analysis has already been done. But let’s look at the MDS plots. Check http://10.11.41.249/public/exercise_histone/
K9URL="https://raw.githubusercontent.com/markziemann/bioinformatics_intro_workshop/refs/heads/2026/data/k9a.tsv"
K36URL="https://raw.githubusercontent.com/markziemann/bioinformatics_intro_workshop/refs/heads/2026/data/k36a.tsv"
RNAURL="https://raw.githubusercontent.com/markziemann/bioinformatics_intro_workshop/refs/heads/2026/data/rna.tsv"
if ( ! file.exists("data/k9a.tsv") ) {
download.file(K9URL,"k9a.tsv")
}
if ( ! file.exists("data/k36a.tsv") ) {
download.file(K36URL,"k35a.tsv")
}
if ( ! file.exists("data/rna.tsv") ) {
download.file(RNAURL,"rna.tsv")
}
rna <- read.table("data/rna.tsv",header=TRUE,row.names = 1)
head(rna)
## logFC logCPM PValue adj.p.value
## NR4A3 4.12734 5.09552 8.46507e-69 6.24341e-65
## HSPA1B 3.64685 7.42834 6.43968e-48 3.16639e-44
## DNAJB1 2.35432 7.13208 7.44748e-36 2.74645e-32
## MIR133A1HG -1.02085 7.29935 4.34519e-28 1.28192e-24
## HSPH1 1.11729 6.03741 1.45377e-26 3.06351e-23
## CXCL2 5.48158 2.88719 1.71515e-25 3.16252e-22
k9a <- read.table("data/k9a.tsv",header=TRUE,row.names = 1)
head(k9a)
## logFC logCPM PValue adj.p.value
## MYL12A 1.55964 2.75905 1.05762e-38 1.14812e-33
## TTN 1.15238 4.49057 4.82932e-35 2.40012e-30
## PPARGC1A 1.18502 4.63633 6.63278e-35 2.40012e-30
## LMOD2 1.50142 2.96718 5.79568e-31 1.57290e-26
## YBX3 1.27669 4.55101 4.11055e-29 6.37470e-25
## QKI 1.15728 4.25107 1.28108e-27 1.39071e-23
k36a <- read.table("data/k36a.tsv",header=TRUE,row.names = 1)
head(k36a)
## logFC logCPM PValue adj.p.value
## FKBP5 1.19160 3.22832 2.14438e-16 3.86113e-12
## TNRC18 -1.26588 3.41529 8.66969e-15 7.37887e-11
## FAM69B -1.47060 2.64234 3.66461e-14 1.79957e-10
## GAK -1.01804 4.21250 4.59689e-14 2.15924e-10
## SBF1 -1.14121 3.43088 6.14688e-14 2.76699e-10
## TSC2 -1.19937 3.84523 9.61349e-14 3.99459e-10
rna_up <- rownames(subset(rna,adj.p.value<0.05 & logFC > 0))
rna_dn <- rownames(subset(rna,adj.p.value<0.05 & logFC < 0))
k9a_up <- rownames(subset(k9a,adj.p.value<0.05 & logFC > 0))
k9a_dn <- rownames(subset(k9a,adj.p.value<0.05 & logFC < 0))
k36a_up <- rownames(subset(k36a,adj.p.value<0.05 & logFC > 0))
k36a_dn <- rownames(subset(k36a,adj.p.value<0.05 & logFC < 0))
xl <- list("RNA up"=rna_up, "RNA dn"=rna_dn,
"K9a up"=k9a_up, "K9a dn"=k9a_dn,
"K36a up"=k36a_up, "K36a dn"=k36a_dn )
plot(euler(xl),quantities = list(cex = 2), labels = list(cex = 2))
v1 <- list("RNA up"=rna_up, "K9a up"=k9a_up, "K36a up"=k36a_up)
plot(euler(v1),quantities = list(cex = 2), labels = list(cex = 2))
v2 <- list("RNA dn"=rna_dn, "K9a dn"=k9a_dn, "K36a dn"=k36a_dn)
plot(euler(v2),quantities = list(cex = 2), labels = list(cex = 2))
## Mitch import
This combines the DE data into a single metric, good for comparing across contrasts.
x <- list("rna"=rna,"k9a"=k9a,"k36a"=k36a)
xx <- mitch_import(x = x,DEtype = "edger")
## Note: Mean no. genes in input = 13273.3333333333
## Note: no. genes in output = 12944
## Note: estimated proportion of input genes in output = 0.975
head(xx)
## rna k9a k36a
## NR4A3 68.07237 10.7310010 -0.902305492
## HSPA1B 47.19114 18.8135155 0.833717933
## DNAJB1 35.12799 2.4326983 0.138611374
## MIR133A1HG -27.36199 8.9061967 2.109276143
## HSPH1 25.83750 10.8922577 1.190587769
## CXCL2 24.76570 0.8459414 0.003701587
dim(xx)
## [1] 12944 3
cor(xx)
## rna k9a k36a
## rna 1.00000000 0.1538756 0.08532138
## k9a 0.15387561 1.0000000 0.33585132
## k36a 0.08532138 0.3358513 1.00000000
cor(xx,method="spearman")
## rna k9a k36a
## rna 1.0000000 0.1394434 0.1171306
## k9a 0.1394434 1.0000000 0.2859109
## k36a 0.1171306 0.2859109 1.0000000
res <- mitch_calc(x = xx,genesets = gs, priority = "effect",cores=4, resrows=10)
## Note: Enrichments with large effect sizes may not be
## statistically significant.
head(res$enrichment_result,30) %>%
kbl(caption="Top pathways by Enrichment Score") %>%
kable_paper("hover", full_width = F)
| set | setSize | pMANOVA | s.rna | s.k9a | s.k36a | p.rna | p.k9a | p.k36a | s.dist | SD | p.adjustMANOVA | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 373 | FOXO-mediated transcription of cell cycle genes | 15 | 0.0000129 | 0.5083920 | 0.6072086 | 0.3121716 | 0.0006524 | 0.0000466 | 0.0363606 | 0.8512437 | 0.1501743 | 0.0000740 |
| 246 | Dectin-2 family | 10 | 0.0007253 | -0.0540591 | -0.7396938 | -0.3263646 | 0.7672673 | 0.0000510 | 0.0739666 | 0.8102982 | 0.3452261 | 0.0026763 |
| 717 | NGF-stimulated transcription | 28 | 0.0000000 | 0.6418064 | 0.3741428 | 0.2001947 | 0.0000000 | 0.0006130 | 0.0668367 | 0.7693999 | 0.2224570 | 0.0000001 |
| 716 | NFE2L2 regulating tumorigenic genes | 10 | 0.0026139 | 0.6264265 | 0.3690428 | 0.1822019 | 0.0006031 | 0.0433301 | 0.3185226 | 0.7495334 | 0.2230438 | 0.0079417 |
| 629 | MET activates RAP1 and RAC1 | 10 | 0.0056890 | 0.4011133 | 0.5213236 | 0.3590305 | 0.0280825 | 0.0043108 | 0.0493347 | 0.7493818 | 0.0842225 | 0.0153280 |
| 1042 | Regulation of localization of FOXO transcription factors | 11 | 0.0021245 | 0.4863176 | 0.5191582 | 0.1609343 | 0.0052279 | 0.0028703 | 0.3554705 | 0.7293352 | 0.1980223 | 0.0066241 |
| 836 | Phosphorylation and nuclear translocation of the CRY:PER:kinase complex | 12 | 0.0002339 | 0.4622513 | 0.5556372 | -0.0765156 | 0.0055651 | 0.0008602 | 0.6463502 | 0.7268174 | 0.3412252 | 0.0009853 |
| 69 | Antigen processing: Ub, ATP-independent proteasomal degradation | 16 | 0.0000061 | -0.6457785 | 0.2832515 | -0.0170657 | 0.0000077 | 0.0498596 | 0.9059488 | 0.7053741 | 0.4740898 | 0.0000375 |
| 1172 | Signaling by FLT3 fusion proteins | 18 | 0.0000117 | 0.5560455 | 0.4287483 | -0.0270471 | 0.0000442 | 0.0016397 | 0.8425775 | 0.7026687 | 0.3065809 | 0.0000680 |
| 375 | FOXO-mediated transcription of oxidative stress, metabolic and neuronal genes | 22 | 0.0000497 | 0.3304794 | 0.4541726 | 0.3910808 | 0.0073040 | 0.0002267 | 0.0014996 | 0.6844220 | 0.0618508 | 0.0002482 |
| 1387 | Viral mRNA Translation | 58 | 0.0000000 | -0.6762030 | 0.0904510 | -0.0119911 | 0.0000000 | 0.2339001 | 0.8746117 | 0.6823310 | 0.4162191 | 0.0000000 |
| 9 | ALK mutants bind TKIs | 10 | 0.0107984 | 0.5348539 | 0.2519097 | 0.3347920 | 0.0034051 | 0.1678483 | 0.0668078 | 0.6794210 | 0.1454600 | 0.0253621 |
| 1082 | SARS-CoV-1 targets host intracellular signalling and regulatory pathways | 14 | 0.0004318 | 0.3930173 | 0.5517070 | 0.0362170 | 0.0109047 | 0.0003515 | 0.8145475 | 0.6783472 | 0.2640135 | 0.0016802 |
| 627 | MECP2 regulates neuronal receptors and channels | 11 | 0.0049020 | 0.5928246 | 0.2706888 | 0.1740509 | 0.0006628 | 0.1201247 | 0.3176281 | 0.6745421 | 0.2192722 | 0.0134101 |
| 1297 | The NLRP3 inflammasome | 11 | 0.0077969 | 0.4692084 | 0.2467613 | 0.4166719 | 0.0070522 | 0.1565264 | 0.0167288 | 0.6742872 | 0.1162701 | 0.0193972 |
| 825 | Peptide chain elongation | 59 | 0.0000000 | -0.6630848 | 0.1019856 | -0.0276435 | 0.0000000 | 0.1758475 | 0.7136942 | 0.6714512 | 0.4094553 | 0.0000000 |
| 89 | Attenuation phase | 17 | 0.0001928 | 0.5150051 | 0.4130570 | 0.0996501 | 0.0002369 | 0.0031974 | 0.4770132 | 0.6676649 | 0.2164629 | 0.0008471 |
| 323 | EGR2 and SOX10-mediated initiation of Schwann cell myelination | 18 | 0.0002895 | 0.5058710 | 0.2647893 | 0.3377946 | 0.0002029 | 0.0518476 | 0.0131161 | 0.6634185 | 0.1236257 | 0.0011811 |
| 882 | Protein hydroxylation | 14 | 0.0001019 | -0.4873937 | 0.4401282 | 0.0516407 | 0.0015926 | 0.0043584 | 0.7380344 | 0.6587353 | 0.4657927 | 0.0004741 |
| 374 | FOXO-mediated transcription of cell death genes | 12 | 0.0062659 | 0.3267992 | 0.5237009 | 0.2258609 | 0.0500143 | 0.0016835 | 0.1755915 | 0.6573230 | 0.1514747 | 0.0163578 |
| 471 | Glycogen synthesis | 12 | 0.0036478 | -0.0886045 | 0.5591685 | 0.3245695 | 0.5951887 | 0.0007969 | 0.0515984 | 0.6525837 | 0.3279632 | 0.0103559 |
| 352 | Eukaryotic Translation Elongation | 62 | 0.0000000 | -0.6427273 | 0.0994686 | -0.0441952 | 0.0000000 | 0.1759804 | 0.5476781 | 0.6518785 | 0.3936442 | 0.0000000 |
| 1171 | Signaling by FLT3 ITD and TKD mutants | 14 | 0.0005699 | 0.5792841 | 0.2917910 | -0.0524970 | 0.0001749 | 0.0587651 | 0.7338542 | 0.6507441 | 0.3163157 | 0.0021417 |
| 372 | FOXO-mediated transcription | 51 | 0.0000000 | 0.3314719 | 0.4939160 | 0.2619281 | 0.0000426 | 0.0000000 | 0.0012214 | 0.6499484 | 0.1190538 | 0.0000000 |
| 838 | Phosphorylation of CLOCK, acetylation of BMAL1 (ARNTL) at target gene promoters | 11 | 0.0065004 | 0.4074918 | 0.4981267 | 0.0861995 | 0.0192895 | 0.0042300 | 0.6206548 | 0.6493151 | 0.2164592 | 0.0168295 |
| 577 | Interleukin-6 signaling | 10 | 0.0067716 | 0.5665533 | 0.3057523 | -0.0448585 | 0.0019208 | 0.0941392 | 0.8060060 | 0.6453521 | 0.3068033 | 0.0172986 |
| 8 | AKT phosphorylates targets in the nucleus | 10 | 0.0148314 | 0.4779341 | 0.4107159 | 0.1248802 | 0.0088749 | 0.0245305 | 0.4941819 | 0.6424202 | 0.1874689 | 0.0330927 |
| 1087 | SARS-CoV-2 targets host intracellular signalling and regulatory pathways | 11 | 0.0034178 | 0.3378039 | 0.5437605 | -0.0337895 | 0.0524204 | 0.0017925 | 0.8461720 | 0.6410372 | 0.2927069 | 0.0097611 |
| 1176 | Signaling by Hippo | 19 | 0.0003164 | 0.4821623 | 0.3629645 | 0.2154332 | 0.0002746 | 0.0061731 | 0.1041164 | 0.6408082 | 0.1336151 | 0.0012656 |
| 1121 | Selenocysteine synthesis | 62 | 0.0000000 | -0.6344286 | 0.0844214 | -0.0143711 | 0.0000000 | 0.2507574 | 0.8449956 | 0.6401822 | 0.3896530 | 0.0000000 |
if ( file.exists("exercise_reactome_report.html") ) {
unlink("exercise_reactome_report.html")
}
mitch_report(res = res, outfile = "exercise_reactome_report.html")
## Dataset saved as " /tmp/RtmpH8O0bZ/exercise_reactome_report.rds ".
##
##
## processing file: mitch.Rmd
## 1/36
## 2/36 [checklibraries]
## 3/36
## 4/36 [peek]
## 5/36
## 6/36 [metrics]
## 7/36
## 8/36 [scatterplot]
## 9/36
## 10/36 [contourplot]
## 11/36
## 12/36 [input_geneset_metrics1]
## 13/36
## 14/36 [input_geneset_metrics2]
## 15/36
## 16/36 [input_geneset_metrics3]
## 17/36
## 18/36 [echart1d]
## 19/36 [echart2d]
## 20/36
## 21/36 [heatmap]
## 22/36
## 23/36 [effectsize]
## 24/36
## 25/36 [results_table]
## 26/36
## 27/36 [results_table_complete]
## 28/36
## 29/36 [detailed_geneset_reports1d]
## 30/36
## 31/36 [detailed_geneset_reports2d]
## 32/36
## 33/36 [network]
## 34/36
## 35/36 [session_info]
## 36/36
## output file: /mnt/data/mdz/teaching/bioinformatics_intro_workshop/mitch.knit.md
## /home/mdz/anaconda3/bin/pandoc +RTS -K512m -RTS /mnt/data/mdz/teaching/bioinformatics_intro_workshop/mitch.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output /tmp/RtmpH8O0bZ/mitch_report.html --lua-filter /mnt/data/rlibs/site-library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /mnt/data/rlibs/site-library/rmarkdown/rmarkdown/lua/latex-div.lua --self-contained --variable bs3=TRUE --section-divs --template /mnt/data/rlibs/site-library/rmarkdown/rmd/h/default.html --no-highlight --variable highlightjs=1 --variable theme=bootstrap --mathjax --variable 'mathjax-url=https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --include-in-header /tmp/RtmpH8O0bZ/rmarkdown-str1c9f2913b3a1a2.html
##
## Output created: /tmp/RtmpH8O0bZ/mitch_report.html
## [1] TRUE
sessionInfo()
## R version 4.6.1 (2026-06-24)
## Platform: x86_64-pc-linux-gnu
## Running under: Ubuntu 24.04.5 LTS
##
## Matrix products: default
## BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
## LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.26.so; LAPACK version 3.12.0
##
## locale:
## [1] LC_CTYPE=en_AU.UTF-8 LC_NUMERIC=C
## [3] LC_TIME=en_AU.UTF-8 LC_COLLATE=en_AU.UTF-8
## [5] LC_MONETARY=en_AU.UTF-8 LC_MESSAGES=en_AU.UTF-8
## [7] LC_PAPER=en_AU.UTF-8 LC_NAME=C
## [9] LC_ADDRESS=C LC_TELEPHONE=C
## [11] LC_MEASUREMENT=en_AU.UTF-8 LC_IDENTIFICATION=C
##
## time zone: Australia/Melbourne
## tzcode source: system (glibc)
##
## attached base packages:
## [1] stats graphics grDevices utils datasets methods base
##
## other attached packages:
## [1] gtools_3.9.5 kableExtra_1.4.1 eulerr_7.1.0 mitch_1.24.0
##
## loaded via a namespace (and not attached):
## [1] gtable_0.3.6 beeswarm_0.4.0 bslib_0.12.0
## [4] xfun_0.61 ggplot2_4.0.3 htmlwidgets_1.6.4
## [7] caTools_1.18.4 GGally_2.4.0 lattice_0.23-1
## [10] vctrs_0.7.3 tools_4.6.1 bitops_1.1-0
## [13] generics_0.1.4 parallel_4.6.1 tibble_3.3.1
## [16] pkgconfig_2.0.3 KernSmooth_2.23-27 polylabelr_1.0.0
## [19] RColorBrewer_1.1-3 S7_0.2.2 lifecycle_1.0.5
## [22] compiler_4.6.1 farver_2.1.2 stringr_1.6.0
## [25] textshaping_1.0.5 gplots_3.3.0 httpuv_1.6.17
## [28] sass_0.4.10 htmltools_0.5.9 yaml_2.3.12
## [31] jquerylib_0.1.4 later_1.4.8 pillar_1.11.1
## [34] tidyr_1.3.2 MASS_7.3-66 cachem_1.1.0
## [37] mime_0.13 ggstats_0.14.0 network_1.20.0
## [40] tidyselect_1.2.1 digest_0.6.39 stringi_1.8.9
## [43] dplyr_1.2.1 reshape2_1.4.5 purrr_1.2.2
## [46] labeling_0.4.3 polyclip_1.10-7 fastmap_1.2.0
## [49] grid_4.6.1 cli_3.6.6 magrittr_2.0.5
## [52] dichromat_2.0-1 withr_3.0.3 scales_1.4.0
## [55] promises_1.5.0 rmarkdown_2.32 otel_0.2.0
## [58] gridExtra_2.3.1 coda_0.19-4.1 shiny_1.14.0
## [61] evaluate_1.0.5 knitr_1.52 viridisLite_0.4.3
## [64] rlang_1.3.0 Rcpp_1.1.2 xtable_1.8-8
## [67] glue_1.8.1 echarts4r_0.5.0 xml2_1.6.0
## [70] jsonlite_2.0.0 svglite_2.2.2 rstudioapi_0.19.0
## [73] R6_2.6.1 plyr_1.8.9 statnet.common_4.13.0
## [76] systemfonts_1.3.2