Mercurial > repos > eschen42 > w4mclassfilter
annotate w4mclassfilter_wrapper.R @ 2:23c6d271def9 draft
planemo upload
author | eschen42 |
---|---|
date | Wed, 10 May 2017 02:51:58 -0400 |
parents | bab3a658f74e |
children | 499c7ecfa834 |
rev | line source |
---|---|
0
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
1 #!/usr/bin/env Rscript |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
2 |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
3 library(batch) ## parseCommandArgs |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
4 |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
5 ######## |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
6 # MAIN # |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
7 ######## |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
8 |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
9 argVc <- unlist(parseCommandArgs(evaluate=FALSE)) |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
10 |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
11 ##------------------------------ |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
12 ## Initializing |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
13 ##------------------------------ |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
14 |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
15 ## options |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
16 ##-------- |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
17 |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
18 strAsFacL <- options()$stringsAsFactors |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
19 options(stringsAsFactors = FALSE) |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
20 |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
21 ## libraries |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
22 ##---------- |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
23 |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
24 suppressMessages(library(w4mclassfilter)) |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
25 |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
26 if(packageVersion("w4mclassfilter") < "0.98.0") |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
27 stop("Please use 'w4mclassfilter' versions of 0.98.0 and above") |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
28 |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
29 ## constants |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
30 ##---------- |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
31 |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
32 modNamC <- "w4mclassfilter" ## module name |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
33 |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
34 topEnvC <- environment() |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
35 flgC <- "\n" |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
36 |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
37 ## functions |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
38 ##---------- |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
39 |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
40 flgF <- function(tesC, |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
41 envC = topEnvC, |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
42 txtC = NA) { ## management of warning and error messages |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
43 |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
44 tesL <- eval(parse(text = tesC), envir = envC) |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
45 |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
46 if(!tesL) { |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
47 |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
48 #sink(NULL) |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
49 stpTxtC <- ifelse(is.na(txtC), |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
50 paste0(tesC, " is FALSE"), |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
51 txtC) |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
52 |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
53 stop(stpTxtC, |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
54 call. = FALSE) |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
55 |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
56 } |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
57 |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
58 } ## flgF |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
59 |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
60 |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
61 ## log file |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
62 ##--------- |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
63 |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
64 my_print <- function(x, ...) { cat(c(x, ...))} |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
65 |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
66 my_print("\nStart of the '", modNamC, "' Galaxy module call: ", |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
67 format(Sys.time(), "%a %d %b %Y %X"), "\n", sep="") |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
68 |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
69 ## arguments |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
70 ##---------- |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
71 |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
72 # files |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
73 |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
74 dataMatrix_in <- as.character(argVc["dataMatrix_in"]) |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
75 dataMatrix_out <- as.character(argVc["dataMatrix_out"]) |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
76 |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
77 sampleMetadata_in <- as.character(argVc["sampleMetadata_in"]) |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
78 sampleMetadata_out <- as.character(argVc["sampleMetadata_out"]) |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
79 |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
80 variableMetadata_in <- as.character(argVc["variableMetadata_in"]) |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
81 variableMetadata_out <- as.character(argVc["variableMetadata_out"]) |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
82 |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
83 # other parameters |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
84 |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
85 sampleclassNames <- as.character(argVc["sampleclassNames"]) |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
86 # if (sampleclassNames == "NONE_SPECIFIED") { |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
87 # sampleclassNames <- as.character(c()) |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
88 # |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
89 # } else { |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
90 # sampleclassNames <- strsplit(x = sampleclassNames, split = ",", fixed = TRUE)[[1]] |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
91 # } |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
92 sampleclassNames <- strsplit(x = sampleclassNames, split = ",", fixed = TRUE)[[1]] |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
93 inclusive <- as.logical(argVc["inclusive"]) |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
94 # print(sprintf("inclusive = '%s'", as.character(inclusive))) |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
95 classnameColumn <- as.character(argVc["classnameColumn"]) |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
96 samplenameColumn <- as.character(argVc["samplenameColumn"]) |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
97 |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
98 ##------------------------------ |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
99 ## Computation |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
100 ##------------------------------ |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
101 |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
102 result <- w4m_filter_by_sample_class( |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
103 dataMatrix_in = dataMatrix_in |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
104 , sampleMetadata_in = sampleMetadata_in |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
105 , variableMetadata_in = variableMetadata_in |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
106 , dataMatrix_out = dataMatrix_out |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
107 , sampleMetadata_out = sampleMetadata_out |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
108 , variableMetadata_out = variableMetadata_out |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
109 , classes = sampleclassNames |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
110 , include = inclusive |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
111 , class_column = classnameColumn |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
112 , samplename_column = samplenameColumn |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
113 , failure_action = my_print |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
114 ) |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
115 |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
116 my_print("\nResult of '", modNamC, "' Galaxy module call to 'w4mclassfilter::w4m_filter_by_sample_class' R function: ", |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
117 as.character(result), "\n", sep = "") |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
118 |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
119 ##-------- |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
120 ## Closing |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
121 ##-------- |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
122 |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
123 my_print("\nEnd of '", modNamC, "' Galaxy module call: ", |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
124 as.character(Sys.time()), "\n", sep = "") |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
125 |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
126 #sink() |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
127 |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
128 if (!file.exists(dataMatrix_out)) { |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
129 print(sprintf("ERROR %s::w4m_filter_by_sample_class - file '%s' was not created", modNamC, dataMatrix_out)) |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
130 }# else { print(sprintf("INFO %s::w4m_filter_by_sample_class - file '%s' was exists", modNamC, dataMatrix_out)) } |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
131 |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
132 if (!file.exists(variableMetadata_out)) { |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
133 print(sprintf("ERROR %s::w4m_filter_by_sample_class - file '%s' was not created", modNamC, variableMetadata_out)) |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
134 } # else { print(sprintf("INFO %s::w4m_filter_by_sample_class - file '%s' was exists", modNamC, variableMetadata_out)) } |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
135 |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
136 if (!file.exists(sampleMetadata_out)) { |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
137 print(sprintf("ERROR %s::w4m_filter_by_sample_class - file '%s' was not created", modNamC, sampleMetadata_out)) |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
138 } # else { print(sprintf("INFO %s::w4m_filter_by_sample_class - file '%s' was exists", modNamC, sampleMetadata_out)) } |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
139 |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
140 if( !result ) { |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
141 stop(sprintf("ERROR %s::w4m_filter_by_sample_class - method failed", modNamC)) |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
142 } |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
143 |
bab3a658f74e
planemo upload commit 91805bf8e8ce26193ffc4cc2f3dca56ce4addf79
eschen42
parents:
diff
changeset
|
144 rm(list = ls()) |