# NOT RUN {
library(Biobase)
set.seed(1234567)
res = generate_data(n1 = 50, n2 = 60, p1 = 5, p2 = 50)
es = res$es
print(es)
# gene expression data
dat = exprs(es)
print(dim(dat))
print(dat[1:2,1:3])
# 3rd gene
x = dat[3,]
# 5th gene
z = dat[5,]
# for cases
x1 = x[which(es$grp == 1)]
z1 = z[which(es$grp == 1)]
# for controls
x0 = x[which(es$grp == 0)]
z0 = z[which(es$grp == 0)]
# st5
res2 = st5(x1 = x1, z1 = z1, x0 = x0, z0 = z0)
pval = res2$pval
plotDiffCor(x1 = x1,
z1 = z1,
x0 = x0,
z0 = z0,
pval = pval,
xlab = "gene3",
ylab = "gene5",
title = "scatter plots"
)
# }
Run the code above in your browser using DataLab