diff transformation_wrapper.R @ 3:cc0e9eff0de2 draft default tip

planemo upload for repository https://github.com/workflow4metabolomics/transformation.git commit 60ebb3e8919c09c18f89a5362750ae45ca84d0c2
author ethevenot
date Wed, 28 Feb 2018 09:15:47 -0500
parents 0ccfc3e15710
children
line wrap: on
line diff
--- a/transformation_wrapper.R	Tue Jun 06 11:55:21 2017 -0400
+++ b/transformation_wrapper.R	Wed Feb 28 09:15:47 2018 -0500
@@ -2,6 +2,22 @@
 
 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 myDataMatrixInput.tsv",
+	    "method log2|log10|sqrt",
+	    "dataMatrix_out myDataMatrixOutput.tsv",
+	    "information information.txt",
+		"\n")
+	quit(status = 0)
+}
+
 source_local <- function(fname){
     argv <- commandArgs(trailingOnly = FALSE)
     base_dir <- dirname(substring(argv[grep("--file=", argv)], 8))