-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlumiExpresso.R
More file actions
66 lines (55 loc) · 2.45 KB
/
lumiExpresso.R
File metadata and controls
66 lines (55 loc) · 2.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#############################################
#
# Take a lumiBatch, process with expresso, output eset
#
#############################################
cl = commandArgs(trailingOnly=T)
lumibatch = cl[1]
bg.method = cl[2]
norm.method = cl[3]
vs.method = cl[4]
outfile = cl[5]
library(affy)
library(lumi)
library(limma)
library(multtest)
library(vsn)
# Read the expressionset object
result <- readRDS(lumibatch)
# Use the options to determine how to run expresso
if (bg.method == 0){
if (norm.method == 0){
if (vs.method == 0){
result <- lumiExpresso(result, bg.correct = FALSE, normalize = FALSE, variance.stabilize=FALSE, verbose = FALSE)
}
else{
result <- lumiExpresso(result, bg.correct = FALSE, normalize = FALSE, variance.stabilize=TRUE, varianceStabilize.param = list(method=vs.method), verbose = FALSE)
}
}else{
if (vs.method == 0){
result <- lumiExpresso(result, bg.correct = FALSE, normalize = TRUE, normalize.param = list(method=norm.method), variance.stabilize=FALSE, verbose = FALSE)
}
else{
result <- lumiExpresso(result, bg.correct = FALSE, normalize = TRUE, normalize.param = list(method=norm.method), variance.stabilize=TRUE, varianceStabilize.param = list(method=vs.method), verbose = FALSE)
}
}
}else{
if (norm.method == 0){
if (vs.method == 0){
result <- lumiExpresso(result, bg.correct = TRUE, bgcorrect.param = list(method=bg.method), normalize = FALSE, variance.stabilize=FALSE, verbose = FALSE)
}
else{
result <- lumiExpresso(result, bg.correct = TRUE, bgcorrect.param = list(method=bg.method), normalize = FALSE, variance.stabilize=TRUE, varianceStabilize.param = list(method=vs.method), verbose = FALSE)
}
}else{
if (vs.method == 0){
result <- lumiExpresso(result, bg.correct = TRUE, bgcorrect.param = list(method=bg.method), normalize = TRUE, normalize.param = list(method=norm.method), variance.stabilize=FALSE, verbose = FALSE)
}
else{
print("Background correcting, normalising and variance stabilising")
result <- lumiExpresso(result, bg.correct = TRUE, bgcorrect.param = list(method=bg.method), normalize = TRUE, normalize.param = list(method=norm.method), variance.stabilize=TRUE, varianceStabilize.param = list(method=vs.method), verbose = FALSE)
}
}
}
# Now output the eset
saveRDS(result, file = outfile)