draw_CurveComp_Perm.Rd
For one specific biological pathway, compare its DDEGs from one experimental group to the other one. For example, if group 1 the most dynamic biological pathway from TimeHeatmap is GO term A, and there were 100 DDEGs identified from experimental group 1. We want to see how these DDEGs behave in the other experimental group. Maybe they are also dynamic, but activation/deactivation time may differ. This function will fit LOESS smooth curve fitting for each group and compare the trajectories visually. And run permutation test to see which time interval these two curve is significantlly separated.
draw_CurveComp_Perm(
master.list.1,
master.list.2,
ht.1,
pathway,
group.1.name = "group1",
group.2.name = "group2",
n.perm = 500,
parall = F,
pvalue.threshold = 0.05
)
a list object. The output from run_TrendCatcher function, contains master.table element.
a list object. The output from run_TrendCatcher function, contains master.table element.
TimeHeatmap object. The output from draw_TimeHeatmap_GO function, contains GO.df object.
characters. Must be a biological pathway from GO.df, Description column.
characters. For example, severe group. By default group1.
characters. For example, moderate group. By default group2
an integer variable, the number of repeated times to run permutation test. By default is 500.
a logical variable. If users want to run using multiple core, set it to TRUE. By default is FALSE.
a numeric variable. The adjusted p-value for permutation test. By default is 0.05.
a list object. Contains elements named adjusted.pvalue.area, perm, st, en and plot. adjusted.pvalue.area is the adjusted p-value for each chopped small time interval area compared to the permutation test. perm is the permutations test result for each individual run. st is the start separation time. en is the end of the separation time. plot is the ggplot.
if (FALSE) {
severe.path<-system.file("extdata", "MasterListSevere.rda", package = "TrendCatcher")
load(severe.path)
moderate.path<-system.file("extdata", "MasterListModerate.rda", package = "TrendCatcher")
load(moderate.path)
ht.path<-system.file("extdata", "htSevere.rda", package = "TrendCatcher")
load(ht.path)
perm_output<-draw_CurveComp_Perm(master.list.1 = master.list.severe,
master.list.2 = master.list.moderate,
ht.1 = ht.severe, pathway = "neutrophil activation",
group.1.name = "severe",
group.2.name = "moderate",
n.perm = 100,
parall = FALSE,
pvalue.threshold = 0.05)
print(perm_output$plot)
}