Repository 'camera_annotate'
hg clone https://toolshed.g2.bx.psu.edu/repos/lecorguille/camera_annotate

Changeset 18:cb923396e70f (2019-08-29)
Previous changeset 17:73d82de36369 (2018-10-09) Next changeset 19:01459b73daf9 (2020-02-13)
Commit message:
planemo upload commit 459ef7f63e313493aca32441bd821f09e36de48c
modified:
README.rst
abims_CAMERA_annotateDiffreport.xml
lib.r
macros.xml
repository_dependencies.xml
added:
CAMERA_annotateDiffreport.r
removed:
CAMERA.r
planemo_test.sh
test-data/.RData
test-data/CMD.mac.sh
test-data/Rplots.pdf
test-data/dataMatrixOutput.txt
b
diff -r 73d82de36369 -r cb923396e70f CAMERA.r
--- a/CAMERA.r Tue Oct 09 06:03:01 2018 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
@@ -1,157 +0,0 @@
-#!/usr/bin/env Rscript
-# CAMERA.r version="2.2.1"
-
-
-
-# ----- PACKAGE -----
-cat("\tSESSION INFO\n")
-
-pkgs=c("CAMERA","multtest","batch")
-for(pkg in pkgs) suppressPackageStartupMessages( stopifnot( library(pkg, quietly=TRUE, logical.return=TRUE, character.only=TRUE)))
-
-sessioninfo = sessionInfo()
-cat(sessioninfo$R.version$version.string,"\n")
-cat("Main packages:\n")
-for (pkg in names(sessioninfo$otherPkgs)) { cat(paste(pkg,packageVersion(pkg)),"\t") }; cat("\n")
-cat("Other loaded packages:\n")
-for (pkg in names(sessioninfo$loadedOnly)) { cat(paste(pkg,packageVersion(pkg)),"\t") }; cat("\n")
-
-source_local <- function(fname){ argv <- commandArgs(trailingOnly = FALSE); base_dir <- dirname(substring(argv[grep("--file=", argv)], 8)); source(paste(base_dir, fname, sep="/")) }
-
-cat("\n\n");
-
-
-
-# ----- ARGUMENTS -----
-cat("\tARGUMENTS INFO\n")
-
-listArguments = parseCommandArgs(evaluate=FALSE) #interpretation of arguments given in command line as an R list of objects
-write.table(as.matrix(listArguments), col.names=F, quote=F, sep='\t')
-
-cat("\n\n");
-
-
-# ----- PROCESSING INFILE -----
-cat("\tINFILE PROCESSING INFO\n")
-
-#image is an .RData file necessary to use xset variable given by previous tools
-if (!is.null(listArguments[["image"]])){
-    load(listArguments[["image"]]); listArguments[["image"]]=NULL
-}
-
-if (listArguments[["xfunction"]] %in% c("combinexsAnnos")) {
-    load(listArguments[["image_pos"]])
-    xaP=xa
-    listOFlistArgumentsP=listOFlistArguments
-    if (exists("xsAnnotate_object")) xaP=xsAnnotate_object
-
-    diffrepP=NULL
-    if (exists("diffrep")) diffrepP=diffrep
-
-    load(listArguments[["image_neg"]])
-    xaN=xa
-    listOFlistArgumentsN=listOFlistArguments
-    if (exists("xsAnnotate_object")) xaN=xsAnnotate_object
-
-    diffrepN=NULL
-    if (exists("diffrep")) diffrepN=diffrep
-}
-
-
-cat("\n\n")
-
-
-# ----- ARGUMENTS PROCESSING -----
-cat("\tARGUMENTS PROCESSING INFO\n")
-
-# Save arguments to generate a report
-if (!exists("listOFlistArguments")) listOFlistArguments=list()
-listOFlistArguments[[paste(format(Sys.time(), "%y%m%d-%H:%M:%S_"),listArguments[["xfunction"]],sep="")]] = listArguments
-
-
-#saving the commun parameters
-thefunction = listArguments[["xfunction"]]
-listArguments[["xfunction"]]=NULL #delete from the list of arguments
-
-xsetRdataOutput = paste(thefunction,"RData",sep=".")
-if (!is.null(listArguments[["xsetRdataOutput"]])){
-    xsetRdataOutput = listArguments[["xsetRdataOutput"]]; listArguments[["xsetRdataOutput"]]=NULL
-}
-
-rplotspdf = "Rplots.pdf"
-if (!is.null(listArguments[["rplotspdf"]])){
-    rplotspdf = listArguments[["rplotspdf"]]; listArguments[["rplotspdf"]]=NULL
-}
-
-variableMetadataOutput = "variableMetadata.tsv"
-if (!is.null(listArguments[["variableMetadataOutput"]])){
-    variableMetadataOutput = listArguments[["variableMetadataOutput"]]; listArguments[["variableMetadataOutput"]]=NULL
-}
-
-#Import the different functions
-source_local("lib.r")
-
-# We unzip automatically the chromatograms from the zip files.
-if (thefunction %in% c("annotatediff"))  {
-    if (!exists("zipfile")) zipfile=NULL
-    if (!exists("singlefile")) singlefile=NULL
-    rawFilePath = getRawfilePathFromArguments(singlefile, zipfile, listArguments)
-    zipfile = rawFilePath$zipfile
-    singlefile = rawFilePath$singlefile
-    listArguments = rawFilePath$listArguments
-    directory = retrieveRawfileInTheWorkingDirectory(singlefile, zipfile)
-}
-
-# Because so far CAMERA isn't compatible with the new XCMSnExp object
-if (exists("xdata")){
-    xset <- getxcmsSetObject(xdata)
-}
-
-# addition of xset object to the list of arguments in the first position
-if (exists("xset")){
-    listArguments=append(list(xset), listArguments)
-}
-
-cat("\n\n")
-
-
-
-
-# ----- PROCESSING INFO -----
-cat("\tMAIN PROCESSING INFO\n")
-
-#change the default display settings
-pdf(file=rplotspdf, width=16, height=12)
-
-if (thefunction %in% c("annotatediff")) {
-    results_list=annotatediff(xset=xset,listArguments=listArguments,variableMetadataOutput=variableMetadataOutput)
-    xa=results_list[["xa"]]
-    diffrep=results_list[["diffrep"]]
-    variableMetadata=results_list[["variableMetadata"]]
-
-    cat("\n\n")
-    cat("\tXSET OBJECT INFO\n")
-    print(xa)
-}
-
-if (thefunction %in% c("combinexsAnnos")) {
-    cAnnot=combinexsAnnos_function(
-        xaP=xaP,xaN=xaN,
-        listOFlistArgumentsP=listOFlistArgumentsP,listOFlistArgumentsN=listOFlistArgumentsN,
-        diffrepP=diffrepP,diffrepN=diffrepN,
-        pos=listArguments[["pos"]],tol=listArguments[["tol"]],ruleset=listArguments[["ruleset"]],keep_meta=listArguments[["keep_meta"]],
-        convertRTMinute=listArguments[["convertRTMinute"]], numDigitsMZ=listArguments[["numDigitsMZ"]], numDigitsRT=listArguments[["numDigitsRT"]],
-        variableMetadataOutput=variableMetadataOutput
-    )
-}
-
-dev.off()
-
-
-#saving R data in .Rdata file to save the variables used in the present tool
-objects2save = c("xa","variableMetadata","diffrep","cAnnot","listOFlistArguments","zipfile","singlefile")
-save(list=objects2save[objects2save %in% ls()], file=xsetRdataOutput)
-
-cat("\n\n")
-
-cat("\tDONE\n")
b
diff -r 73d82de36369 -r cb923396e70f CAMERA_annotateDiffreport.r
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/CAMERA_annotateDiffreport.r Thu Aug 29 11:38:21 2019 -0400
[
@@ -0,0 +1,78 @@
+#!/usr/bin/env Rscript
+
+# ----- PACKAGE -----
+cat("\tSESSION INFO\n")
+
+#Import the different functions
+source_local <- function(fname){ argv <- commandArgs(trailingOnly=FALSE); base_dir <- dirname(substring(argv[grep("--file=", argv)], 8)); source(paste(base_dir, fname, sep="/")) }
+source_local("lib.r")
+
+pkgs=c("CAMERA","multtest","batch")
+loadAndDisplayPackages(pkgs)
+cat("\n\n");
+
+# ----- ARGUMENTS -----
+cat("\tARGUMENTS INFO\n")
+
+args = parseCommandArgs(evaluate=FALSE) #interpretation of arguments given in command line as an R list of objects
+write.table(as.matrix(args), col.names=F, quote=F, sep='\t')
+
+cat("\n\n");
+
+
+# ----- PROCESSING INFILE -----
+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
+
+cat("\n\n")
+
+
+# ----- ARGUMENTS PROCESSING -----
+cat("\tARGUMENTS PROCESSING INFO\n")
+
+# Save arguments to generate a report
+if (!exists("listOFargs")) listOFargs=list()
+listOFargs[[format(Sys.time(), "%y%m%d-%H:%M:%S_annotatediff")]] = args
+
+# We unzip automatically the chromatograms from the zip files.
+if (!exists("zipfile")) zipfile=NULL
+if (!exists("singlefile")) singlefile=NULL
+rawFilePath = getRawfilePathFromArguments(singlefile, zipfile, args)
+zipfile = rawFilePath$zipfile
+singlefile = rawFilePath$singlefile
+args = rawFilePath$args
+directory = retrieveRawfileInTheWorkingDirectory(singlefile, zipfile)
+
+# Because so far CAMERA isn't compatible with the new XCMSnExp object
+if (exists("xdata")){
+    xset <- getxcmsSetObject(xdata)
+}
+
+cat("\n\n")
+
+
+# ----- PROCESSING INFO -----
+cat("\tMAIN PROCESSING INFO\n")
+
+results_list=annotatediff(xset=xset,args=args,variableMetadataOutput="variableMetadata.tsv")
+xa=results_list$xa
+diffrep=results_list$diffrep
+variableMetadata=results_list$variableMetadata
+
+cat("\n\n")
+
+# ----- EXPORT -----
+
+cat("\tXSET OBJECT INFO\n")
+print(xa)
+cat("\n\n")
+
+#saving R data in .Rdata file to save the variables used in the present tool
+objects2save = c("xa","variableMetadata","diffrep","cAnnot","listOFargs","zipfile","singlefile")
+save(list=objects2save[objects2save %in% ls()], file="annotatediff.RData")
+
+cat("\n\n")
+
+cat("\tDONE\n")
b
diff -r 73d82de36369 -r cb923396e70f README.rst
--- a/README.rst Tue Oct 09 06:03:01 2018 -0400
+++ b/README.rst Thu Aug 29 11:38:21 2019 -0400
b
@@ -2,6 +2,14 @@
 Changelog/News
 --------------
 
+**Version 2.2.5 - 09/04/2019**
+
+- NEW: zip export are back for pictures (eic and boxplot) and diffreport tables
+
+- UPGRADE: upgrade the CAMERA version from 1.34.0 to 1.38.1 (see CAMERA News_)
+
+- UPGRADE: refactoring of internal code
+
 **Version 2.2.4 - 09/10/2018**
 
 - NES: CAMERA.annotate no longer export a DataMatrix. fillChromPeaks does the job
b
diff -r 73d82de36369 -r cb923396e70f abims_CAMERA_annotateDiffreport.xml
--- a/abims_CAMERA_annotateDiffreport.xml Tue Oct 09 06:03:01 2018 -0400
+++ b/abims_CAMERA_annotateDiffreport.xml Thu Aug 29 11:38:21 2019 -0400
[
@@ -1,4 +1,4 @@
-<tool id="abims_CAMERA_annotateDiffreport" name="CAMERA.annotate" version="2.2.4">
+<tool id="abims_CAMERA_annotateDiffreport" name="CAMERA.annotate" version="2.2.5">
 
     <description>CAMERA annotate function. Returns annotation results (isotope peaks, adducts and fragments) and a diffreport if more than one condition.</description>
 
@@ -10,15 +10,11 @@
     <expand macro="stdio"/>
 
     <command><![CDATA[
-        @COMMAND_CAMERA_SCRIPT@
-        xfunction annotatediff
+        @COMMAND_RSCRIPT@/CAMERA_annotateDiffreport.r
         image '$image'
 
         nSlaves \${GALAXY_SLOTS:-1}
 
-        ## output
-        variableMetadataOutput '$variableMetadata'
-
         ## groupFWHM
         sigma $groupfwhm.sigma
         perfwhm $groupfwhm.perfwhm
@@ -34,8 +30,6 @@
 
         quick $quick_block.quick
         #if $quick_block.quick == "FALSE":
-            xsetRdataOutput '$rdata_quick_false'
-
             ## groupcorr
             cor_eic_th $quick_block.groupcorr.cor_eic_th
             graphMethod $quick_block.groupcorr.graphMethod
@@ -52,8 +46,6 @@
             #else
                 rules $quick_block.findadducts.rules_block.rules
             #end if
-        #else
-            xsetRdataOutput '$rdata_quick_true'
         #end if
 
         #if $diffreport.options.option == "show":
@@ -66,6 +58,8 @@
             h $diffreport.options.h
             w $diffreport.options.w
             mzdec $diffreport.options.mzdec
+            tabular2 $diffreport.options.tabular2
+            png2 $diffreport.options.png2
         #end if
 
         @COMMAND_PEAKLIST@
@@ -159,6 +153,14 @@
                     <param name="w" type="integer" value="640" label="Numeric variable for the width of the eic and boxplots print out made" help="[width]" />
                     <param name="mzdec" type="integer" value="2" label="Number of decimal places of title m/z values in the eic plot" help="[mzdec]" />
                     <param name="sortpval" type="boolean" checked="false" truevalue="TRUE" falsevalue="FALSE" label="logical indicating whether the reports should be sorted by p-value" help="[sortpval]"/>
+                    <param name="tabular2" type="select" label="Export the Diffreport files in ">
+                        <option value="zip" selected="true">Zip</option>
+                        <option value="datasetcollection">Individual file in a Dataset Collection</option>
+                    </param>
+                    <param name="png2" type="select" label="Export the EIC and boxplots in ">
+                        <option value="zip" selected="true">Zip</option>
+                        <option value="pdf">Individual pdf</option>
+                    </param>
                 </when>
                 <when value="hide">
                 </when>
@@ -170,22 +172,36 @@
     </inputs>
 
     <outputs>
-        <data name="variableMetadata" format="tabular" label="${image.name[:-6]}.annotate.variableMetadata.tsv" />
-        <data name="rdata_quick_false" format="rdata.camera.quick" label="${image.name[:-6]}.annotate.${$quick_block.findadducts.polarity}.Rdata" >
+        <data name="variableMetadata" format="tabular" label="${image.name[:-6]}.annotate.variableMetadata.tsv" from_work_dir="variableMetadata.tsv" />
+        <data name="rdata_quick_false" format="rdata.camera.quick" label="${image.name[:-6]}.annotate.${$quick_block.findadducts.polarity}.Rdata"  from_work_dir="annotatediff.RData">
             <filter>quick_block['quick'] == 'FALSE'</filter>
             <change_format>
                 <when input="quick_block.findadducts.polarity" value="positive" format="rdata.camera.positive" />
                 <when input="quick_block.findadducts.polarity" value="negative" format="rdata.camera.negative" />
             </change_format>
         </data>
-        <data name="rdata_quick_true" format="rdata.camera.quick" label="${image.name[:-6]}.annotate.quick.Rdata" >
+        <data name="rdata_quick_true" format="rdata.camera.quick" label="${image.name[:-6]}.annotate.quick.Rdata" from_work_dir="annotatediff.RData">
             <filter>quick_block['quick'] == 'TRUE'</filter>
         </data>
-        <data name="output_diffreport" format="text" label="${image.name[:-6]}.annotateDiffreport" hidden="true">
-            <filter>diffreport['options']['option'] == 'show'</filter>
-            <discover_datasets pattern="__designation_and_ext__" directory="pdf" visible="true" />
-            <discover_datasets pattern="__designation_and_ext__" directory="tabular" visible="true" />
+
+        <data name="output_diffreport_eic_zip" format="zip" label="${image.name[:-6]}.annotateDiffreport_eic.zip" from_work_dir="eic.zip" >
+            <filter>diffreport['options']['option'] == 'show' and diffreport['options']['png2'] == 'zip'</filter>
+        </data>
+        <data name="output_diffreport_box_zip" format="zip" label="${image.name[:-6]}.annotateDiffreport_box.zip" from_work_dir="box.zip" >
+            <filter>diffreport['options']['option'] == 'show' and diffreport['options']['png2'] == 'zip'</filter>
         </data>
+        <collection name="output_diffreport_picture_pdf" type="list" label="${image.name[:-6]}.annotateDiffreport.pdf">
+            <filter>diffreport['options']['option'] == 'show' and diffreport['options']['png2'] == 'pdf'</filter>
+            <discover_datasets pattern="__designation_and_ext__" directory="pdf" format="pdf" />
+        </collection>
+
+        <data name="output_diffreport_table_zip" format="zip" label="${image.name[:-6]}.annotateDiffreport_table.zip" from_work_dir="tabular.zip">
+            <filter>diffreport['options']['option'] == 'show' and diffreport['options']['tabular2'] == 'zip'</filter>
+        </data>
+        <collection name="output_diffreport_table_collection" type="list" label="${image.name[:-6]}.annotateDiffreport_table">
+            <filter>diffreport['options']['option'] == 'show' and diffreport['options']['tabular2'] == 'datasetcollection'</filter>
+            <discover_datasets pattern="__designation_and_ext__" directory="tabular" format="tabular" />
+        </collection>
     </outputs>
 
     <tests>
@@ -418,9 +434,19 @@
 Changelog/News
 --------------
 
+.. _News: https://bioconductor.org/packages/release/bioc/news/CAMERA/NEWS
+
+**Version 2.2.5 - 09/04/2019**
+
+- NEW: zip export are back for pictures (eic and boxplot) and diffreport tables
+
+- UPGRADE: upgrade the CAMERA version from 1.34.0 to 1.38.1 (see CAMERA News_)
+
+- UPGRADE: refactoring of internal code
+
 **Version 2.2.4 - 09/10/2018**
 
-- NES: CAMERA.annotate no longer export a DataMatrix. fillChromPeaks does the job
+- NEW: CAMERA.annotate no longer export a DataMatrix. fillChromPeaks does the job
 
 **Version 2.2.3 - 30/04/2018**
 
b
diff -r 73d82de36369 -r cb923396e70f lib.r
--- a/lib.r Tue Oct 09 06:03:01 2018 -0400
+++ b/lib.r Thu Aug 29 11:38:21 2019 -0400
[
b'@@ -1,5 +1,31 @@\n # lib.r\n \n+#@author G. Le Corguille\n+# solve an issue with batch if arguments are logical TRUE/FALSE\n+parseCommandArgs <- function(...) {\n+    args <- batch::parseCommandArgs(...)\n+    for (key in names(args)) {\n+        if (args[key] %in% c("TRUE","FALSE"))\n+            args[key] = as.logical(args[key])\n+    }\n+    return(args)\n+}\n+\n+#@author G. Le Corguille\n+# This function will\n+# - load the packages\n+# - display the sessionInfo\n+loadAndDisplayPackages <- function(pkgs) {\n+    for(pkg in pkgs) suppressPackageStartupMessages( stopifnot( library(pkg, quietly=TRUE, logical.return=TRUE, character.only=TRUE)))\n+\n+    sessioninfo = sessionInfo()\n+    cat(sessioninfo$R.version$version.string,"\\n")\n+    cat("Main packages:\\n")\n+    for (pkg in names(sessioninfo$otherPkgs)) { cat(paste(pkg,packageVersion(pkg)),"\\t") }; cat("\\n")\n+    cat("Other loaded packages:\\n")\n+    for (pkg in names(sessioninfo$loadedOnly)) { cat(paste(pkg,packageVersion(pkg)),"\\t") }; cat("\\n")\n+}\n+\n # This function retrieve a xset like object\n #@author Gildas Le Corguille lecorguille@sb-roscoff.fr\n getxcmsSetObject <- function(xobject) {\n@@ -34,6 +60,18 @@\n }\n \n #@author G. Le Corguille\n+#The function create a zip archive from the different png generated by diffreport\n+diffreport_png2zip <- function() {\n+    zip("eic.zip", dir(pattern="_eic"), zip=Sys.which("zip"))\n+    zip("box.zip", dir(pattern="_box"), zip=Sys.which("zip"))\n+}\n+\n+#The function create a zip archive from the different tabular generated by diffreport\n+diffreport_tabular2zip <- function() {\n+    zip("tabular.zip", dir(pattern="tabular/*"), zip=Sys.which("zip"))\n+}\n+\n+#@author G. Le Corguille\n #This function convert if it is required the Retention Time in minutes\n RTSecondToMinute <- function(variableMetadata, convertRTMinute) {\n     if (convertRTMinute){\n@@ -57,7 +95,7 @@\n }\n \n #The function annotateDiffreport without the corr function which bugs\n-annotatediff <- function(xset=xset, listArguments=listArguments, variableMetadataOutput="variableMetadata.tsv") {\n+annotatediff <- function(xset=xset, args=args, variableMetadataOutput="variableMetadata.tsv") {\n     # Resolve the bug with x11, with the function png\n     options(bitmapType=\'cairo\')\n \n@@ -65,52 +103,52 @@\n     res=try(is.null(xset@filled))\n \n     # ------ annot -------\n-    listArguments[["calcCiS"]]=as.logical(listArguments[["calcCiS"]])\n-    listArguments[["calcIso"]]=as.logical(listArguments[["calcIso"]])\n-    listArguments[["calcCaS"]]=as.logical(listArguments[["calcCaS"]])\n+    args$calcCiS=as.logical(args$calcCiS)\n+    args$calcIso=as.logical(args$calcIso)\n+    args$calcCaS=as.logical(args$calcCaS)\n \n     # common parameters\n-    listArguments4annotate = list(object=xset,\n-    nSlaves=listArguments[["nSlaves"]],sigma=listArguments[["sigma"]],perfwhm=listArguments[["perfwhm"]],\n-    maxcharge=listArguments[["maxcharge"]],maxiso=listArguments[["maxiso"]],minfrac=listArguments[["minfrac"]],\n-    ppm=listArguments[["ppm"]],mzabs=listArguments[["mzabs"]],quick=listArguments[["quick"]],\n-    polarity=listArguments[["polarity"]],max_peaks=listArguments[["max_peaks"]],intval=listArguments[["intval"]])\n+    args4annotate = list(object=xset,\n+        nSlaves=args$nSlaves,sigma=args$sigma,perfwhm=args$perfwhm,\n+        maxcharge=args$maxcharge,maxiso=args$maxiso,minfrac=args$minfrac,\n+        ppm=args$ppm,mzabs=args$mzabs,quick=args$quick,\n+        polarity=args$polarity,max_peaks=args$max_peaks,intval=args$intval)\n \n     # quick == FALSE\n-    if(listArguments[["quick"]]==FALSE) {\n-        listArguments4annotate = append(listArguments4annotate,\n-            list(graphMethod=listArguments[["graphMethod"]],cor_eic_th=listArguments[["cor_eic_th"]],pval=listArguments[["pval"]],\n-            calcCiS=listArguments[["calcCiS"]],calcIso=listArguments[["calcIso"]],calcCaS=listArguments[["calcCaS"]]))\n+    if(args$quick==FALSE) {\n+        args4annotate = append(args4annotate,\n+            list(graphMethod=args$graphMethod,cor_eic_t'..b'lue), ]\n         }\n     }\n@@ -171,7 +217,9 @@\n }\n \n \n-combinexsAnnos_function <- function(xaP, xaN, listOFlistArgumentsP,listOFlistArgumentsN, diffrepP=NULL,diffrepN=NULL,pos=TRUE,tol=2,ruleset=NULL,keep_meta=TRUE, convertRTMinute=F, numDigitsMZ=0, numDigitsRT=0, variableMetadataOutput="variableMetadata.tsv"){\n+combinexsAnnos_function <- function(xaP, xaN, diffrepP=NULL,diffrepN=NULL,\n+    pos=TRUE,tol=2,ruleset=NULL,keep_meta=TRUE, convertRTMinute=F, numDigitsMZ=0,\n+    numDigitsRT=0, variableMetadataOutput="variableMetadata.tsv"){\n \n     #Load the two Rdata to extract the xset objects from positive and negative mode\n     cat("\\tObject xset from positive mode\\n")\n@@ -198,11 +246,9 @@\n \n     if(pos){\n         xa=xaP\n-        listOFlistArgumentsP=listOFlistArguments\n         mode="neg. Mode"\n     } else {\n         xa=xaN\n-        listOFlistArgumentsN=listOFlistArguments\n         mode="pos. Mode"\n     }\n \n@@ -239,22 +285,22 @@\n }\n \n # This function get the raw file path from the arguments\n-getRawfilePathFromArguments <- function(singlefile, zipfile, listArguments) {\n-    if (!is.null(listArguments[["zipfile"]]))           zipfile = listArguments[["zipfile"]]\n-    if (!is.null(listArguments[["zipfilePositive"]]))   zipfile = listArguments[["zipfilePositive"]]\n-    if (!is.null(listArguments[["zipfileNegative"]]))   zipfile = listArguments[["zipfileNegative"]]\n+getRawfilePathFromArguments <- function(singlefile, zipfile, args) {\n+    if (!is.null(args$zipfile))           zipfile = args$zipfile\n+    if (!is.null(args$zipfilePositive))   zipfile = args$zipfilePositive\n+    if (!is.null(args$zipfileNegative))   zipfile = args$zipfileNegative\n \n-    if (!is.null(listArguments[["singlefile_galaxyPath"]])) {\n-        singlefile_galaxyPaths = listArguments[["singlefile_galaxyPath"]];\n-        singlefile_sampleNames = listArguments[["singlefile_sampleName"]]\n+    if (!is.null(args$singlefile_galaxyPath)) {\n+        singlefile_galaxyPaths = args$singlefile_galaxyPath;\n+        singlefile_sampleNames = args$singlefile_sampleName\n     }\n-    if (!is.null(listArguments[["singlefile_galaxyPathPositive"]])) {\n-        singlefile_galaxyPaths = listArguments[["singlefile_galaxyPathPositive"]];\n-        singlefile_sampleNames = listArguments[["singlefile_sampleNamePositive"]]\n+    if (!is.null(args$singlefile_galaxyPathPositive)) {\n+        singlefile_galaxyPaths = args$singlefile_galaxyPathPositive;\n+        singlefile_sampleNames = args$singlefile_sampleNamePositive\n     }\n-    if (!is.null(listArguments[["singlefile_galaxyPathNegative"]])) {\n-        singlefile_galaxyPaths = listArguments[["singlefile_galaxyPathNegative"]];\n-        singlefile_sampleNames = listArguments[["singlefile_sampleNameNegative"]]\n+    if (!is.null(args$singlefile_galaxyPathNegative)) {\n+        singlefile_galaxyPaths = args$singlefile_galaxyPathNegative;\n+        singlefile_sampleNames = args$singlefile_sampleNameNegative\n     }\n     if (exists("singlefile_galaxyPaths")){\n         singlefile_galaxyPaths = unlist(strsplit(singlefile_galaxyPaths,","))\n@@ -267,10 +313,13 @@\n             singlefile[[singlefile_sampleName]] = singlefile_galaxyPath\n         }\n     }\n-    for (argument in c("zipfile","zipfilePositive","zipfileNegative","singlefile_galaxyPath","singlefile_sampleName","singlefile_galaxyPathPositive","singlefile_sampleNamePositive","singlefile_galaxyPathNegative","singlefile_sampleNameNegative")) {\n-        listArguments[[argument]]=NULL\n+    for (argument in c("zipfile", "zipfilePositive", "zipfileNegative",\n+                        "singlefile_galaxyPath", "singlefile_sampleName",\n+                        "singlefile_galaxyPathPositive", "singlefile_sampleNamePositive",\n+                        "singlefile_galaxyPathNegative","singlefile_sampleNameNegative")) {\n+        args[[argument]]=NULL\n     }\n-    return(list(zipfile=zipfile, singlefile=singlefile, listArguments=listArguments))\n+    return(list(zipfile=zipfile, singlefile=singlefile, args=args))\n }\n \n \n'
b
diff -r 73d82de36369 -r cb923396e70f macros.xml
--- a/macros.xml Tue Oct 09 06:03:01 2018 -0400
+++ b/macros.xml Thu Aug 29 11:38:21 2019 -0400
b
@@ -2,12 +2,11 @@
 <macros>
     <xml name="requirements">
         <requirements>
-            <requirement type="package" version="0.4_2">r-snow</requirement>
-            <requirement type="package" version="3.0.0">bioconductor-xcms</requirement>
-            <requirement type="package" version="1.34.0">bioconductor-camera</requirement>
-            <requirement type="package" version="2.28.0">bioconductor-multtest</requirement>
+            <requirement type="package" version="0.4_3">r-snow</requirement>
+            <requirement type="package" version="1.38.1">bioconductor-camera</requirement>
+            <requirement type="package" version="2.38.0">bioconductor-multtest</requirement>
             <requirement type="package" version="1.1_4">r-batch</requirement>
-            <requirement type="package" version="1.3.23">graphicsmagick</requirement>
+            <requirement type="package" version="1.3.31">graphicsmagick</requirement>
         </requirements>
     </xml>
     <xml name="stdio">
@@ -16,9 +15,7 @@
         </stdio>
     </xml>
 
-    <token name="@COMMAND_CAMERA_SCRIPT@">
-        LC_ALL=C Rscript $__tool_directory__/CAMERA.r
-    </token>
+    <token name="@COMMAND_RSCRIPT@">LC_ALL=C Rscript $__tool_directory__/</token>
 
     <!-- raw file load for planemo test -->
     <token name="@COMMAND_FILE_LOAD@">
b
diff -r 73d82de36369 -r cb923396e70f planemo_test.sh
--- a/planemo_test.sh Tue Oct 09 06:03:01 2018 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
@@ -1,29 +0,0 @@
-# Example of planemo command to launch test
-
-# Note: --galaxy_branch "dev" is set to deal with zip file
-
-
-# -- Use of installed package environments
-# after having installing package on a local galaxy instance
-source /w/galaxy/dev/shed_tools_tool_dependency_dir/R/3.1.2/iuc/package_r_3_1_2/1ca39eb16186/env.sh
-source /w/galaxy/dev/shed_tools_tool_dependency_dir/bioconductor-camera/1.22.0/lecorguille/package_bioconductor_camera_1_22_0/22cec61d66c2/env.sh
-planemo test --install_galaxy
-
-#All 1 test(s) executed passed.
-#abims_CAMERA_annotateDiffreport[0]: passed
-
-
-# -- Use of conda dependencies
-planemo conda_init --conda_prefix /tmp/mc
-planemo conda_install --conda_prefix /tmp/mc . 
-planemo test --install_galaxy --conda_prefix /tmp/mc --conda_dependency_resolution
-
-#All 1 test(s) executed passed.
-#abims_CAMERA_annotateDiffreport[0]: passed
-
-
-# -- Use of shed_test
-planemo shed_test --install_galaxy -t testtoolshed 
-
-#All 1 test(s) executed passed.
-#testtoolshed.g2.bx.psu.edu/repos/lecorguille/camera_annotate/abims_CAMERA_annotateDiffreport/2.1.3[0]: passed
b
diff -r 73d82de36369 -r cb923396e70f repository_dependencies.xml
--- a/repository_dependencies.xml Tue Oct 09 06:03:01 2018 -0400
+++ b/repository_dependencies.xml Thu Aug 29 11:38:21 2019 -0400
b
@@ -1,5 +1,5 @@
-<?xml version="1.0"?>
+<?xml version="1.0" ?>
 <repositories>
- <repository changeset_revision="4a51ab3d8ecf" name="rdata_camera_datatypes" owner="lecorguille" toolshed="https://toolshed.g2.bx.psu.edu" />
- <repository changeset_revision="544f6d2329ac" name="rdata_xcms_datatypes" owner="lecorguille" toolshed="https://toolshed.g2.bx.psu.edu" />
-</repositories>
+    <repository changeset_revision="4a51ab3d8ecf" name="rdata_camera_datatypes" owner="lecorguille" toolshed="https://toolshed.g2.bx.psu.edu"/>
+    <repository changeset_revision="544f6d2329ac" name="rdata_xcms_datatypes" owner="lecorguille" toolshed="https://toolshed.g2.bx.psu.edu"/>
+</repositories>
\ No newline at end of file
b
diff -r 73d82de36369 -r cb923396e70f test-data/.RData
b
Binary file test-data/.RData has changed
b
diff -r 73d82de36369 -r cb923396e70f test-data/CMD.mac.sh
--- a/test-data/CMD.mac.sh Tue Oct 09 06:03:01 2018 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,1 +0,0 @@
-LC_ALL=C Rscript ../CAMERA.r xfunction annotatediff image 'faahKO-single.xset.merged.group.retcor.group.fillpeaks-xcms3.RData' nSlaves ${GALAXY_SLOTS:-1}  variableMetadataOutput variableMetadataOutput.txt dataMatrixOutput dataMatrixOutput.txt sigma 6 perfwhm 0.6  ppm 5 mzabs 0.015  maxcharge 3 maxiso 4 minfrac 0.5  quick TRUE xsetRdataOutput '/tmp/tmpT41cRC/files/000/dataset_20.dat'  runDiffreport TRUE eicmax 200 eicwidth 200 value into sortpval FALSE h 480 w 640 mzdec 2   convertRTMinute TRUE numDigitsMZ 4 numDigitsRT 1 intval into singlefile_galaxyPath 'wt15.CDF,ko16.CDF,ko15.CDF,wt16.CDF' singlefile_sampleName 'wt15.CDF,ko16.CDF,ko15.CDF,wt16.CDF'
b
diff -r 73d82de36369 -r cb923396e70f test-data/Rplots.pdf
b
Binary file test-data/Rplots.pdf has changed
b
diff -r 73d82de36369 -r cb923396e70f test-data/dataMatrixOutput.txt
--- a/test-data/dataMatrixOutput.txt Tue Oct 09 06:03:01 2018 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
b'@@ -1,6333 +0,0 @@\n-name\t..ko15.CDF\t..ko16.CDF\t..wt15.CDF\t..wt16.CDF\n-M200T3488\t6029.94499999992\t1646.69331417609\tNA\tNA\n-M200T3544\tNA\tNA\t4586.52650000006\tNA\n-M200T3882\t1144.01499999999\t1716.38461192716\t1449.84316738066\tNA\n-M200T3822\tNA\tNA\t1018.81499999998\tNA\n-M200T3184\tNA\t4333.4849999999\tNA\tNA\n-M200T2867\t76879.3654931277\t506848.884266667\t53985.4351594335\t76607.9704340259\n-M200T3978\t1324.38867325921\tNA\t495.468308772648\t1242.61000000004\n-M200T3681\tNA\t645.622409362349\t5108.15999999988\t1576.85791107837\n-M201T3788\tNA\tNA\t1680.81000000006\tNA\n-M201T3536\tNA\t2863.6449999999\tNA\t1106.33802122178\n-M201T4052\t318.548929605957\t205.380230930156\t1339.64000000005\t689.071631937096\n-M201T3276\tNA\t1497.96219436021\t4090.91000000014\t1027.56552966783\n-M201T3630\tNA\tNA\t2121.84236212046\t2931.24499999993\n-M201T2590\tNA\t14307.2299999999\tNA\tNA\n-M201T3985\tNA\tNA\t1657.33500000006\tNA\n-M201T3138\t27830.0354581329\t254581.758476187\t63151.125622074\t28083.6051504647\n-M201T3693\tNA\tNA\t2906.20499999993\tNA\n-M201T3511\t4023.61499999999\t694.250350240936\tNA\tNA\n-M201T3790\t446.184819684897\t1118.41040705157\tNA\t3245.80999999992\n-M201T4047\tNA\tNA\t1275.47500000004\t1220.69999999998\n-M201T3925\t128.578946259232\tNA\t1284.72816666668\tNA\n-M201T3874\t886.610568446999\t1220.70000000004\t521.172821104497\tNA\n-M201T4152\tNA\t774.575999999962\tNA\tNA\n-M202T3859\t892.050000000031\t753.237186536855\tNA\tNA\n-M202T4007\tNA\tNA\t831.015000000029\tNA\n-M202T3303\t2759.095\t3872.96250000005\tNA\t791.36463944858\n-M202T3379\t9879.84499999977\t1320.19136751317\tNA\tNA\n-M202T3767\tNA\t2564.84247599701\t1151.71733333335\tNA\n-M202T3181\t7682.58500000004\t3806.07999999999\tNA\tNA\n-M202T4031\t389.407001047583\t688.600000000024\t754.233600000007\tNA\n-M202T3886\tNA\t841.96999999998\tNA\tNA\n-M202T4137\tNA\tNA\tNA\t732.419999999983\n-M202T3931\t354.703176356038\tNA\t1461.71\tNA\n-M202T3271\t77227.3769090911\t7016.51333681604\t44589.8848371899\t7116.58518941033\n-M202T2891\t36435.3079999996\t6433.2631875585\t29664.6514201645\t2640.91263857081\n-M202T3285\tNA\tNA\tNA\t3372.57500000002\n-M203T4040\tNA\tNA\tNA\t978.124999999977\n-M203T3308\tNA\t1694.89499999996\tNA\t1136.19000000004\n-M203T3338\t3852.53759999981\t2974.74816666671\tNA\tNA\n-M203T4156\tNA\t804.409999999981\tNA\t374.999685196314\n-M203T3714\tNA\tNA\tNA\t3345.96999999992\n-M203T3787\t790.967612320259\t2690.23500000009\t1939.932414103\t955.908725789886\n-M203T2679\tNA\tNA\tNA\t6346.07499999991\n-M203T3966\t1720.81523845536\t136.302197105375\t2796.65500000002\t1490.80528084004\n-M203T4059\t179.980340762509\tNA\tNA\t1550.91499999999\n-M204T3535\tNA\tNA\t967.169999999987\tNA\n-M204T3666\t3002.85120000003\tNA\t572.831482902373\tNA\n-M204T4031\t1111.14999999999\tNA\tNA\t129.105921444997\n-M204T4126\tNA\tNA\tNA\t793.455000000074\n-M204T3060\t3905.96266666662\tNA\tNA\tNA\n-M204T3845\tNA\t238.782610500926\t1676.11500000006\tNA\n-M204T3395\t706.339294579149\t155.065526139688\t1687.9990131206\t1586.91\n-M204T2638\tNA\tNA\t3518.12000000012\tNA\n-M204T4139\tNA\tNA\tNA\t1089.24000000004\n-M204T4073\tNA\t1062.63500000004\tNA\tNA\n-M204T3604\tNA\tNA\tNA\t1032.90000000004\n-M204T3698\tNA\tNA\tNA\t1446.05999999997\n-M205T3582\tNA\tNA\t964.383879177602\t2466.43999999994\n-M205T2582\t8805.94199999988\tNA\tNA\t9189.67999999988\n-M205T2789\t1924712.01585714\t1757150.9648\t2129885.09357143\t1634341.9855862\n-M205T3783\t2777.8750000001\tNA\t5180.14999999997\tNA\n-M205T3909\tNA\t3392.55866666671\tNA\tNA\n-M205T4051\t2600.69759999987\tNA\t1198.79000000004\tNA\n-M206T4070\tNA\tNA\t793.454999999982\tNA\n-M206T3084\tNA\tNA\tNA\t4682.47999999989\n-M206T3353\t271.698957954148\tNA\t641.649999999985\tNA\n-M206T3285\tNA\tNA\tNA\t1023.50999999998\n-M206T3192\t2337.7226842156\t10174.0649999999\tNA\t531.384477548613\n-M206T4108\t1685.41525000004\t800.018271889045\tNA\t280.678679423257\n-M206T2791\t213659.293920001\t272706.72055332\t253825.557279999\t241844.442068965\n-M206T3444\t1938.56022964102\t2400.20806107181\t4692.21741165203\t3090.62812500006\n-M206T3247\t1713.67500000006\tNA\tNA\t3137.82499999993\n-M206T3680\tNA\tNA\tNA\t2237.94999999995\n-M206T3191\t1931.20999999997\tNA\tNA\tNA\n-M206T3755\t510.0375381342\tNA\tNA\t2529.03999999997\n-M206T2570\tNA\tNA\t9324.27000000002\t924.940634138229\n-M206T3347\tNA\t528.62804858849\t535.449055667051\t1536.82999'..b'22.49815518322\t7801.52500000005\tNA\n-M597T3463\tNA\t7109.79500000002\tNA\tNA\n-M597T3287\t4115.2105592385\t6108.19500000008\tNA\tNA\n-M597T3669\t3813.49883333338\t1542.97947676868\tNA\t987.795272510788\n-M597T3874\tNA\tNA\t1399.11000000005\tNA\n-M597T3799\tNA\tNA\t9477.64000000033\tNA\n-M597T2920\t1034.24974715399\tNA\tNA\t3881.19999999991\n-M597T4080\t18556.9408188294\t8185.95298062284\t27582.3906250001\t12307.5901216578\n-M597T4135\t15187.814210526\t11262.4812687384\t3161.39825087393\t756.425882857505\n-M597T2791\t2459.83450887303\t1066.17398982618\t23087.5229375002\t1056.38098428999\n-M597T3016\tNA\t8213.12000000029\tNA\tNA\n-M597T2530\t1406.71781818182\tNA\tNA\t4424.01941666667\n-M597T3805\t28480.3432782255\t1186500.84141178\t10606.0571955243\t34573.1746514789\n-M598T3855\t1539.85635358667\tNA\t6475.97000000023\tNA\n-M598T3997\t4690.30499999994\tNA\t1288.07486775315\t305.764898642052\n-M598T2646\tNA\t914.483039050997\t1991.89121724326\t5450.66280000004\n-M598T2895\t929.575110080356\tNA\tNA\t2579.12000000009\n-M598T3923\t2421.055\tNA\tNA\t5100.33500000001\n-M598T2839\t4328.7899999999\tNA\tNA\tNA\n-M598T4225\t780.835199999962\tNA\tNA\tNA\n-M598T3867\tNA\tNA\t923.232000000008\tNA\n-M598T2736\tNA\tNA\t3392.92\tNA\n-M598T2560\tNA\tNA\t3350.66499999992\tNA\n-M598T3059\t1251.51527618732\tNA\t3904.17600000003\tNA\n-M598T3248\tNA\tNA\t11160.015\tNA\n-M598T2590\tNA\tNA\t5259.96499999993\tNA\n-M598T3570\t4893.75500000017\tNA\tNA\tNA\n-M598T3155\tNA\t791.797930803163\tNA\t1547.78500000005\n-M598T3717\t6735.75999999984\t29323.4050000004\tNA\t48876.8056363635\n-M598T3840\t990.400497127544\t19344.1924374998\t1705.49428412994\t18481.3189273045\n-M598T4210\tNA\tNA\tNA\t852.92499999998\n-M598T2983\t3463.10662220332\t7907.94500000028\t4597.13130349332\tNA\n-M598T3218\tNA\t16185.5021250003\t8818.83384484759\t12536.1107384566\n-M598T2829\t5337.7886250001\t3464.81226746294\t2392.55846345708\tNA\n-M598T3363\tNA\tNA\tNA\t7501.04499999995\n-M598T3407\t3147.74550046427\tNA\t4532.24000000016\tNA\n-M598T3496\tNA\tNA\t9308.62000000032\tNA\n-M598T3120\t3137.82499999993\tNA\tNA\tNA\n-M598T4219\t1558.64039999994\t130.408333333329\t574.318299999979\t283.24689999999\n-M598T2675\t2139.08160000002\t2826.02880000002\tNA\tNA\n-M598T2759\tNA\t5078.42499999999\t1225.70122914555\t436.47790863468\n-M598T2565\tNA\t1600.99499999996\tNA\t264.093749999994\n-M598T3816\t4056.74513901089\t126881.278714286\t2038.59965809119\tNA\n-M598T4028\t4444.59999999997\tNA\tNA\tNA\n-M598T3699\t21485.7955370261\t262005.048159626\t19097.5044463651\t65022.6200000009\n-M599T3177\tNA\t2838.6076666667\tNA\t2164.39499999999\n-M599T2937\t5756.0700000002\t2557.20999999994\tNA\tNA\n-M599T2856\tNA\tNA\tNA\t3757.56499999997\n-M599T4215\tNA\tNA\t223.746998896449\t881.094999999979\n-M599T2629\t24597.6221333335\t2237.94999999995\tNA\tNA\n-M599T3087\tNA\tNA\tNA\t5745.1150000002\n-M599T4161\t1370.93999999996\t8068.71033333314\t769.979999999982\t5823.36499999964\n-M599T3725\t22852.13\t8220.94499999976\t55051.9369090907\t5147.52485215715\n-M599T3846\tNA\tNA\t5238.05500000018\tNA\n-M599T2884\t3106.80875823442\t3346.02697646104\t6247.93574186843\t3269.28500000002\n-M599T4044\t798856.451441174\t40631.1229886866\t897286.005000001\t49928.058471187\n-M599T3927\t30327.7176201825\t15327.6100000005\t37243.228306282\t2271127.28014893\n-M599T3455\t35592.8437333336\tNA\tNA\t6298.5500000001\n-M599T3741\t2472129.73859259\tNA\t797434.72246154\t11463.9494185942\n-M599T4124\tNA\t354770.43852632\tNA\t707685.939314288\n-M599T3815\t79625.6350000028\t12736.5568357265\t9836.53488085646\t4148.40133264837\n-M599T2837\t2295.00891881701\t5415.77280000005\t3360.28178830047\tNA\n-M599T2984\tNA\t5849.96999999986\tNA\t12502.4521250001\n-M600T3611\tNA\tNA\tNA\t5001.73999999997\n-M600T2728\tNA\tNA\tNA\t1760.62499999996\n-M600T3412\t3353.79499999992\t1647.14222654083\tNA\tNA\n-M600T2595\t6022.12000000021\t2928.1150000001\t3209.81499999996\t2331.63714285708\n-M600T2782\tNA\tNA\tNA\t2608.74386666668\n-M600T3443\t4671.52499999989\t8782.77999999999\tNA\tNA\n-M600T2847\tNA\tNA\t1920.87948584165\t1987.33833333336\n-M600T2963\t9211.58999999991\tNA\t2898.28401908135\t5635.39317528082\n-M600T3070\t2056.42917003541\tNA\t1251.24642515022\t3430.04160000003\n-M600T3353\t2327.15500000008\tNA\tNA\t2315.33491939702\n-M600T3212\t7784.31000000027\t2982.99537949918\tNA\tNA\n-M600T2573\tNA\t3639.80233333338\tNA\tNA\n'