Mercurial > repos > ethevenot > batchcorrection
annotate runit/batchcorrection_tests.R @ 0:b74d1d533dea draft default tip
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
| author | ethevenot | 
|---|---|
| date | Thu, 04 Aug 2016 11:40:35 -0400 | 
| parents | |
| children | 
| rev | line source | 
|---|---|
| 
0
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
1 test_input_allLoessPool <- function() { | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
2 | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
3 testDirC <- "input" | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
4 determineL <- FALSE | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
5 allLoessL <- TRUE | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
6 argLs <- list(method = "all_loess_pool", | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
7 span = "1") | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
8 | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
9 if(!allLoessL) | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
10 argLs[["analyse"]] <- ifelse(determineL, "determine_bc", "batch_correction") | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
11 | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
12 argLs <- c(defaultArgF(testDirC, determineL = determineL), argLs) | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
13 outLs <- wrapperCallF(argLs, allLoessL = allLoessL) | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
14 | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
15 checkEqualsNumeric(outLs[['datMN']][1, 1], 25803076, tolerance = 1e-3) | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
16 | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
17 } | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
18 | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
19 test_input_allLoessSample <- function() { | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
20 | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
21 testDirC <- "input" | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
22 determineL <- FALSE | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
23 allLoessL <- TRUE | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
24 argLs <- list(method = "all_loess_sample", | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
25 span = "1") | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
26 | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
27 if(!allLoessL) | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
28 argLs[["analyse"]] <- ifelse(determineL, "determine_bc", "batch_correction") | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
29 | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
30 argLs <- c(defaultArgF(testDirC, determineL = determineL), argLs) | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
31 outLs <- wrapperCallF(argLs, allLoessL = allLoessL) | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
32 | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
33 checkEqualsNumeric(outLs[['datMN']][1, 1], 23402048, tolerance = 1e-3) | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
34 | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
35 } | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
36 | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
37 test_example1_allLoessSample <- function() { | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
38 | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
39 testDirC <- "example1" | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
40 determineL <- FALSE | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
41 allLoessL <- TRUE | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
42 argLs <- list(method = "all_loess_sample", | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
43 span = "1") | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
44 | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
45 if(!allLoessL) | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
46 argLs[["analyse"]] <- ifelse(determineL, "determine_bc", "batch_correction") | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
47 | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
48 argLs <- c(defaultArgF(testDirC, determineL = determineL), argLs) | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
49 outLs <- wrapperCallF(argLs, allLoessL = allLoessL) | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
50 | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
51 checkEqualsNumeric(outLs[['datMN']][1, 1], 21732604, tolerance = 1e-3) | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
52 | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
53 } | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
54 | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
55 test_example1_allLoessSampleSpan06 <- function() { | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
56 | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
57 testDirC <- "example1" | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
58 determineL <- FALSE | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
59 allLoessL <- TRUE | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
60 argLs <- list(method = "all_loess_sample", | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
61 span = "0.6") | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
62 | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
63 if(!allLoessL) | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
64 argLs[["analyse"]] <- ifelse(determineL, "determine_bc", "batch_correction") | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
65 | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
66 argLs <- c(defaultArgF(testDirC, determineL = determineL), argLs) | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
67 outLs <- wrapperCallF(argLs, allLoessL = allLoessL) | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
68 | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
69 checkEqualsNumeric(outLs[['datMN']][1, 1], 134619170, tolerance = 1e-3) | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
70 | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
71 } | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
72 | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
73 test_sacurine_allLoessPool <- function() { | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
74 | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
75 testDirC <- "sacurine" | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
76 determineL <- FALSE | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
77 allLoessL <- TRUE | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
78 argLs <- list(method = "all_loess_pool", | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
79 span = "1") | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
80 | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
81 if(!allLoessL) | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
82 argLs[["analyse"]] <- ifelse(determineL, "determine_bc", "batch_correction") | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
83 | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
84 argLs <- c(defaultArgF(testDirC, determineL = determineL), argLs) | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
85 outLs <- wrapperCallF(argLs, allLoessL = allLoessL) | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
86 | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
87 checkEqualsNumeric(outLs[['datMN']]["HU_neg_017", "M53T345"], 7902.366, tolerance = 1e-3) | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
88 | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
89 | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
90 } | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
91 | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
92 test_sacurine_determinebc <- function() { | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
93 | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
94 testDirC <- "sacurine" | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
95 determineL <- TRUE | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
96 allLoessL <- FALSE | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
97 argLs <- list(ref_factor = "batch", | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
98 span = "none") | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
99 | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
100 if(!allLoessL) | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
101 argLs[["analyse"]] <- ifelse(determineL, "determine_bc", "batch_correction") | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
102 | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
103 argLs <- c(defaultArgF(testDirC, determineL = determineL), argLs) | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
104 outLs <- wrapperCallF(argLs, allLoessL = allLoessL) | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
105 | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
106 checkEqualsNumeric(outLs[['sumDF']]["M59T62", "batch.2.linear"], 3, tolerance = 1e-3) | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
107 | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
108 | 
| 
 
b74d1d533dea
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit 241fb99a843e13195c5054cd9731e1561f039bde
 
ethevenot 
parents:  
diff
changeset
 | 
109 } | 
