annotate runit/checkformat_runtests.R @ 4:9590fac86f63 draft

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