changeset 9:35b9bb3205d8 draft

planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 1444e7c7ebd2bb5bdadede71c60a39f560721a98
author lecorguille
date Mon, 05 Mar 2018 09:31:22 -0500
parents 6b5504f877ff
children 47e953d9da82
files xcms_merge.r
diffstat 1 files changed, 10 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/xcms_merge.r	Mon Mar 05 04:16:12 2018 -0500
+++ b/xcms_merge.r	Mon Mar 05 09:31:22 2018 -0500
@@ -10,19 +10,21 @@
 
 args <- parseCommandArgs(evaluate=FALSE) #interpretation of arguments given in command line as an R list of objects
 
-# Handle infiles
-if (!exists("singlefile")) singlefile <- NULL
-if (!exists("zipfile")) zipfile <- NULL
-rawFilePath <- getRawfilePathFromArguments(singlefile, zipfile, args)
-zipfile <- rawFilePath$zipfile
-singlefile <- rawFilePath$singlefile
-args <- rawFilePath$args
-directory <- retrieveRawfileInTheWorkingDirectory(singlefile, zipfile)
 
 cat("\tXSET MERGING...\n")
 
 for(image in args$images) {
     load(image)
+
+    # Handle infiles
+    if (!exists("singlefile")) singlefile <- NULL
+    if (!exists("zipfile")) zipfile <- NULL
+    rawFilePath <- getRawfilePathFromArguments(singlefile, zipfile, args)
+    zipfile <- rawFilePath$zipfile
+    singlefile <- rawFilePath$singlefile
+    args <- rawFilePath$args
+    directory <- retrieveRawfileInTheWorkingDirectory(singlefile, zipfile)
+    
     if (!exists("xdata")) stop("\n\nERROR: The RData doesn't contain any object called 'xdata'. This RData should have been created by an old version of XMCS 2.*")
     cat(sampleNamesList$sampleNamesOrigin,"\n")
     if (!exists("xdata_merged")) {