draw_TimeHeatmap_GO.Rd
This funcitons takes the master.list output from run_TrendCatcher. And apply a time window sliding strategy to capture all the DDEGs increased/decreased compared to its previous break point, and apply GO enrichment analysis.
draw_TimeHeatmap_GO(
master.list,
logFC.thres = 0,
top.n = 10,
dyn.gene.p.thres = 0.05,
keyType = "SYMBOL",
OrgDb = "org.Mm.eg.db",
ont = "BP",
term.width = 80,
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 gene's 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 (based on the change of first time interval). 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 adjusted dynamic p-value threshold. By default is 0.05.
must be either ENSEMBL or SYMBOL. The row names of your master.list$master.table.
must be either "org.Mm.eg.db" or "org.Hs.eg.db". Currently only support mouse and human GO annotation database.
one of "BP", "MF", and "CC" sub ontologies, or "ALL" for all three. By default is "BP".
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 is 80.
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_GO(master.list = master.list)
print(th.obj$time.heatmap)
head(th.obj$merge.df)
}