Mercurial > repos > ethevenot > qualitymetrics
annotate runit/qualitymetrics_runtests.R @ 0:b4f5b5bc01dd draft
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
author | ethevenot |
---|---|
date | Sat, 06 Aug 2016 12:01:17 -0400 |
parents | |
children |
rev | line source |
---|---|
0
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
1 #!/usr/bin/env Rscript |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
2 |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
3 ## Package |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
4 ##-------- |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
5 |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
6 library(RUnit) |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
7 |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
8 ## Constants |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
9 ##---------- |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
10 |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
11 testOutDirC <- "output" |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
12 argVc <- commandArgs(trailingOnly = FALSE) |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
13 scriptPathC <- sub("--file=", "", argVc[grep("--file=", argVc)]) |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
14 |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
15 |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
16 ## Functions |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
17 ##----------- |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
18 |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
19 ## Reading tables (matrix or data frame) |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
20 readTableF <- function(fileC, typeC = c("matrix", "dataframe")[1]) { |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
21 |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
22 file.exists(fileC) || stop(paste0("No output file \"", fileC ,"\".")) |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
23 |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
24 switch(typeC, |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
25 matrix = return(t(as.matrix(read.table(file = fileC, |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
26 header = TRUE, |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
27 row.names = 1, |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
28 sep = "\t", |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
29 stringsAsFactors = FALSE)))), |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
30 dataframe = return(read.table(file = fileC, |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
31 header = TRUE, |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
32 row.names = 1, |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
33 sep = "\t", |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
34 stringsAsFactors = FALSE))) |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
35 |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
36 } |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
37 |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
38 ## Call wrapper |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
39 wrapperCallF <- function(paramLs) { |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
40 |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
41 ## Set program path |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
42 wrapperPathC <- file.path(dirname(scriptPathC), "..", "qualitymetrics_wrapper.R") |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
43 |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
44 ## Set arguments |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
45 argLs <- NULL |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
46 for (parC in names(paramLs)) |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
47 argLs <- c(argLs, parC, paramLs[[parC]]) |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
48 |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
49 ## Call |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
50 wrapperCallC <- paste(c(wrapperPathC, argLs), collapse = " ") |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
51 |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
52 if(.Platform$OS.type == "windows") |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
53 wrapperCallC <- paste("Rscript", wrapperCallC) |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
54 |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
55 wrapperCodeN <- system(wrapperCallC) |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
56 |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
57 if (wrapperCodeN != 0) |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
58 stop("Error when running qualitymetrics_wrapper.R.") |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
59 |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
60 ## Get output |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
61 outLs <- list() |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
62 if ("dataMatrix_out" %in% names(paramLs)) |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
63 outLs[["datMN"]] <- readTableF(paramLs[["dataMatrix_out"]], "matrix") |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
64 if ("sampleMetadata_out" %in% names(paramLs)) |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
65 outLs[["samDF"]] <- readTableF(paramLs[["sampleMetadata_out"]], "dataframe") |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
66 if ("variableMetadata_out" %in% names(paramLs)) |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
67 outLs[["varDF"]] <- readTableF(paramLs[["variableMetadata_out"]], "dataframe") |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
68 if("information" %in% names(paramLs)) |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
69 outLs[["infVc"]] <- readLines(paramLs[["information"]]) |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
70 |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
71 return(outLs) |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
72 } |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
73 |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
74 ## Setting default parameters |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
75 defaultArgF <- function(testInDirC) { |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
76 |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
77 defaultArgLs <- list() |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
78 if(file.exists(file.path(dirname(scriptPathC), testInDirC, "dataMatrix.tsv"))) |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
79 defaultArgLs[["dataMatrix_in"]] <- file.path(dirname(scriptPathC), testInDirC, "dataMatrix.tsv") |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
80 if(file.exists(file.path(dirname(scriptPathC), testInDirC, "sampleMetadata.tsv"))) |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
81 defaultArgLs[["sampleMetadata_in"]] <- file.path(dirname(scriptPathC), testInDirC, "sampleMetadata.tsv") |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
82 if(file.exists(file.path(dirname(scriptPathC), testInDirC, "variableMetadata.tsv"))) |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
83 defaultArgLs[["variableMetadata_in"]] <- file.path(dirname(scriptPathC), testInDirC, "variableMetadata.tsv") |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
84 |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
85 defaultArgLs[["sampleMetadata_out"]] <- file.path(dirname(scriptPathC), testOutDirC, "sampleMetadata.tsv") |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
86 defaultArgLs[["variableMetadata_out"]] <- file.path(dirname(scriptPathC), testOutDirC, "variableMetadata.tsv") |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
87 defaultArgLs[["figure"]] <- file.path(dirname(scriptPathC), testOutDirC, "figure.pdf") |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
88 defaultArgLs[["information"]] <- file.path(dirname(scriptPathC), testOutDirC, "information.txt") |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
89 |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
90 defaultArgLs |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
91 |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
92 } |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
93 |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
94 ## Main |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
95 ##----- |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
96 |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
97 ## Create output folder |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
98 file.exists(testOutDirC) || dir.create(testOutDirC) |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
99 |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
100 ## Run tests |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
101 test.suite <- defineTestSuite('tests', dirname(scriptPathC), testFileRegexp = paste0('^.*_tests\\.R$'), testFuncRegexp = '^.*$') |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
102 isValidTestSuite(test.suite) |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
103 test.results <- runTestSuite(test.suite) |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
104 print(test.results) |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
105 |
b4f5b5bc01dd
planemo upload for repository https://github.com/workflow4metabolomics/qualitymetrics.git commit 73366dd3473c509341ab9ba1df8ba748d08a50a1
ethevenot
parents:
diff
changeset
|
106 |