Mercurial > repos > melpetera > idchoice
diff IDchoice/IDchoice_wrap.R @ 0:931f326198ba draft
Uploaded
| author | melpetera |
|---|---|
| date | Mon, 14 Jan 2019 08:47:08 -0500 |
| parents | |
| children | dfd23f54f61f |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/IDchoice/IDchoice_wrap.R Mon Jan 14 08:47:08 2019 -0500 @@ -0,0 +1,38 @@ +#!/usr/bin/Rscript --vanilla --slave --no-site-file + +################################################################################################ +# WRAPPER FOR IDchoice_script.R (ID CHOICE) # +# # +# Author: Melanie PETERA # +# User: Galaxy # +# Original data: used with IDchoice_script.R # +# Starting date: 01-06-2017 # +# V-1: Firt version of wrapper # +# # +# # +# Input files: dataMatrix ; Metadata file # +# Output files: dataMatrix ; Metadata file # +# # +################################################################################################ + + +library(batch) #necessary for parseCommandArgs function +args = parseCommandArgs(evaluate=FALSE) #interpretation of arguments given in command line as an R list of objects + +source_local <- function(...){ + argv <- commandArgs(trailingOnly = FALSE) + base_dir <- dirname(substring(argv[grep("--file=", argv)], 8)) + for(i in 1:length(list(...))){source(paste(base_dir, list(...)[[i]], sep="/"))} +} +#Import the different functions +source_local("IDchoice_script.R","easyrlibrary-lib/RcheckLibrary.R","easyrlibrary-lib/miniTools.R") + + +if(length(args) < 7){ stop("NOT enough argument !!!") } + + +id.choice(args$dataMatrix_in, args$Metadata_in, args$metatype, args$col_name, args$makeunique, args$DM_out, args$meta_out) + + +#delete the parameters to avoid the passage to the next tool in .RData image +rm(args)
