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