diff normalization_galaxy.R @ 0:79f00bc83ecc draft default tip

planemo upload commit a2411926bebc2ca3bb31215899a9f18a67e59556
author vmarcon
date Thu, 18 Jan 2018 06:20:30 -0500
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/normalization_galaxy.R	Thu Jan 18 06:20:30 2018 -0500
@@ -0,0 +1,45 @@
+#!/usr/local/bioinfo/bin/Rscript --vanilla --slave --no-site-file
+
+# R Script making the bridge between Galaxy and the call of the normalization method 
+#-----------------------------------------------------------------
+# Authors : luc.jouneau(at)inra.fr
+#           valentin.marcon(at)inra.fr
+# Version : 0.9
+# Date    : 30/08/2017
+#---------------------------------------------------------------
+
+##------------------------------
+## Options
+##------------------------------
+strAsFacL <- options()$stringsAsFactors
+options(stringsAsFactors = FALSE)
+
+##------------------------------
+## Libraries laoding
+##------------------------------
+# For parseCommandArgs function
+library(batch) 
+
+# R script call
+source_local <- function(fname)
+{
+	argv <- commandArgs(trailingOnly = FALSE)
+	base_dir <- dirname(substring(argv[grep("--file=", argv)], 8))
+	source(paste(base_dir, fname, sep="/"))
+}
+
+#Import the different functions used for Normalization
+source_local("normalization.R")
+
+##------------------------------
+## Lecture parametres
+##------------------------------
+argLs <- parseCommandArgs(evaluate=FALSE)
+
+normalization(input_file=argLs[["input_file"]],
+    transformation_method=argLs[["transformation_method"]],
+    na_encoding=argLs[["na_encoding"]],
+    output_file=argLs[["output_file"]],
+    log_file=argLs[["log_file"]],
+    variable_in_line=argLs[["variable_in_line"]])
+