annotate runit/multivariate_runtests.R @ 1:60c360e466a8 draft default tip

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