Mercurial > repos > ethevenot > univariate
annotate runit/univariate_tests.R @ 2:09799fc16bc6 draft
planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 2c0d4d97c208edca1ada2035a7b7af9c4eb31afe
author | ethevenot |
---|---|
date | Sat, 06 Aug 2016 12:42:42 -0400 |
parents | |
children | 140290de7986 |
rev | line source |
---|---|
2
09799fc16bc6
planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 2c0d4d97c208edca1ada2035a7b7af9c4eb31afe
ethevenot
parents:
diff
changeset
|
1 test_input_kruskal <- function() { |
09799fc16bc6
planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 2c0d4d97c208edca1ada2035a7b7af9c4eb31afe
ethevenot
parents:
diff
changeset
|
2 |
09799fc16bc6
planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 2c0d4d97c208edca1ada2035a7b7af9c4eb31afe
ethevenot
parents:
diff
changeset
|
3 testDirC <- "input" |
09799fc16bc6
planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 2c0d4d97c208edca1ada2035a7b7af9c4eb31afe
ethevenot
parents:
diff
changeset
|
4 argLs <- list(facC = "ageGroup", |
09799fc16bc6
planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 2c0d4d97c208edca1ada2035a7b7af9c4eb31afe
ethevenot
parents:
diff
changeset
|
5 tesC = "kruskal", |
09799fc16bc6
planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 2c0d4d97c208edca1ada2035a7b7af9c4eb31afe
ethevenot
parents:
diff
changeset
|
6 adjC = "fdr", |
09799fc16bc6
planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 2c0d4d97c208edca1ada2035a7b7af9c4eb31afe
ethevenot
parents:
diff
changeset
|
7 thrN = "0.05") |
09799fc16bc6
planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 2c0d4d97c208edca1ada2035a7b7af9c4eb31afe
ethevenot
parents:
diff
changeset
|
8 |
09799fc16bc6
planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 2c0d4d97c208edca1ada2035a7b7af9c4eb31afe
ethevenot
parents:
diff
changeset
|
9 argLs <- c(defaultArgF(testDirC), argLs) |
09799fc16bc6
planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 2c0d4d97c208edca1ada2035a7b7af9c4eb31afe
ethevenot
parents:
diff
changeset
|
10 outLs <- wrapperCallF(argLs) |
09799fc16bc6
planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 2c0d4d97c208edca1ada2035a7b7af9c4eb31afe
ethevenot
parents:
diff
changeset
|
11 |
09799fc16bc6
planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 2c0d4d97c208edca1ada2035a7b7af9c4eb31afe
ethevenot
parents:
diff
changeset
|
12 checkEqualsNumeric(outLs[["varDF"]]["HMDB01032", "ageGroup_kruskal_senior.experienced_pva"], 0.1231246, tolerance = 1e-6) |
09799fc16bc6
planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 2c0d4d97c208edca1ada2035a7b7af9c4eb31afe
ethevenot
parents:
diff
changeset
|
13 |
09799fc16bc6
planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 2c0d4d97c208edca1ada2035a7b7af9c4eb31afe
ethevenot
parents:
diff
changeset
|
14 } |
09799fc16bc6
planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 2c0d4d97c208edca1ada2035a7b7af9c4eb31afe
ethevenot
parents:
diff
changeset
|
15 |
09799fc16bc6
planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 2c0d4d97c208edca1ada2035a7b7af9c4eb31afe
ethevenot
parents:
diff
changeset
|
16 test_example1_wilcoxDif <- function() { |
09799fc16bc6
planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 2c0d4d97c208edca1ada2035a7b7af9c4eb31afe
ethevenot
parents:
diff
changeset
|
17 |
09799fc16bc6
planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 2c0d4d97c208edca1ada2035a7b7af9c4eb31afe
ethevenot
parents:
diff
changeset
|
18 testDirC <- "example1" |
09799fc16bc6
planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 2c0d4d97c208edca1ada2035a7b7af9c4eb31afe
ethevenot
parents:
diff
changeset
|
19 argLs <- list(facC = "jour", |
09799fc16bc6
planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 2c0d4d97c208edca1ada2035a7b7af9c4eb31afe
ethevenot
parents:
diff
changeset
|
20 tesC = "wilcoxon", |
09799fc16bc6
planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 2c0d4d97c208edca1ada2035a7b7af9c4eb31afe
ethevenot
parents:
diff
changeset
|
21 adjC = "fdr", |
09799fc16bc6
planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 2c0d4d97c208edca1ada2035a7b7af9c4eb31afe
ethevenot
parents:
diff
changeset
|
22 thrN = "0.05") |
09799fc16bc6
planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 2c0d4d97c208edca1ada2035a7b7af9c4eb31afe
ethevenot
parents:
diff
changeset
|
23 |
09799fc16bc6
planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 2c0d4d97c208edca1ada2035a7b7af9c4eb31afe
ethevenot
parents:
diff
changeset
|
24 argLs <- c(defaultArgF(testDirC), argLs) |
09799fc16bc6
planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 2c0d4d97c208edca1ada2035a7b7af9c4eb31afe
ethevenot
parents:
diff
changeset
|
25 outLs <- wrapperCallF(argLs) |
09799fc16bc6
planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 2c0d4d97c208edca1ada2035a7b7af9c4eb31afe
ethevenot
parents:
diff
changeset
|
26 |
09799fc16bc6
planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 2c0d4d97c208edca1ada2035a7b7af9c4eb31afe
ethevenot
parents:
diff
changeset
|
27 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
|
28 |
09799fc16bc6
planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 2c0d4d97c208edca1ada2035a7b7af9c4eb31afe
ethevenot
parents:
diff
changeset
|
29 } |
09799fc16bc6
planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 2c0d4d97c208edca1ada2035a7b7af9c4eb31afe
ethevenot
parents:
diff
changeset
|
30 |
09799fc16bc6
planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 2c0d4d97c208edca1ada2035a7b7af9c4eb31afe
ethevenot
parents:
diff
changeset
|
31 test_example1_ttestFdr <- function() { |
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 testDirC <- "example1" |
09799fc16bc6
planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 2c0d4d97c208edca1ada2035a7b7af9c4eb31afe
ethevenot
parents:
diff
changeset
|
34 argLs <- list(facC = "jour", |
09799fc16bc6
planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 2c0d4d97c208edca1ada2035a7b7af9c4eb31afe
ethevenot
parents:
diff
changeset
|
35 tesC = "ttest", |
09799fc16bc6
planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 2c0d4d97c208edca1ada2035a7b7af9c4eb31afe
ethevenot
parents:
diff
changeset
|
36 adjC = "fdr", |
09799fc16bc6
planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 2c0d4d97c208edca1ada2035a7b7af9c4eb31afe
ethevenot
parents:
diff
changeset
|
37 thrN = "0.05") |
09799fc16bc6
planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 2c0d4d97c208edca1ada2035a7b7af9c4eb31afe
ethevenot
parents:
diff
changeset
|
38 |
09799fc16bc6
planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 2c0d4d97c208edca1ada2035a7b7af9c4eb31afe
ethevenot
parents:
diff
changeset
|
39 argLs <- c(defaultArgF(testDirC), argLs) |
09799fc16bc6
planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 2c0d4d97c208edca1ada2035a7b7af9c4eb31afe
ethevenot
parents:
diff
changeset
|
40 outLs <- wrapperCallF(argLs) |
09799fc16bc6
planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 2c0d4d97c208edca1ada2035a7b7af9c4eb31afe
ethevenot
parents:
diff
changeset
|
41 |
09799fc16bc6
planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 2c0d4d97c208edca1ada2035a7b7af9c4eb31afe
ethevenot
parents:
diff
changeset
|
42 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
|
43 |
09799fc16bc6
planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 2c0d4d97c208edca1ada2035a7b7af9c4eb31afe
ethevenot
parents:
diff
changeset
|
44 } |