Mercurial > repos > lecorguille > xcms_group
diff xcms_group.r @ 32:68282292acc4 draft
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit f01148783819c37e474790dbd56619862960448a
author | lecorguille |
---|---|
date | Tue, 03 Apr 2018 11:39:07 -0400 |
parents | 020d065edd9e |
children | 59943e24684b |
line wrap: on
line diff
--- a/xcms_group.r Thu Mar 08 05:53:40 2018 -0500 +++ b/xcms_group.r Tue Apr 03 11:39:07 2018 -0400 @@ -29,20 +29,12 @@ cat("\tARGUMENTS PROCESSING INFO\n") #saving the specific parameters -method <- args$method; args$method <- NULL +method <- args$method -if (!is.null(args$convertRTMinute)){ - convertRTMinute <- args$convertRTMinute; args$convertRTMinute <- NULL -} -if (!is.null(args$numDigitsMZ)){ - numDigitsMZ <- args$numDigitsMZ; args$numDigitsMZ <- NULL -} -if (!is.null(args$numDigitsRT)){ - numDigitsRT <- args$numDigitsRT; args$numDigitsRT <- NULL -} -if (!is.null(args$intval)){ - intval <- args$intval; args$intval <- NULL -} +if (!is.null(args$convertRTMinute)) convertRTMinute <- args$convertRTMinute +if (!is.null(args$numDigitsMZ)) numDigitsMZ <- args$numDigitsMZ +if (!is.null(args$numDigitsRT)) numDigitsRT <- args$numDigitsRT +if (!is.null(args$intval)) intval <- args$intval cat("\n\n") @@ -51,7 +43,7 @@ cat("\tINFILE PROCESSING INFO\n") #image is an .RData file necessary to use xset variable given by previous tools -load(args$image); args$image=NULL +load(args$image) 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.*") # Handle infiles @@ -60,7 +52,6 @@ rawFilePath <- getRawfilePathFromArguments(singlefile, zipfile, args) zipfile <- rawFilePath$zipfile singlefile <- rawFilePath$singlefile -args <- rawFilePath$args directory <- retrieveRawfileInTheWorkingDirectory(singlefile, zipfile) # Check some character issues @@ -81,6 +72,10 @@ cat("\t\t\tPerform the correspondence\n") args$sampleGroups = xdata$sample_group + +# clear the arguement list to remove unexpected key/value as singlefile_galaxyPath or method ... +args <- args[names(args) %in% slotNames(do.call(paste0(method,"Param"), list(sampleGroups=c(1,2))))] + groupChromPeaksParam <- do.call(paste0(method,"Param"), args) print(groupChromPeaksParam) xdata <- groupChromPeaks(xdata, param = groupChromPeaksParam)