testStatPermutation: Calculate testStat of each feature's time interval for all...

Description Usage Arguments Value References Examples

View source: R/omicslondaHelper.R

Description

Calculate testStat of each feature's time interval for all permutations

Usage

1

Arguments

perm

list has all the permutated models

Value

a list of test statistic for each time interval for all all permutations

References

Ahmed Metwally (ametwall@stanford.edu)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
library(SummarizedExperiment)
data("omicslonda_data_example")
omicslonda_se_object_adjusted = adjustBaseline(
    se_object = omicslonda_data_example$omicslonda_se_object)
omicslonda_test_object = omicslonda_se_object_adjusted[1,]
se_object = omicslonda_test_object
dt = data.frame(colData(se_object))
dt$Count = as.vector(assay(se_object))
Group = as.character(dt$Group)
group.levels = sort(unique(Group))
gr.1 = as.character(group.levels[1])
gr.2 = as.character(group.levels[2])
df = dt
levels(df$Group) = c(levels(df$Group), "0", "1")
df$Group[which(df$Group == gr.1)] = 0
df$Group[which(df$Group == gr.2)] = 1
group.0 = df[df$Group == 0, ]
group.1 = df[df$Group == 1, ]
points = seq(100, 130)
perm  = permutationMC(formula = Count ~ Time, perm.dat = df, n.perm = 10,
                      fit.method = "ssgaussian", points = points,
                      parall = FALSE, prefix = tempfile())
test.stat.prem = testStatPermutation(perm)

aametwally/OmicsLonDA documentation built on Feb. 10, 2020, 11:47 a.m.