annotate runit/univariate_tests.R @ 0:ab2ee3414e4e draft

planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
author ethevenot
date Tue, 24 Oct 2017 08:57:25 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
1 test_input_anova <- function() {
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
2
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
3 testDirC <- "input"
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
4 argLs <- list(facC = "qual",
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
5 tesC = "anova",
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
6 adjC = "fdr",
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
7 thrN = "0.05")
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
8
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
9 argLs <- c(defaultArgF(testDirC), argLs)
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
10 outLs <- wrapperCallF(argLs)
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
11
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
12 checkEqualsNumeric(outLs[["varDF"]]["v6", "qual_anova_fdr"], 1.924156e-03, tolerance = 1e-6)
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
13
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
14 checkEqualsNumeric(outLs[["varDF"]]["v4", "qual_anova_D.C_fdr"], 0.01102016, tolerance = 1e-6)
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
15
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
16 }
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
17
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
18 test_input_kruskal <- function() {
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
19
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
20 testDirC <- "input"
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
21 argLs <- list(facC = "qual",
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
22 tesC = "kruskal",
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
23 adjC = "fdr",
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
24 thrN = "0.05")
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
25
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
26 argLs <- c(defaultArgF(testDirC), argLs)
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
27 outLs <- wrapperCallF(argLs)
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
28
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
29 checkEqualsNumeric(outLs[["varDF"]]["v4", "qual_kruskal_fdr"], 0.0008194662, tolerance = 1e-7)
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
30
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
31 checkEqualsNumeric(outLs[["varDF"]]["v6", "qual_kruskal_D.A_fdr"], 0.002945952, tolerance = 1e-7)
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
32
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
33 }
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
34
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
35 test_example1_wilcoxDif <- function() {
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
36
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
37 testDirC <- "example1"
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
38 argLs <- list(facC = "jour",
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
39 tesC = "wilcoxon",
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
40 adjC = "fdr",
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
41 thrN = "0.05")
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
42
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
43 argLs <- c(defaultArgF(testDirC), argLs)
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
44 outLs <- wrapperCallF(argLs)
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
45
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
46 checkEqualsNumeric(outLs[["varDF"]]["MT3", "jour_wilcoxon_J3.J10_dif"], 0.216480042, tolerance = 1e-8)
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
47
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
48 }
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
49
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
50 test_example1_ttestFdr <- function() {
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
51
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
52 testDirC <- "example1"
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
53 argLs <- list(facC = "jour",
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
54 tesC = "ttest",
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
55 adjC = "fdr",
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
56 thrN = "0.05")
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
57
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
58 argLs <- c(defaultArgF(testDirC), argLs)
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
59 outLs <- wrapperCallF(argLs)
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
60
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
61 checkEqualsNumeric(outLs[["varDF"]]["MT3", "jour_ttest_J3.J10_fdr"], 0.7605966, tolerance = 1e-6)
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
62
ab2ee3414e4e planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 98e8f4464b2f7321acb010e26e2a1c82fe37096e
ethevenot
parents:
diff changeset
63 }