comparison runit/multivariate_tests.R @ 0:b2b02fb81a0a draft default tip

planemo upload for repository https://github.com/eschen42/multivariate/tree/dump_rdata forked from https://github.com/workflow4metabolomics/multivariate.git commit 2ace6612c83223925e25d38bce9530f90f20a602-dirty
author eschen42
date Mon, 14 Aug 2017 20:57:59 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:b2b02fb81a0a
1 test_input_pca <- function() {
2
3 testDirC <- "input"
4 argLs <- list(respC = "none",
5 predI = "NA",
6 orthoI = "0",
7 testL = "FALSE")
8
9 argLs <- c(defaultArgF(testDirC), argLs)
10 outLs <- wrapperCallF(argLs)
11
12 }
13
14 test_input_pcaGender <- function() {
15
16 testDirC <- "input"
17 argLs <- list(respC = "none",
18 predI = "NA",
19 orthoI = "0",
20 testL = "FALSE",
21 parMahalC = "gender")
22
23 argLs <- c(defaultArgF(testDirC), argLs)
24 outLs <- wrapperCallF(argLs)
25
26 }
27
28 test_input_plsdaGender <- function() {
29
30 testDirC <- "input"
31 argLs <- list(respC = "gender",
32 predI = "NA",
33 orthoI = "0",
34 testL = "FALSE")
35
36 argLs <- c(defaultArgF(testDirC), argLs)
37 outLs <- wrapperCallF(argLs)
38
39 }
40
41 test_input_oplsAge <- function() {
42
43 testDirC <- "input"
44 argLs <- list(respC = "age",
45 predI = "1",
46 orthoI = "1",
47 testL = "FALSE")
48
49 argLs <- c(defaultArgF(testDirC), argLs)
50 outLs <- wrapperCallF(argLs)
51
52 }
53
54 test_input_oplsdaGender <- function() {
55
56 testDirC <- "input"
57 argLs <- list(respC = "gender",
58 predI = "1",
59 orthoI = "1",
60 testL = "FALSE")
61
62 argLs <- c(defaultArgF(testDirC), argLs)
63 outLs <- wrapperCallF(argLs)
64
65 }
66
67 test_sacurine_pca <- function() {
68
69 testDirC <- "sacurine"
70 argLs <- list(respC = "none",
71 predI = "NA",
72 orthoI = "0",
73 testL = "FALSE")
74
75 argLs <- c(defaultArgF(testDirC), argLs)
76 outLs <- wrapperCallF(argLs)
77
78 }
79
80 test_sacurine_pcaGender <- function() {
81
82 testDirC <- "sacurine"
83 argLs <- list(respC = "none",
84 predI = "NA",
85 orthoI = "0",
86 testL = "FALSE",
87 parMahalC = "gender")
88
89 argLs <- c(defaultArgF(testDirC), argLs)
90 outLs <- wrapperCallF(argLs)
91
92 }
93
94 test_sacurine_plsAge <- function() {
95
96 testDirC <- "sacurine"
97 argLs <- list(respC = "age",
98 predI = "NA",
99 orthoI = "0",
100 testL = "FALSE")
101
102 argLs <- c(defaultArgF(testDirC), argLs)
103 outLs <- wrapperCallF(argLs)
104
105 }
106
107 test_sacurine_plsdaGender <- function() {
108
109 testDirC <- "sacurine"
110 argLs <- list(respC = "gender",
111 predI = "NA",
112 orthoI = "0",
113 testL = "FALSE")
114
115 argLs <- c(defaultArgF(testDirC), argLs)
116 outLs <- wrapperCallF(argLs)
117
118 }
119
120 test_sacurineTest_pls <- function() {
121
122 testDirC <- "sacurineTest"
123 argLs <- list(respC = "age",
124 predI = "2",
125 orthoI = "0",
126 testL = "TRUE")
127
128 argLs <- c(defaultArgF(testDirC), argLs)
129 outLs <- wrapperCallF(argLs)
130
131 checkEqualsNumeric(outLs[["samDF"]][181, "age_PLS_predictions"], 40.82252, tolerance = 1e-5)
132
133 }
134
135 test_sacurineTest_opls <- function() {
136
137 testDirC <- "sacurineTest"
138 argLs <- list(respC = "age",
139 predI = "1",
140 orthoI = "2",
141 testL = "TRUE")
142
143 argLs <- c(defaultArgF(testDirC), argLs)
144 outLs <- wrapperCallF(argLs)
145
146 checkEqualsNumeric(outLs[["samDF"]][181, "age_OPLS_predictions"], 40.28963, tolerance = 1e-5)
147
148 }
149
150 test_sacurineTest_plsda <- function() {
151
152 testDirC <- "sacurineTest"
153 argLs <- list(respC = "gender",
154 predI = "2",
155 orthoI = "0",
156 testL = "TRUE")
157
158 argLs <- c(defaultArgF(testDirC), argLs)
159 outLs <- wrapperCallF(argLs)
160
161 checkEquals(outLs[["samDF"]][181, "gender_PLSDA_predictions"], "F")
162
163 }
164
165 test_sacurineTest_oplsda <- function() {
166
167 testDirC <- "sacurineTest"
168 argLs <- list(respC = "gender",
169 predI = "1",
170 orthoI = "1",
171 testL = "TRUE")
172
173 argLs <- c(defaultArgF(testDirC), argLs)
174 outLs <- wrapperCallF(argLs)
175
176 checkEquals(outLs[["samDF"]][181, "gender_OPLSDA_predictions"], "F")
177
178 }
179
180 test_sacurine_oplsAge <- function() {
181
182 testDirC <- "sacurine"
183 argLs <- list(respC = "age",
184 predI = "1",
185 orthoI = "1",
186 testL = "FALSE")
187
188 argLs <- c(defaultArgF(testDirC), argLs)
189 outLs <- wrapperCallF(argLs)
190
191 checkEqualsNumeric(outLs[["varDF"]][1, "age_OPLS_VIP_ortho"], 0.3514378, tolerance = 1e-7)
192 }
193
194 test_example1_plsda <- function() {
195
196 testDirC <- "example1"
197 argLs <- list(respC = "traitment",
198 predI = "3",
199 orthoI = "0",
200 testL = "FALSE")
201
202 argLs <- c(defaultArgF(testDirC), argLs)
203 outLs <- wrapperCallF(argLs)
204
205 }
206
207 test_example2_pca <- function() {
208
209 testDirC <- "example2"
210 argLs <- list(respC = "none",
211 predI = "NA",
212 orthoI = "0",
213 testL = "FALSE")
214
215 argLs <- c(defaultArgF(testDirC), argLs)
216 outLs <- wrapperCallF(argLs)
217
218 }