diff xcms_xcmsSet.r @ 30:14b1c52fae62 draft

"planemo upload for repository https://github.com/workflow4metabolomics/xcms commit f1caf2a3bf23cf319a75dd12c86402555dd02617"
author workflow4metabolomics
date Wed, 12 Feb 2020 08:30:58 -0500
parents 9eebe9690ced
children eb15a3841da4
line wrap: on
line diff
--- a/xcms_xcmsSet.r	Tue Jan 07 08:16:02 2020 -0500
+++ b/xcms_xcmsSet.r	Wed Feb 12 08:30:58 2020 -0500
@@ -59,12 +59,9 @@
 if (!exists("raw_data")) stop("\n\nERROR: The RData doesn't contain any object called 'raw_data' which is provided by the tool: MSnbase readMSData")
 
 # Handle infiles
-if (!exists("singlefile")) singlefile <- NULL
-if (!exists("zipfile")) zipfile <- NULL
-rawFilePath <- getRawfilePathFromArguments(singlefile, zipfile, args)
+rawFilePath <- retrieveRawfileInTheWorkingDirectory(singlefile, zipfile, args)
 zipfile <- rawFilePath$zipfile
 singlefile <- rawFilePath$singlefile
-directory <- retrieveRawfileInTheWorkingDirectory(singlefile, zipfile)
 
 
 cat("\n\n")
@@ -76,9 +73,6 @@
 
 cat("\t\tCOMPUTE\n")
 
-## Get the full path to the files
-files <- getMSFiles(directory)
-
 cat("\t\t\tApply filter[s] (if asked)\n")
 if (exists("filterAcquisitionNumParam"))  raw_data <- filterAcquisitionNum(raw_data, filterAcquisitionNumParam[1]:filterAcquisitionNumParam[2])
 if (exists("filterRtParam")) raw_data <- filterRt(raw_data, filterRtParam)
@@ -99,9 +93,6 @@
 # Check if there are no peaks
 if (nrow(chromPeaks(xdata)) == 0) stop("No peaks were detected. You should review your settings")
 
-# Transform the files absolute pathways into relative pathways
-xdata@processingData@files <- sub(paste(getwd(), "/", sep="") , "", xdata@processingData@files)
-
 # Create a sampleMetada file
 sampleNamesList <- getSampleMetadata(xdata=xdata, sampleMetadataOutput="sampleMetadata.tsv")