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