Mercurial > repos > vmarcon > normalization
comparison 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 |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:79f00bc83ecc |
|---|---|
| 1 #!/usr/local/bioinfo/bin/Rscript --vanilla --slave --no-site-file | |
| 2 | |
| 3 # R Script making the bridge between Galaxy and the call of the normalization method | |
| 4 #----------------------------------------------------------------- | |
| 5 # Authors : luc.jouneau(at)inra.fr | |
| 6 # valentin.marcon(at)inra.fr | |
| 7 # Version : 0.9 | |
| 8 # Date : 30/08/2017 | |
| 9 #--------------------------------------------------------------- | |
| 10 | |
| 11 ##------------------------------ | |
| 12 ## Options | |
| 13 ##------------------------------ | |
| 14 strAsFacL <- options()$stringsAsFactors | |
| 15 options(stringsAsFactors = FALSE) | |
| 16 | |
| 17 ##------------------------------ | |
| 18 ## Libraries laoding | |
| 19 ##------------------------------ | |
| 20 # For parseCommandArgs function | |
| 21 library(batch) | |
| 22 | |
| 23 # R script call | |
| 24 source_local <- function(fname) | |
| 25 { | |
| 26 argv <- commandArgs(trailingOnly = FALSE) | |
| 27 base_dir <- dirname(substring(argv[grep("--file=", argv)], 8)) | |
| 28 source(paste(base_dir, fname, sep="/")) | |
| 29 } | |
| 30 | |
| 31 #Import the different functions used for Normalization | |
| 32 source_local("normalization.R") | |
| 33 | |
| 34 ##------------------------------ | |
| 35 ## Lecture parametres | |
| 36 ##------------------------------ | |
| 37 argLs <- parseCommandArgs(evaluate=FALSE) | |
| 38 | |
| 39 normalization(input_file=argLs[["input_file"]], | |
| 40 transformation_method=argLs[["transformation_method"]], | |
| 41 na_encoding=argLs[["na_encoding"]], | |
| 42 output_file=argLs[["output_file"]], | |
| 43 log_file=argLs[["log_file"]], | |
| 44 variable_in_line=argLs[["variable_in_line"]]) | |
| 45 |
