|
a |
|
b/codes.R |
|
|
1 |
##################################### |
|
|
2 |
|
|
|
3 |
library(MLSeq) |
|
|
4 |
data(cervical) |
|
|
5 |
|
|
|
6 |
set.seed(12349) |
|
|
7 |
ratio=0.7 |
|
|
8 |
conditions = factor(rep(c("N","T"), c(29,29))) |
|
|
9 |
ind = sample(58, ceiling(58*ratio), FALSE) |
|
|
10 |
|
|
|
11 |
train = cervical[,ind] |
|
|
12 |
test = cervical[,-ind] |
|
|
13 |
|
|
|
14 |
tr.cond = conditions[ind] |
|
|
15 |
ts.cond = conditions[-ind] |
|
|
16 |
|
|
|
17 |
tmmT = voomDDA.train(counts = train, conditions = tr.cond, normalization = "TMM", TRUE) |
|
|
18 |
tmmF = voomDDA.train(counts = train, conditions = tr.cond, normalization = "TMM", FALSE) |
|
|
19 |
|
|
|
20 |
quanT = voomDDA.train(counts = train, conditions = tr.cond, normalization = "quan", TRUE) |
|
|
21 |
quanF = voomDDA.train(counts = train, conditions = tr.cond, normalization = "quan", FALSE) |
|
|
22 |
|
|
|
23 |
noneT = voomDDA.train(counts = train, conditions = tr.cond, normalization = "none", TRUE) |
|
|
24 |
noneF = voomDDA.train(counts = train, conditions = tr.cond, normalization = "none", FALSE) |
|
|
25 |
|
|
|
26 |
tmmNSC = voomNSC.train(counts = train, conditions = tr.cond, normalization = "TMM") |
|
|
27 |
quanNSC = voomNSC.train(counts = train, conditions = tr.cond, normalization = "quan") |
|
|
28 |
|
|
|
29 |
table(ts.cond, predict.voomDDA(tmmT, test)) |
|
|
30 |
table(ts.cond, predict.voomDDA(tmmF, test)) |
|
|
31 |
table(ts.cond, predict.voomDDA(quanT, test)) |
|
|
32 |
table(ts.cond, predict.voomDDA(quanF, test)) |
|
|
33 |
table(ts.cond, predict.voomDDA(noneT, test)) |
|
|
34 |
table(ts.cond, predict.voomDDA(noneF, test)) |
|
|
35 |
table(ts.cond, predict.voomNSC(tmmNSC, test)) |
|
|
36 |
table(ts.cond, predict.voomNSC(quanNSC, test)) |