Mercurial > repos > ethevenot > univariate
comparison 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 |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:ab2ee3414e4e |
|---|---|
| 1 test_input_anova <- function() { | |
| 2 | |
| 3 testDirC <- "input" | |
| 4 argLs <- list(facC = "qual", | |
| 5 tesC = "anova", | |
| 6 adjC = "fdr", | |
| 7 thrN = "0.05") | |
| 8 | |
| 9 argLs <- c(defaultArgF(testDirC), argLs) | |
| 10 outLs <- wrapperCallF(argLs) | |
| 11 | |
| 12 checkEqualsNumeric(outLs[["varDF"]]["v6", "qual_anova_fdr"], 1.924156e-03, tolerance = 1e-6) | |
| 13 | |
| 14 checkEqualsNumeric(outLs[["varDF"]]["v4", "qual_anova_D.C_fdr"], 0.01102016, tolerance = 1e-6) | |
| 15 | |
| 16 } | |
| 17 | |
| 18 test_input_kruskal <- function() { | |
| 19 | |
| 20 testDirC <- "input" | |
| 21 argLs <- list(facC = "qual", | |
| 22 tesC = "kruskal", | |
| 23 adjC = "fdr", | |
| 24 thrN = "0.05") | |
| 25 | |
| 26 argLs <- c(defaultArgF(testDirC), argLs) | |
| 27 outLs <- wrapperCallF(argLs) | |
| 28 | |
| 29 checkEqualsNumeric(outLs[["varDF"]]["v4", "qual_kruskal_fdr"], 0.0008194662, tolerance = 1e-7) | |
| 30 | |
| 31 checkEqualsNumeric(outLs[["varDF"]]["v6", "qual_kruskal_D.A_fdr"], 0.002945952, tolerance = 1e-7) | |
| 32 | |
| 33 } | |
| 34 | |
| 35 test_example1_wilcoxDif <- function() { | |
| 36 | |
| 37 testDirC <- "example1" | |
| 38 argLs <- list(facC = "jour", | |
| 39 tesC = "wilcoxon", | |
| 40 adjC = "fdr", | |
| 41 thrN = "0.05") | |
| 42 | |
| 43 argLs <- c(defaultArgF(testDirC), argLs) | |
| 44 outLs <- wrapperCallF(argLs) | |
| 45 | |
| 46 checkEqualsNumeric(outLs[["varDF"]]["MT3", "jour_wilcoxon_J3.J10_dif"], 0.216480042, tolerance = 1e-8) | |
| 47 | |
| 48 } | |
| 49 | |
| 50 test_example1_ttestFdr <- function() { | |
| 51 | |
| 52 testDirC <- "example1" | |
| 53 argLs <- list(facC = "jour", | |
| 54 tesC = "ttest", | |
| 55 adjC = "fdr", | |
| 56 thrN = "0.05") | |
| 57 | |
| 58 argLs <- c(defaultArgF(testDirC), argLs) | |
| 59 outLs <- wrapperCallF(argLs) | |
| 60 | |
| 61 checkEqualsNumeric(outLs[["varDF"]]["MT3", "jour_ttest_J3.J10_fdr"], 0.7605966, tolerance = 1e-6) | |
| 62 | |
| 63 } |
