annotate runit/profia_runtests.R @ 0:39ccace77270 draft

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