Mercurial > repos > eschen42 > w4mclstrpeakpics
annotate w4mclstrpeakpics_wrapper.R @ 3:f1f384d9a96d draft default tip
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit ce10bce6cce0a020167f9cf8974fc369eac1228b
author | eschen42 |
---|---|
date | Tue, 20 Jun 2017 03:50:37 -0400 |
parents | 17356c5fe43e |
children |
rev | line source |
---|---|
0
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
1 #!/usr/bin/env Rscript |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
2 |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
3 library(batch) ## parseCommandArgs |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
4 |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
5 ######## |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
6 # MAIN # |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
7 ######## |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
8 |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
9 argVc <- unlist(parseCommandArgs(evaluate=FALSE)) |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
10 |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
11 ##------------------------------ |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
12 ## Initializing |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
13 ##------------------------------ |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
14 |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
15 ## options |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
16 ##-------- |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
17 |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
18 strAsFacL <- options()$stringsAsFactors |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
19 options(stringsAsFactors = FALSE) |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
20 |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
21 ## libraries |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
22 ##---------- |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
23 |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
24 # begin HACK - suppress " Can't find a usable init.tcl ... probably means that Tcl wasn't installed properly" issue |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
25 library("gsubfn") |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
26 options(gsubfn.engine = "R") |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
27 # end HACK |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
28 |
1
17356c5fe43e
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit b39d3965e8a129c2e03ee3c1d10469f382b20bcc
eschen42
parents:
0
diff
changeset
|
29 #r_package_archive <- as.character(argVc["r_package_archive"]) |
17356c5fe43e
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit b39d3965e8a129c2e03ee3c1d10469f382b20bcc
eschen42
parents:
0
diff
changeset
|
30 #install.packages(r_package_archive, repos = NULL, type = "source") |
0
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
31 suppressMessages( library("w4mclstrpeakpics") ) |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
32 |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
33 ## constants |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
34 ##---------- |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
35 |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
36 modNamC <- "w4mclsltrpeakpics" ## module name |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
37 |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
38 topEnvC <- environment() |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
39 flgC <- "\n" |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
40 |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
41 ## functions |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
42 ##---------- |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
43 |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
44 |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
45 ## log file |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
46 ##--------- |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
47 |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
48 my_print <- function(x, ...) { cat(c(x, ...))} |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
49 |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
50 my_print("\nStart of the '", modNamC, "' Galaxy module call: ", |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
51 format(Sys.time(), "%a %d %b %Y %X"), "\n", sep="") |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
52 |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
53 ## arguments |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
54 ##---------- |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
55 |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
56 # files |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
57 |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
58 output_pdf <- as.character(argVc["output_pdf"]) |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
59 output_tsv <- as.character(argVc["output_tsv"]) |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
60 output_rdata <- as.character(argVc["output_rdata"]) |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
61 data_matrix_path <- as.character(argVc["data_matrix_path"]) |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
62 variable_metadata_path <- as.character(argVc["variable_metadata_path"]) |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
63 sample_metadata_path <- as.character(argVc["sample_metadata_path"]) |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
64 |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
65 # other parameters |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
66 |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
67 sample_selector_column_name <- as.character(argVc["sample_selector_column_name"]) |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
68 sample_selector_value <- as.character(argVc["sample_selector_value"]) |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
69 |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
70 ##------------------------------ |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
71 ## Computation |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
72 ##------------------------------ |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
73 |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
74 # from 'demo(error.catching)' |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
75 tryCatch.W.E <- function(expr) { |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
76 W <- NULL |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
77 w.handler <- function(w){ |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
78 # warning handler |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
79 W <<- w |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
80 invokeRestart("muffleWarning") |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
81 } |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
82 list( |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
83 value = withCallingHandlers( |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
84 tryCatch(expr, error = function(e) e) |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
85 , warning = w.handler |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
86 ) |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
87 , warning = W |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
88 ) |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
89 } |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
90 |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
91 result <- cluster_peak_assessment( |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
92 sample_selector_column_name = sample_selector_column_name |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
93 , sample_selector_value = sample_selector_value |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
94 , sample_metadata_path = sample_metadata_path |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
95 , variable_metadata_path = variable_metadata_path |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
96 , data_matrix_path = data_matrix_path |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
97 , output_pdf = output_pdf |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
98 , output_tsv = output_tsv |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
99 , output_rdata = output_rdata |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
100 , failure_action = my_print |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
101 ) |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
102 |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
103 |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
104 my_print("\nResult of '", modNamC, "' Galaxy module call to 'w4mclassfilter::w4m_filter_by_sample_class' R function: ", |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
105 as.character(result), "\n", sep = "") |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
106 |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
107 ##-------- |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
108 ## Closing |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
109 ##-------- |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
110 |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
111 my_print("\nEnd of '", modNamC, "' Galaxy module call: ", |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
112 as.character(Sys.time()), "\n", sep = "") |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
113 |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
114 #sink() |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
115 |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
116 if (!file.exists(output_pdf)) { |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
117 print(sprintf("ERROR %s::w4m_filter_by_sample_class - file '%s' was not created", modNamC, output_pdf)) |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
118 } |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
119 |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
120 if (!file.exists(output_tsv)) { |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
121 print(sprintf("ERROR %s::w4m_filter_by_sample_class - file '%s' was not created", modNamC, output_tsv)) |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
122 } |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
123 |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
124 if (!file.exists(output_rdata)) { |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
125 print(sprintf("ERROR %s::w4m_filter_by_sample_class - file '%s' was not created", modNamC, output_rdata)) |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
126 } |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
127 |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
128 # 'stop' causes Rscript to return a non-zero exit code |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
129 if( !result ) { |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
130 stop(sprintf("ERROR %s::w4m_filter_by_sample_class - method failed", modNamC)) |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
131 } |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
132 |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
133 # exit with status code zero |
caf0ce49b638
planemo upload for repository https://github.com/HegemanLab/w4mclstrpeakpics_galaxy_wrapper/tree/master commit 7ff527179eab946dd860be6b6a3e2c01b77d7dee
eschen42
parents:
diff
changeset
|
134 q(save = "no", status = 0, runLast = FALSE) |