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