Mercurial > repos > ethevenot > univariate
diff univariate_wrapper.R @ 4:3017385625f6 draft
planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit a81d4cc1df719dcc66def660927abda74972afaa
author | ethevenot |
---|---|
date | Thu, 11 Jan 2018 10:21:17 -0500 |
parents | 140290de7986 |
children |
line wrap: on
line diff
--- a/univariate_wrapper.R Sun Oct 30 14:17:09 2016 -0400 +++ b/univariate_wrapper.R Thu Jan 11 10:21:17 2018 -0500 @@ -2,6 +2,28 @@ library(batch) ## parseCommandArgs +# Constants +argv <- commandArgs(trailingOnly = FALSE) +script.path <- sub("--file=","",argv[grep("--file=",argv)]) +prog.name <- basename(script.path) + +# Print help +if (length(grep('-h', argv)) >0) { + cat("Usage:", prog.name, + "dataMatrix_in myDataMatrix.tsv", + "sampleMetadata_in mySampleData.tsv", + "variableMetadata_in myVariableMetadata.tsv", + "facC qual", + "tesC kruskal", + "adjC fdr", + "thrN 0.05", + "variableMetadata_out myVariableMetadata_out.tsv", + "figure figure.pdf", + "information information.txt", + "\n") + quit(status = 0) +} + source_local <- function(fname){ argv <- commandArgs(trailingOnly = FALSE) base_dir <- dirname(substring(argv[grep("--file=", argv)], 8)) @@ -146,6 +168,21 @@ cat("\nEnd of '", modNamC, "' Galaxy module call: ", as.character(Sys.time()), "\n", sep = "") +cat("\n\n\n============================================================================") +cat("\nAdditional information about the call:\n") +cat("\n1) Parameters:\n") +print(cbind(value = argVc)) + +cat("\n2) Session Info:\n") +sessioninfo <- sessionInfo() +cat(sessioninfo$R.version$version.string,"\n") +cat("Main packages:\n") +for (pkg in names(sessioninfo$otherPkgs)) { cat(paste(pkg,packageVersion(pkg)),"\t") }; cat("\n") +cat("Other loaded packages:\n") +for (pkg in names(sessioninfo$loadedOnly)) { cat(paste(pkg,packageVersion(pkg)),"\t") }; cat("\n") + +cat("============================================================================\n") + sink() options(stringsAsFactors = strAsFacL)