diff xcms.r @ 27:30410a052ab3 draft

planemo upload for repository https://github.com/workflow4metabolomics/xcms commit bff1445c9b00ccdbe05ee3dc6ed24221033384b9
author lecorguille
date Tue, 24 Oct 2017 11:47:49 -0400
parents b8be2b25957d
children c013ed353a2f
line wrap: on
line diff
--- a/xcms.r	Mon Apr 03 07:52:52 2017 -0400
+++ b/xcms.r	Tue Oct 24 11:47:49 2017 -0400
@@ -13,7 +13,7 @@
 # ----- PACKAGE -----
 cat("\tPACKAGE INFO\n")
 #pkgs=c("xcms","batch")
-pkgs=c("parallel","BiocGenerics", "Biobase", "Rcpp", "mzR", "xcms","snow","batch")
+pkgs=c("tools","parallel","BiocGenerics", "Biobase", "Rcpp", "mzR", "xcms","snow","batch")
 for(pkg in pkgs) {
     suppressPackageStartupMessages( stopifnot( library(pkg, quietly=TRUE, logical.return=TRUE, character.only=TRUE)))
     cat(pkg,"\t",as.character(packageVersion(pkg)),"\n",sep="")
@@ -65,10 +65,6 @@
 }
 
 #saving the specific parameters
-rplotspdf = "Rplots.pdf"
-if (!is.null(listArguments[["rplotspdf"]])){
-    rplotspdf = listArguments[["rplotspdf"]]; listArguments[["rplotspdf"]]=NULL
-}
 sampleMetadataOutput = "sampleMetadata.tsv"
 if (!is.null(listArguments[["sampleMetadataOutput"]])){
     sampleMetadataOutput = listArguments[["sampleMetadataOutput"]]; listArguments[["sampleMetadataOutput"]]=NULL
@@ -94,11 +90,6 @@
     intval = listArguments[["intval"]]; listArguments[["intval"]]=NULL
 }
 
-if (thefunction %in% c("xcmsSet","retcor")) {
-    ticspdf = listArguments[["ticspdf"]]; listArguments[["ticspdf"]]=NULL
-    bicspdf = listArguments[["bicspdf"]]; listArguments[["bicspdf"]]=NULL
-}
-
 
 if (thefunction %in% c("xcmsSet","retcor","fillPeaks"))  {
     if (!exists("singlefile")) singlefile=NULL
@@ -147,7 +138,7 @@
 
 #change the default display settings
 #dev.new(file="Rplots.pdf", width=16, height=12)
-pdf(file=rplotspdf, width=16, height=12)
+pdf(file="Rplots.pdf", width=16, height=12)
 if (thefunction == "group") {
     par(mfrow=c(2,2))
 }
@@ -197,12 +188,12 @@
 if (thefunction == "xcmsSet") {
     cat("\t\tGET TIC GRAPH\n")
     sampleNamesList = getSampleMetadata(xcmsSet=xset, sampleMetadataOutput=sampleMetadataOutput)
-    getTICs(xcmsSet=xset, pdfname=ticspdf,rt="raw")
-    getBPCs(xcmsSet=xset,rt="raw",pdfname=bicspdf)
+    getTICs(xcmsSet=xset, rt="raw")
+    getBPCs(xcmsSet=xset, rt="raw")
 } else if (thefunction == "retcor") {
     cat("\t\tGET TIC GRAPH\n")
-    getTICs(xcmsSet=xset, pdfname=ticspdf,rt="corrected")
-    getBPCs(xcmsSet=xset,rt="corrected",pdfname=bicspdf)
+    getTICs(xcmsSet=xset, rt="corrected")
+    getBPCs(xcmsSet=xset, rt="corrected")
 }
 
 if ((thefunction == "group" || thefunction == "fillPeaks") && exists("intval")) {