vignettes/articles/WGCNA_module_ORA.Rmd
WGCNA_module_ORA.Rmd
This article generates plots of the WGCNA over-representation analysis results (Fig. 4C–E).
library(MotrpacRatTraining6moWATData)
library(MotrpacRatTraining6moWAT) # plot_ORA
library(dplyr)
library(ggplot2)
save_plots <- dir.exists(paths = file.path("..", "..", "plots"))
## MF
prot_MF <- plot_ORA(PROT_MODULE_ORA,
subset = "GO:MF",
mods = 1:11,
rel_heights = c(0.8, 0.1))
ggsave(file.path("..", "..", "plots", "PROT_module_ORA_GO-MF_dotplot.pdf"), prot_MF,
height = 3, width = 3, family = "ArialMT")
## BP
prot_BP <- plot_ORA(PROT_MODULE_ORA,
subset = "GO:BP",
mods = 1:11,
rel_heights = c(0.8, 0.1))
ggsave(file.path("..", "..", "plots", "PROT_module_ORA_GO-BP_dotplot.pdf"), prot_BP,
height = 3, width = 3, family = "ArialMT")
# MF
trnscrpt_MF <- plot_ORA(TRNSCRPT_MODULE_ORA,
subset = "GO:MF",
mods = 1:14,
n_terms = 4,
rel_heights = c(1, 0.15))
ggsave(file.path("..", "..", "plots", "TRNSCRPT_module_ORA_GO-MF_dotplot.pdf"), trnscrpt_MF,
height = 4, width = 3.5, family = "ArialMT")
# BP
trnscrpt_BP <- plot_ORA(TRNSCRPT_MODULE_ORA,
subset = "GO:BP",
mods = 1:14,
n_terms = 4,
rel_heights = c(1, 0.09))
ggsave(file.path("..", "..", "plots", "TRNSCRPT_module_ORA_GO-BP_dotplot.pdf"), trnscrpt_BP,
height = 5, width = 3.5, family = "ArialMT")