This funcitons takes the master.list output from run_TrendCatcher. And apply a time window sliding strategy to capture all the genes increased/decreased compared to its previous break point, and apply enrichR enrichment analysis.
draw_TimeHeatmap_enrichR(
master.list,
logFC.thres = 0,
top.n = 10,
dyn.gene.p.thres = 0.05,
dbs = "BioPlanet_2019",
term.width = 80,
OrgDb = "org.Mm.eg.db",
GO.enrich.p = 0.05,
figure.title = "",
save.tiff.path = NA,
tiff.res = 100,
tiff.width = 1500,
tiff.height = 1500
)
a list object. The output from run_TrendCatcher function, contains master.table element.
a numeric variable. The logFC threshold compared to each genes previous break point expression level. By default is 0, meaning for each gene, the current time window's expression level is 2-fold compared to previous break point's expression level.
an integer variable. The top N GO enrichment term need to be shown in the TimeHeatmap for up and down regulated pathway. By default is 10. Top 20 GO terms, 10 from up-regulated pathway and 10 from down-regulated pathway will shown in TimeHeatmap.
a numeric variable. The DDEGs dynamic p-value threshold. By default is 0.05.
must one of the enrichR supported database name. To check the list, run dbs <- listEnrichrDbs() command. By default is "BioPlanet_2019".
an integer variable. The character length for each GO term. If one GO term is super long, we can wrap it into term.width of strings into multiple rows. By default if 80.
must be either "org.Mm.eg.db" or "org.Hs.eg.db". Currently only support mouse and human GO annotation database.
an numeric variable. The GO enrichment p-value threshold. By default if 0.05.
a character variable. The main title of TimeHeatmap.
a character variable, the file path to save the TIFF figure. If set to NA, it will plot it out. By default is NA.
a numeric variable, the resolution of the TIFF figure. By default is 100.
a numeric variable, the width of the TIFF figure. By default is 1500.
a numeric variable, the height of the TIFF figure. By default is 1500.
A list object, including elements names time.heatmap, merge.df and GO.df. time.heatmap is the ComplexHeatmap object. merge.df includes all the GO enrichment result and their activation/deactivation time window. GO.df includes GO enrichment used for plot TimeHeatmap and all the individual genes within each time window.
if (FALSE) {
example.file.path<-system.file("extdata", "BrainMasterList.rda", package = "TrendCatcher")
load(example.file.path)
gene.symbol.df<-get_GeneEnsembl2Symbol(ensemble.arr = master.list$master.table$Gene)
th.obj<-draw_TimeHeatmap_enrichR(master.list = master.list)
print(th.obj$time.heatmap)
head(th.obj$merge.df)
}