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

Changeset 10:c81275aee959 (2017-04-07)
Previous changeset 9:2c1d7df89cf6 (2017-01-30) Next changeset 11:9e45e1c404a4 (2017-05-19)
Commit message:
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit a6f5f18b3d6130f7d7fbb9f2df856838c6217797
modified:
README.rst
abims_xcms_group.xml
lib.r
macros.xml
static/images/xcms_group_workflow.png
xcms.r
added:
test-data/MM-single.xset.merged.RData
test-data/faahKO-single-class.xset.merged.RData
test-data/faahKO-single.xset.merged.RData
test-data/faahKO-single.xset.merged.group.retcor.RData
test-data/faahKO.xset.group.dataMatrix.tsv
test-data/faahKO.xset.group.variableMetadata.tsv
removed:
Makefile
planemo_test.sh
tool_dependencies.xml
b
diff -r 2c1d7df89cf6 -r c81275aee959 Makefile
--- a/Makefile Mon Jan 30 08:53:13 2017 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
@@ -1,23 +0,0 @@
-# USAGE: make [install|clean]
-
-# -------- VARIABLE --------
-
-OBJ=xcms_group.tgz
-DEP=abims_xcms_group.xml tool_dependencies.xml repository_dependencies.xml static test-data
-
-
-# ------------------------
-
-all: $(OBJ)
-
-$(OBJ): $(DEP)
- tar --exclude=".svn" -zchf $@ $^
-
-# ------------------------
-
-install: $(OBJ)
- mv *.tgz ~
-
-clean:
- rm *.tgz
-
b
diff -r 2c1d7df89cf6 -r c81275aee959 README.rst
--- a/README.rst Mon Jan 30 08:53:13 2017 -0500
+++ b/README.rst Fri Apr 07 07:35:31 2017 -0400
b
@@ -2,13 +2,21 @@
 Changelog/News
 --------------
 
+**Version 2.1.0 - 07/02/2017**
+
+- IMPROVEMENT: Add an option to export the peak list at this step without have to wait camara.annotate
+
+- IMPROVEMENT: xcms.group can deal with merged individual data from "xcms.xcmsSet Merger"
+
+- BUGFIX: the default value of "density" -> "Maximum number of groups to identify in a single m/z slice" which was of 5 have been changed to fix with the XMCS default values to 50
+
 **Version 2.0.6 - 06/07/2016**
 
 - UPGRADE: upgrate the xcms version from 1.44.0 to 1.46.0
 
 **Version 2.0.5 04/04/2016**
 
-- TEST: refactoring to pass planemo test using conda dependencies 
+- TEST: refactoring to pass planemo test using conda dependencies
 
 
 **Version 2.0.4 - 10/02/2016**
@@ -25,15 +33,3 @@
 - IMPROVEMENT: new datatype/dataset formats (rdata.xcms.raw, rdata.xcms.group, rdata.xcms.retcor ...) will facilitate the sequence of tools and so avoid incompatibility errors.
 
 - IMPROVEMENT: parameter labels have changed to facilitate their reading.
-
-
-Test Status
------------
-
-Planemo test using conda: passed
-
-Planemo test using source env.sh: passed
-
-Planemo shed_test : passed
-
-
b
diff -r 2c1d7df89cf6 -r c81275aee959 abims_xcms_group.xml
--- a/abims_xcms_group.xml Mon Jan 30 08:53:13 2017 -0500
+++ b/abims_xcms_group.xml Fri Apr 07 07:35:31 2017 -0400
[
b'@@ -1,4 +1,4 @@\n-<tool id="abims_xcms_group" name="xcms.group" version="2.0.6">\n+<tool id="abims_xcms_group" name="xcms.group" version="2.1.0">\n \n     <description>Group peaks together across samples using overlapping m/z bins and calculation of smoothed peak distributions in chromatographic time.</description>\n \n@@ -11,21 +11,21 @@\n \n     <command><![CDATA[\n         @COMMAND_XCMS_SCRIPT@\n-        xfunction group \n-        image $image \n+        xfunction group\n+        image \'$image\'\n \n-        xsetRdataOutput $xsetRData\n-        rplotspdf $rplotsPdf\n+        xsetRdataOutput \'$xsetRData\'\n+        rplotspdf \'$rplotsPdf\'\n \n-        method $methods.method sleep 0.001 \n+        method $methods.method sleep 0.001\n         #if $methods.method == "density":\n-            ## minsamp $methods.minsamp \n-            minfrac $methods.minfrac \n-            bw $methods.bw \n+            ## minsamp $methods.minsamp\n+            minfrac $methods.minfrac\n+            bw $methods.bw\n             mzwid $methods.mzwid\n         #if $methods.density_options.option == "show":\n             max $methods.density_options.max\n-        #end if \n+        #end if\n         #elif $methods.method == "mzClust":\n             mzppm $methods.mzppm\n             mzabs $methods.mzabs\n@@ -37,8 +37,11 @@\n             rtCheck $methods.rtCheck\n             kNN $methods.kNN\n         #end if\n+\n+        @COMMAND_PEAKLIST@\n+\n         @COMMAND_LOG_EXIT@\n-   ]]></command> \n+   ]]></command>\n \n     <inputs>\n         <param name="image" type="data" format="rdata.xcms.raw,rdata.xcms.group,rdata.xcms.retcor,rdata" label="xset RData file" help="output file from another function xcms (xcmsSet, retcor etc.)" />\n@@ -53,7 +56,7 @@\n                 <param name="minfrac" type="float" value="0.5" label="Minimum fraction of samples necessary" help="[minfrac] in at least one of the sample groups for it to be a valid group" />\n                 <param name="mzwid" type="float" value="0.25" label="Width of overlapping m/z slices" help="[mzwid] to use for creating peak density chromatograms and grouping peaks across samples " />\n <!--\n-                <param name="minsamp" type="hidden" value="1" label="minsamp" help="minimum number of samples necessary in at least one of the sample groups for it to be a valid group " /> \n+                <param name="minsamp" type="hidden" value="1" label="minsamp" help="minimum number of samples necessary in at least one of the sample groups for it to be a valid group " />\n -->\n             <conditional name="density_options">\n             <param name="option" type="select" label="Advanced options">\n@@ -61,7 +64,7 @@\n                 <option value="hide" selected="true">hide</option>\n             </param>\n             <when value="show">\n-                <param name="max" type="integer" value="5" label="Maximum number of groups to identify in a single m/z slice" help="[max]" />\n+                <param name="max" type="integer" value="50" label="Maximum number of groups to identify in a single m/z slice" help="[max]" />\n             </when>\n             <when value="hide">\n             </when>\n@@ -73,27 +76,29 @@\n                 <param name="mzabs" type="float" value="0" label="Absolute error used for clustering/grouping" help="[mzabs]" />\n                 <param name="minfrac" type="float" value="0" label="Minimum fraction of each class in one bin" help="[minfrac] minimum fraction of samples necessary in at least one of the sample groups for it to be a valid group" />\n <!--\n-                <param name="minsamp" type="hidden" value="1" label="minsamp" help="minimum number of samples necessary in at least one of the sample groups for it to be a valid group " />   \n+                <param name="minsamp" type="hidden" value="1" label="minsamp" help="minimum number of samples necessary in at least one of the sample groups for it to be a valid group " />\n -->\n             </when>\n             <when value="nearest">\n                 <param name="mzVsRTbalance" typ'..b'   <has_text text="object with 2 samples" />\n+                    <has_text text="Time range: 19.7-307.3 seconds (0.3-5.1 minutes)" />\n+                    <has_text text="Mass range: 117.0357-936.7059 m/z" />\n+                    <has_text text="Peaks: 236 (about 118 per sample)" />\n+                    <has_text text="Peak Groups: 236" />\n+                    <has_text text="Sample classes: ." />\n+                </assert_contents>\n+            </output>\n         </test>\n         <!--<test>\n             <param name="image" value="xset.group.retcor.RData"/>\n@@ -174,10 +252,29 @@\n                 </assert_contents>\n             </output>\n         </test>\n+        <test>\n+            <param name="image" value="faahKO-single.xset.merged.group.retcor.RData"/>\n+            <param name="methods|method" value="density"/>\n+            <param name="methods|bw" value="5"/>\n+            <param name="methods|minfrac" value="0.3"/>\n+            <param name="methods|mzwid" value="0.01"/>\n+            <param name="methods|density_options|option" value="show"/>\n+            <param name="methods|density_options|max" value="50"/>\n+            <output name="log">\n+                <assert_contents>\n+                    <has_text text="object with 4 samples" />\n+                    <has_text text="Time range: 2507.7-4481.7 seconds (41.8-74.7 minutes)" />\n+                    <has_text text="Mass range: 200.1-600 m/z" />\n+                    <has_text text="Peaks: 9251 (about 2313 per sample)" />\n+                    <has_text text="Peak Groups: 8157" />\n+                    <has_text text="Sample classes: KO, WT" />\n+                </assert_contents>\n+            </output>\n+        </test>\n     </tests>\n \n     <help><![CDATA[\n-        \n+\n @HELP_AUTHORS@\n \n ==========\n@@ -203,6 +300,8 @@\n ========================= ================= =================== ==========\n xcms.xcmsSet              xset.RData        rdata.xcms.raw      RData file\n ------------------------- ----------------- ------------------- ----------\n+xcms.xcmsSet Merger       xset.RData        rdata.xcms.raw      RData file\n+------------------------- ----------------- ------------------- ----------\n xcms.retcor               xset.RData        rdata.xcms.retcor   RData file\n ========================= ================= =================== ==========\n \n@@ -231,7 +330,9 @@\n +---------------------------+-----------------------+\n | Parameter : num + label   |   Format              |\n +===========================+=======================+\n-| 1 : RData file            |   rdata.xcms.group    |\n+| Or : RData file            |   rdata.xcms.raw     |\n++---------------------------+-----------------------+\n+| Or : RData file            |   rdata.xcms.retcor  |\n +---------------------------+-----------------------+\n \n \n@@ -264,15 +365,15 @@\n xset.group.RData: rdata.xcms.group format\n \n     | Rdata file that will be necessary in the third and fourth step of the workflow (xcms.retcor and xcms.fillpeaks).\n-    \n+\n \n ------\n \n-.. class:: infomark \n+.. class:: infomark\n \n The output file is an xset.group.RData file. You can continue your analysis using it in **xcms.retcor** tool.\n \n-    \n+\n ---------------------------------------------------\n \n \n@@ -312,13 +413,21 @@\n Changelog/News\n --------------\n \n+**Version 2.1.0 - 07/02/2017**\n+\n+- IMPROVEMENT: Add an option to export the peak list at this step without have to wait camara.annotate\n+\n+- IMPROVEMENT: xcms.group can deal with merged individual data from "xcms.xcmsSet Merger"\n+\n+- BUGFIX: the default value of "density" -> "Maximum number of groups to identify in a single m/z slice" which was of 5 have been changed to fix with the XMCS default values to 50\n+\n **Version 2.0.6 - 06/07/2016**\n \n - UPGRADE: upgrate the xcms version from 1.44.0 to 1.46.0\n \n **Version 2.0.5 - 04/04/2016**\n \n-- TEST: refactoring to pass planemo test using conda dependencies \n+- TEST: refactoring to pass planemo test using conda dependencies\n \n \n **Version 2.0.4 - 10/02/2016**\n'
b
diff -r 2c1d7df89cf6 -r c81275aee959 lib.r
--- a/lib.r Mon Jan 30 08:53:13 2017 -0500
+++ b/lib.r Fri Apr 07 07:35:31 2017 -0400
[
b'@@ -27,168 +27,165 @@\n \n #@author G. Le Corguille\n #This function format ions identifiers\n-formatIonIdentifiers <- function(dataData, numDigitsRT=0, numDigitsMZ=0) {\n-    return(make.unique(paste0("M",round(dataData[,"mz"],numDigitsMZ),"T",round(dataData[,"rt"],numDigitsRT))))\n+formatIonIdentifiers <- function(variableMetadata, numDigitsRT=0, numDigitsMZ=0) {\n+    splitDeco = strsplit(as.character(variableMetadata$name),"_")\n+    idsDeco = sapply(splitDeco, function(x) { deco=unlist(x)[2]; if (is.na(deco)) return ("") else return(paste0("_",deco)) })\n+    namecustom = make.unique(paste0("M",round(variableMetadata[,"mz"],numDigitsMZ),"T",round(variableMetadata[,"rt"],numDigitsRT),idsDeco))\n+    variableMetadata=cbind(name=variableMetadata$name, namecustom=namecustom, variableMetadata[,!(colnames(variableMetadata) %in% c("name"))])\n+    return(variableMetadata)\n }\n \n #@author G. Le Corguille\n # value: intensity values to be used into, maxo or intb\n getPeaklistW4M <- function(xset, intval="into",convertRTMinute=F,numDigitsMZ=4,numDigitsRT=0,variableMetadataOutput,dataMatrixOutput) {\n-    groups <- xset@groups\n-    values <- groupval(xset, "medret", value=intval)\n-    \n-    # renamming of the column rtmed to rt to fit with camera peaklist function output\n-    colnames(groups)[colnames(groups)=="rtmed"] <- "rt"\n-    colnames(groups)[colnames(groups)=="mzmed"] <- "mz"\n-    \n-    ids <- formatIonIdentifiers(groups, numDigitsRT=numDigitsRT, numDigitsMZ=numDigitsMZ)\n-    groups = RTSecondToMinute(groups, convertRTMinute)\n+    variableMetadata_dataMatrix = peakTable(xset, method="medret", value=intval)\n+    variableMetadata_dataMatrix = cbind(name=groupnames(xset),variableMetadata_dataMatrix)\n+\n+    dataMatrix = variableMetadata_dataMatrix[,(make.names(colnames(variableMetadata_dataMatrix)) %in% c("name", make.names(sampnames(xset))))]\n \n-    rownames(groups) = ids\n-    rownames(values) = ids\n+    variableMetadata = variableMetadata_dataMatrix[,!(make.names(colnames(variableMetadata_dataMatrix)) %in% c(make.names(sampnames(xset))))]\n+    variableMetadata = RTSecondToMinute(variableMetadata, convertRTMinute)\n+    variableMetadata = formatIonIdentifiers(variableMetadata, numDigitsRT=numDigitsRT, numDigitsMZ=numDigitsMZ)\n \n-    #@TODO: add "name" as the first column name\n-    #colnames(groups)[1] = "name"\n-    #colnames(values)[1] = "name"\n-\n-    write.table(groups, file=variableMetadataOutput,sep="\\t",quote=F,row.names = T,col.names = NA)\n-    write.table(values, file=dataMatrixOutput,sep="\\t",quote=F,row.names = T,col.names = NA)\n+    write.table(variableMetadata, file=variableMetadataOutput,sep="\\t",quote=F,row.names=F)\n+    write.table(dataMatrix, file=dataMatrixOutput,sep="\\t",quote=F,row.names=F)\n }\n \n #@author Y. Guitton\n getBPC <- function(file,rtcor=NULL, ...) {\n-  object <- xcmsRaw(file)\n-  sel <- profRange(object, ...)\n-  cbind(if (is.null(rtcor)) object@scantime[sel$scanidx] else rtcor ,xcms:::colMax(object@env$profile[sel$massidx,sel$scanidx,drop=FALSE]))\n-  #plotChrom(xcmsRaw(file), base=T)\n+    object <- xcmsRaw(file)\n+    sel <- profRange(object, ...)\n+    cbind(if (is.null(rtcor)) object@scantime[sel$scanidx] else rtcor ,xcms:::colMax(object@env$profile[sel$massidx,sel$scanidx,drop=FALSE]))\n+    #plotChrom(xcmsRaw(file), base=T)\n }\n \n #@author Y. Guitton\n getBPCs <- function (xcmsSet=NULL, pdfname="BPCs.pdf",rt=c("raw","corrected"), scanrange=NULL) {\n-  cat("Creating BIC pdf...\\n")\n+    cat("Creating BIC pdf...\\n")\n \n-  if (is.null(xcmsSet)) {\n-    cat("Enter an xcmsSet \\n")\n-    stop()\n-  } else {\n-    files <- filepaths(xcmsSet)\n-  }\n+    if (is.null(xcmsSet)) {\n+        cat("Enter an xcmsSet \\n")\n+        stop()\n+    } else {\n+        files <- filepaths(xcmsSet)\n+    }\n \n-  class<-as.vector(levels(xcmsSet@phenoData[,1])) #sometime phenoData have more than 1 column use first as class\n+    phenoDataClass<-as.vector(levels(xcmsSet@phenoData[,1])) #sometime phenoData have more than 1 column use first as class\n \n-  classnam'..b'as.matrix(md5sum(files)))\n+}\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+\n+    if (!is.null(listArguments[["singlefile_galaxyPath"]])) {\n+        singlefile_galaxyPaths = listArguments[["singlefile_galaxyPath"]];\n+        singlefile_sampleNames = listArguments[["singlefile_sampleName"]]\n+    }\n+    if (!is.null(listArguments[["singlefile_galaxyPathPositive"]])) {\n+        singlefile_galaxyPaths = listArguments[["singlefile_galaxyPathPositive"]];\n+        singlefile_sampleNames = listArguments[["singlefile_sampleNamePositive"]]\n+    }\n+    if (!is.null(listArguments[["singlefile_galaxyPathNegative"]])) {\n+        singlefile_galaxyPaths = listArguments[["singlefile_galaxyPathNegative"]];\n+        singlefile_sampleNames = listArguments[["singlefile_sampleNameNegative"]]\n+    }\n+    if (exists("singlefile_galaxyPaths")){\n+        singlefile_galaxyPaths = unlist(strsplit(singlefile_galaxyPaths,","))\n+        singlefile_sampleNames = unlist(strsplit(singlefile_sampleNames,","))\n \n-  library(tools)\n+        singlefile=NULL\n+        for (singlefile_galaxyPath_i in seq(1:length(singlefile_galaxyPaths))) {\n+            singlefile_galaxyPath=singlefile_galaxyPaths[singlefile_galaxyPath_i]\n+            singlefile_sampleName=singlefile_sampleNames[singlefile_galaxyPath_i]\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+    }\n+    return(list(zipfile=zipfile, singlefile=singlefile, listArguments=listArguments))\n+}\n+\n+\n+# This function retrieve the raw file in the working directory\n+#   - if zipfile: unzip the file with its directory tree\n+#   - if singlefiles: set symlink with the good filename\n+retrieveRawfileInTheWorkingDirectory <- function(singlefile, zipfile) {\n+    if(!is.null(singlefile) && (length("singlefile")>0)) {\n+        for (singlefile_sampleName in names(singlefile)) {\n+            singlefile_galaxyPath = singlefile[[singlefile_sampleName]]\n+            if(!file.exists(singlefile_galaxyPath)){\n+                error_message=paste("Cannot access the sample:",singlefile_sampleName,"located:",singlefile_galaxyPath,". Please, contact your administrator ... if you have one!")\n+                print(error_message); stop(error_message)\n+            }\n \n-  #cat("\\n\\n")\n+            file.symlink(singlefile_galaxyPath,singlefile_sampleName)\n+        }\n+        directory = "."\n+\n+    }\n+    if(!is.null(zipfile) && (zipfile!="")) {\n+        if(!file.exists(zipfile)){\n+            error_message=paste("Cannot access the Zip file:",zipfile,". Please, contact your administrator ... if you have one!")\n+            print(error_message)\n+            stop(error_message)\n+        }\n+\n+        #list all file in the zip file\n+        #zip_files=unzip(zipfile,list=T)[,"Name"]\n \n-  return(as.matrix(md5sum(files)))\n+        #unzip\n+        suppressWarnings(unzip(zipfile, unzip="unzip"))\n+\n+        #get the directory name\n+        filesInZip=unzip(zipfile, list=T);\n+        directories=unique(unlist(lapply(strsplit(filesInZip$Name,"/"), function(x) x[1])));\n+        directories=directories[!(directories %in% c("__MACOSX")) & file.info(directories)$isdir]\n+        directory = "."\n+        if (length(directories) == 1) directory = directories\n+\n+        cat("files_root_directory\\t",directory,"\\n")\n+\n+    }\n+    return (directory)\n }\n'
b
diff -r 2c1d7df89cf6 -r c81275aee959 macros.xml
--- a/macros.xml Mon Jan 30 08:53:13 2017 -0500
+++ b/macros.xml Fri Apr 07 07:35:31 2017 -0400
[
@@ -7,6 +7,11 @@
             <requirement type="package" version="1.1_4">r-batch</requirement>
         </requirements>
     </xml>
+    <xml name="requirements_light">
+        <requirements>
+            <requirement type="package" version="1.46.0">bioconductor-xcms</requirement>
+        </requirements>
+    </xml>
     <xml name="stdio">
         <stdio>
             <exit_code range="1" level="fatal" />
@@ -20,41 +25,101 @@
     <token name="@COMMAND_LOG_EXIT@">
         ;
         return=\$?;
-        mv log.txt $log;
-        cat $log;
+        mv log.txt '$log';
+        cat '$log';
         sh -c "exit \$return"
     </token>
 
     <!-- zipfile load for planemo test -->
 
-    <token name="@COMMAND_ZIPFILE_LOAD@">
-        #if $zipfile_load_conditional.zipfile_load_select == "yes":
-            #if $zipfile_load_conditional.zip_file:
-                zipfile $zipfile_load_conditional.zip_file
+    <token name="@COMMAND_FILE_LOAD@">
+        #if $file_load_section.file_load_conditional.file_load_select == "yes":
+            #if $file_load_section.file_load_conditional.input[0].is_of_type("mzxml") or $file_load_section.file_load_conditional.input[0].is_of_type("mzml") or $file_load_section.file_load_conditional.input[0].is_of_type("mzdata") or $file_load_section.file_load_conditional.input[0].is_of_type("netcdf"):
+                #set singlefile_galaxyPath = ','.join( [ str( $single_file ) for $single_file in $file_load_section.file_load_conditional.input ] )
+                #set singlefile_sampleName = ','.join( [ str( $single_file.name ) for $single_file in $file_load_section.file_load_conditional.input ] )
+
+                singlefile_galaxyPath '$singlefile_galaxyPath' singlefile_sampleName '$singlefile_sampleName'
+            #else
+                zipfile '$file_load_section.file_load_conditional.input'
             #end if
         #end if
     </token>
 
-    <xml name="zipfile_load">
-        <conditional name="zipfile_load_conditional">
-            <param name="zipfile_load_select" type="select" label="Resubmit your zip file" help="Use only if you get a message which say that your original zip file have been deleted on the server." >
-                <option value="no" >no need</option>
-                <option value="yes">yes</option>
-            </param>
-            <when value="no">
+    <xml name="input_file_load">
+        <section name="file_load_section" title="Resubmit your raw dataset or your zip file">
+            <conditional name="file_load_conditional">
+                <param name="file_load_select" type="select" label="Resubmit your dataset or your zip file" help="Use only if you get a message which say that your original dataset or zip file have been deleted on the server." >
+                    <option value="no" >no need</option>
+                    <option value="yes" >yes</option>
+                </param>
+                <when value="no">
+                </when>
+                <when value="yes">
+                    <param name="input" type="data" format="mzxml,mzml,mzdata,netcdf,no_unzip.zip,zip" multiple="true" label="File(s) from your history containing your chromatograms" help="Single file mode for the format: mzxml, mzml, mzdata and netcdf. Zip file mode for the format: no_unzip.zip, zip. See the help section below." />
+                </when>
+            </conditional>
+        </section>
+    </xml>
+
+    <xml name="test_file_load_zip">
+        <section name="file_load_section">
+            <conditional name="file_load_conditional">
+                <param name="file_load_select" value="yes" />
+                <param name="input" value="faahKO_reduce.zip" ftype="zip" />
+            </conditional>
+        </section>
+    </xml>
+
+    <xml name="test_file_load_single">
+        <section name="file_load_section">
+            <conditional name="file_load_conditional">
+                <param name="file_load_select" value="yes" />
+                <param name="input" value="wt15.CDF,ko16.CDF,ko15.CDF,wt16.CDF" ftype="netcdf" />
+            </conditional>
+        </section>
+    </xml>
+
+    <token name="@COMMAND_PEAKLIST@">
+        #if $peaklist.peaklistBool
+            variableMetadataOutput '$variableMetadata'
+            dataMatrixOutput '$dataMatrix'
+            convertRTMinute $peaklist.convertRTMinute
+            numDigitsMZ $peaklist.numDigitsMZ
+            numDigitsRT $peaklist.numDigitsRT
+            intval $peaklist.intval
+        #end if
+    </token>
+
+    <xml name="input_peaklist">
+        <conditional name="peaklist">
+            <param name="peaklistBool" type="boolean" label="Get a Peak List" />
+            <when value="true">
+              <param name="convertRTMinute" type="boolean" checked="false" truevalue="TRUE" falsevalue="FALSE" label="Convert retention time (seconds) into minutes" help="Convert the columns rtmed, rtmin and rtmax into minutes"/>
+              <param name="numDigitsMZ" type="integer" value="4" label="Number of decimal places for mass values reported in ions' identifiers." help="A minimum of 4 decimal places is recommended. Useful to avoid duplicates within identifiers" />
+              <param name="numDigitsRT" type="integer" value="0" label="Number of decimal places for retention time values reported in ions' identifiers." help="Useful to avoid duplicates within identifiers" />
+              <param name="intval" type="select" label="Reported intensity values" help="[intval] See the help section below">
+                  <option value="into" selected="true">into</option>
+                  <option value="maxo">maxo</option>
+                  <option value="intb">intb</option>
+              </param>
             </when>
-            <when value="yes">
-                <param name="zip_file" type="data" format="no_unzip.zip,zip" label="Zip file" />
-            </when>
+            <when value="false" />
         </conditional>
     </xml>
 
-
+    <xml name="output_peaklist"  token_function="">
+        <data name="variableMetadata" format="tabular" label="${image.name[:-6]}.@FUNCTION@.variableMetadata.tsv">
+            <filter>(peaklist['peaklistBool'])</filter>
+        </data>
+        <data name="dataMatrix" format="tabular" label="${image.name[:-6]}.@FUNCTION@.dataMatrix.tsv" >
+            <filter>(peaklist['peaklistBool'])</filter>
+        </data>
+    </xml>
 
     <token name="@HELP_AUTHORS@">
 .. class:: infomark
 
-**Authors**  Colin A. Smith csmith@scripps.edu, Ralf Tautenhahn rtautenh@gmail.com, Steffen Neumann sneumann@ipb-halle.de, Paul Benton hpaul.benton08@imperial.ac.uk and Christopher Conley cjconley@ucdavis.edu 
+**Authors**  Colin A. Smith csmith@scripps.edu, Ralf Tautenhahn rtautenh@gmail.com, Steffen Neumann sneumann@ipb-halle.de, Paul Benton hpaul.benton08@imperial.ac.uk and Christopher Conley cjconley@ucdavis.edu
 
 .. class:: infomark
 
b
diff -r 2c1d7df89cf6 -r c81275aee959 planemo_test.sh
--- a/planemo_test.sh Mon Jan 30 08:53:13 2017 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
@@ -1,30 +0,0 @@
-# Example of planemo command to launch test
-
-
-# -- 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-xcms/1.44.0/lecorguille/package_bioconductor_xcms_1_44_0/0c38f7d43e08/env.sh
-planemo test --install_galaxy
-
-#All 2 test(s) executed passed.
-#abims_xcms_group[0]: passed
-#abims_xcms_group[1]: 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 2 test(s) executed passed.
-#abims_xcms_group[0]: passed
-#abims_xcms_group[1]: passed
-
-
-# -- Use of shed_test
-planemo shed_test --install_galaxy  -t testtoolshed
-
-#All 2 test(s) executed passed.
-#testtoolshed.g2.bx.psu.edu/repos/lecorguille/xcms_group/abims_xcms_group/2.0.5[0]: passed
-#testtoolshed.g2.bx.psu.edu/repos/lecorguille/xcms_group/abims_xcms_group/2.0.5[1]: passed
b
diff -r 2c1d7df89cf6 -r c81275aee959 static/images/xcms_group_workflow.png
b
Binary file static/images/xcms_group_workflow.png has changed
b
diff -r 2c1d7df89cf6 -r c81275aee959 test-data/MM-single.xset.merged.RData
b
Binary file test-data/MM-single.xset.merged.RData has changed
b
diff -r 2c1d7df89cf6 -r c81275aee959 test-data/faahKO-single-class.xset.merged.RData
b
Binary file test-data/faahKO-single-class.xset.merged.RData has changed
b
diff -r 2c1d7df89cf6 -r c81275aee959 test-data/faahKO-single.xset.merged.RData
b
Binary file test-data/faahKO-single.xset.merged.RData has changed
b
diff -r 2c1d7df89cf6 -r c81275aee959 test-data/faahKO-single.xset.merged.group.retcor.RData
b
Binary file test-data/faahKO-single.xset.merged.group.retcor.RData has changed
b
diff -r 2c1d7df89cf6 -r c81275aee959 test-data/faahKO.xset.group.dataMatrix.tsv
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/faahKO.xset.group.dataMatrix.tsv Fri Apr 07 07:35:31 2017 -0400
b
b'@@ -0,0 +1,8276 @@\n+name\tko15\tko16\twt15\twt16\n+M200T2877\tNA\t506848.884266667\tNA\tNA\n+M200T3874\t1144.01499999999\tNA\tNA\tNA\n+M200T3483\t6029.94499999992\tNA\tNA\tNA\n+M200T3188\tNA\t4333.4849999999\tNA\tNA\n+M200T3523\tNA\tNA\t4586.52650000006\tNA\n+M200T3672\tNA\tNA\t5108.15999999988\tNA\n+M200T3980\tNA\tNA\tNA\t1242.61000000004\n+M200T3811\tNA\tNA\t1018.81499999998\tNA\n+M201T3548\tNA\t2863.6449999999\tNA\tNA\n+M201T4055\tNA\tNA\t1339.64000000005\tNA\n+M201T3778\tNA\tNA\t1680.81000000006\tNA\n+M201T3270\tNA\tNA\t4090.91000000014\tNA\n+M201T3630\tNA\tNA\tNA\t2931.24499999993\n+M201T2559\tNA\t14307.2299999999\tNA\tNA\n+M201T3141\tNA\t254581.758476187\tNA\tNA\n+M201T3506\t4023.61499999999\tNA\tNA\tNA\n+M201T3683\tNA\tNA\t2906.20499999993\tNA\n+M201T4059\tNA\tNA\t1275.47500000004\tNA\n+M201T3802\tNA\tNA\tNA\t3245.80999999992\n+M201T3991\tNA\tNA\t1657.33500000006\tNA\n+M201T3885\tNA\t1220.70000000004\tNA\tNA\n+M201T4157\tNA\t774.575999999962\tNA\tNA\n+M201T3930\tNA\tNA\t1284.72816666668\tNA\n+M201T4040\tNA\tNA\tNA\t1220.69999999998\n+M202T4013\tNA\tNA\t831.015000000029\tNA\n+M202T3852\t892.050000000031\tNA\tNA\tNA\n+M202T3298\t2759.095\tNA\tNA\tNA\n+M202T3285\tNA\t3872.96250000005\tNA\tNA\n+M202T3318\t3588.54500000001\tNA\tNA\tNA\n+M202T4062\tNA\tNA\t754.233600000007\tNA\n+M202T3758\tNA\tNA\t1151.71733333335\tNA\n+M202T3170\t7682.58500000004\tNA\tNA\tNA\n+M202T3375\t9879.84499999977\tNA\tNA\tNA\n+M202T3897\tNA\t841.96999999998\tNA\tNA\n+M202T3267\t77227.3769090911\tNA\tNA\tNA\n+M202T4145\tNA\tNA\tNA\t732.419999999983\n+M202T4035\tNA\t688.600000000024\tNA\tNA\n+M202T3190\tNA\t3806.07999999999\tNA\tNA\n+M202T4012\tNA\t1629.165\tNA\tNA\n+M202T2896\t36435.3079999996\tNA\tNA\tNA\n+M202T3936\tNA\tNA\t1461.71\tNA\n+M202T3295\tNA\tNA\tNA\t3372.57500000002\n+M203T4041\tNA\tNA\tNA\t978.124999999977\n+M203T3320\tNA\tNA\tNA\t1136.19000000004\n+M203T3310\tNA\t1694.89499999996\tNA\tNA\n+M203T3972\tNA\tNA\t2796.65500000002\tNA\n+M203T2683\tNA\tNA\tNA\t6346.07499999991\n+M203T3725\tNA\tNA\tNA\t3345.96999999992\n+M203T3325\t3852.53759999981\tNA\tNA\tNA\n+M203T3353\tNA\t2974.74816666671\tNA\tNA\n+M203T4181\tNA\t804.409999999981\tNA\tNA\n+M203T3794\tNA\t2690.23500000009\tNA\tNA\n+M203T4143\tNA\t1020.37999999998\tNA\tNA\n+M203T4060\tNA\tNA\tNA\t1550.91499999999\n+M204T3517\tNA\tNA\t967.169999999987\tNA\n+M204T3059\t3905.96266666662\tNA\tNA\tNA\n+M204T3661\t3002.85120000003\tNA\tNA\tNA\n+M204T4132\tNA\tNA\tNA\t793.455000000074\n+M204T4018\t1111.14999999999\tNA\tNA\tNA\n+M204T3838\tNA\tNA\t1676.11500000006\tNA\n+M204T4146\tNA\tNA\tNA\t1089.24000000004\n+M204T2625\tNA\tNA\t3518.12000000012\tNA\n+M204T3401\tNA\tNA\tNA\t1586.91\n+M204T4077\tNA\t1062.63500000004\tNA\tNA\n+M204T3706\tNA\tNA\tNA\t1446.05999999997\n+M204T3602\tNA\tNA\tNA\t1032.90000000004\n+M205T3580\tNA\tNA\tNA\t2466.43999999994\n+M205T2591\tNA\tNA\tNA\t9189.67999999988\n+M205T2788\t1924712.01585714\t1757150.9648\t2129885.09357143\t1634341.9855862\n+M205T4035\t2600.69759999987\tNA\tNA\tNA\n+M205T3778\t2777.8750000001\tNA\t5180.14999999997\tNA\n+M205T3756\tNA\tNA\t2425.44000000002\tNA\n+M205T3919\tNA\t3392.55866666671\tNA\tNA\n+M205T4057\tNA\tNA\t1198.79000000004\tNA\n+M206T4073\tNA\tNA\t793.454999999982\tNA\n+M206T3295\tNA\tNA\tNA\t1023.50999999998\n+M206T3093\tNA\tNA\tNA\t4682.47999999989\n+M206T3345\tNA\tNA\t641.649999999985\tNA\n+M206T4099\t1685.41525000004\tNA\tNA\tNA\n+M206T3196\tNA\t10174.0649999999\tNA\tNA\n+M206T2783\t213659.293920001\tNA\t253825.557279999\t241844.442068965\n+M206T3448\tNA\tNA\tNA\t3090.62812500006\n+M206T3674\tNA\tNA\tNA\t2237.94999999995\n+M206T3262\tNA\tNA\tNA\t3137.82499999993\n+M206T3699\tNA\tNA\tNA\t1953.12000000007\n+M206T2539\tNA\tNA\t9324.27000000002\tNA\n+M206T3357\tNA\tNA\tNA\t1536.82999999996\n+M206T3766\tNA\tNA\tNA\t2529.03999999997\n+M206T3185\t1931.20999999997\tNA\tNA\tNA\n+M206T4052\tNA\tNA\tNA\t1505.46128571426\n+M206T3551\tNA\tNA\t3048.62\tNA\n+M206T3433\tNA\tNA\tNA\t2558.77500000009\n+M206T3237\t1713.67500000006\tNA\tNA\tNA\n+M206T3777\tNA\tNA\tNA\t3962.32680000009\n+M206T3375\tNA\tNA\tNA\t2723.09999999996\n+M206T3300\tNA\tNA\tNA\t3643.31999999999\n+M207T3586\tNA\tNA\tNA\t6897.63840000006\n+M207T3137\tNA\t9225.67499999978\tNA\tNA\n+M207T2864\tNA\t12172.5700000004\tNA\tNA\n+M207T3179\tNA\t6866.59314285725\tNA\tNA\n+M207T3771\tNA\tNA\tNA\t4175.41999999994\n+M207T2719\tNA\t451863.663\t364609.769939392\t360908.933642857\n+M207T2907\tNA\tNA\tNA\t8494.8200000003\n+M207T4090\tNA\tNA\t2114.31500000007\tNA\n+M207T3670\tNA\tNA\tNA\t8972.14499999979\n+M207T3442\tNA\t50'..b'9988\tNA\tNA\n+M596T3606\tNA\tNA\t19895.845\tNA\n+M596T3786\t35248.4949999998\tNA\tNA\tNA\n+M596T3182_2\tNA\tNA\tNA\t1197.07200000001\n+M597T3968\t5639.95966666667\tNA\tNA\tNA\n+M597T2545\tNA\t2941.96500000005\tNA\tNA\n+M597T2534\tNA\t3727.82999999995\tNA\tNA\n+M597T2551\tNA\tNA\tNA\t4759.16500000003\n+M597T2720\tNA\tNA\t4531.87800000008\tNA\n+M597T3071\tNA\tNA\t7801.52500000005\tNA\n+M597T2566\tNA\t2184.73999999997\tNA\tNA\n+M597T2589\t3938.68550000005\tNA\tNA\tNA\n+M597T3478\tNA\t7109.79500000002\tNA\tNA\n+M597T3292\tNA\t6108.19500000008\tNA\tNA\n+M597T3874\tNA\tNA\t1399.11000000005\tNA\n+M597T3664\t3813.49883333338\tNA\tNA\tNA\n+M597T3789\tNA\tNA\t9477.64000000033\tNA\n+M597T4082\tNA\tNA\t27582.3906250001\tNA\n+M597T2922\tNA\tNA\tNA\t3881.19999999991\n+M597T2539\tNA\tNA\tNA\t4424.01941666667\n+M597T2791\tNA\tNA\t23087.5229375002\tNA\n+M597T4130\t15187.814210526\tNA\tNA\tNA\n+M597T3021\tNA\t8213.12000000029\tNA\tNA\n+M597T3813\tNA\t1186500.84141178\tNA\tNA\n+M598T2896\tNA\tNA\tNA\t2579.12000000009\n+M598T2652\tNA\tNA\tNA\t5450.66280000004\n+M598T3985\t4690.30499999994\tNA\tNA\tNA\n+M598T3852\tNA\tNA\t6475.97000000023\tNA\n+M598T3927\tNA\tNA\tNA\t5100.33500000001\n+M598T4234\t780.835199999962\tNA\tNA\tNA\n+M598T3911\t2421.055\tNA\tNA\tNA\n+M598T3866\tNA\tNA\t923.232000000008\tNA\n+M598T2838\t4328.7899999999\tNA\tNA\tNA\n+M598T2735\tNA\tNA\t3392.92\tNA\n+M598T2526\tNA\tNA\t3350.66499999992\tNA\n+M598T3054\tNA\tNA\t3904.17600000003\tNA\n+M598T2564\tNA\tNA\t5259.96499999993\tNA\n+M598T3243\tNA\tNA\t11160.015\tNA\n+M598T3688\tNA\tNA\tNA\t2907.39840000003\n+M598T3165\tNA\tNA\tNA\t1547.78500000005\n+M598T3570\t4893.75500000017\tNA\tNA\tNA\n+M598T3738\t6735.75999999984\tNA\tNA\tNA\n+M598T2990\tNA\t7907.94500000028\tNA\tNA\n+M598T3724\tNA\t29323.4050000004\tNA\t48876.8056363635\n+M598T3850\tNA\t19344.1924374998\tNA\tNA\n+M598T4228_1\tNA\tNA\tNA\t852.92499999998\n+M598T3702\tNA\tNA\tNA\t28572.205000001\n+M598T2827\t5337.7886250001\tNA\tNA\tNA\n+M598T3223\tNA\t16185.5021250003\tNA\tNA\n+M598T3814\tNA\t201593.909999999\tNA\tNA\n+M598T3115\t3137.82499999993\tNA\tNA\tNA\n+M598T3487\tNA\tNA\t9308.62000000032\tNA\n+M598T3825\tNA\t126881.278714286\tNA\tNA\n+M598T3708\tNA\tNA\tNA\t65022.6200000009\n+M598T3400\tNA\tNA\t4532.24000000016\tNA\n+M598T4228_2\t1558.64039999994\tNA\tNA\tNA\n+M598T3371\tNA\tNA\tNA\t7501.04499999995\n+M598T2659\t2139.08160000002\tNA\tNA\tNA\n+M598T2680\tNA\t2826.02880000002\tNA\tNA\n+M598T2534\tNA\t1600.99499999996\tNA\tNA\n+M598T4015\t4444.59999999997\tNA\tNA\tNA\n+M598T3181\tNA\t2838.6076666667\tNA\tNA\n+M598T2764\tNA\t5078.42499999999\tNA\tNA\n+M598T2952\t5756.0700000002\tNA\tNA\tNA\n+M599T4234\tNA\tNA\tNA\t881.094999999979\n+M599T3187\tNA\tNA\tNA\t2164.39499999999\n+M599T2855\tNA\tNA\tNA\t3757.56499999997\n+M599T2935\tNA\t2557.20999999994\tNA\tNA\n+M599T2622\tNA\t2237.94999999995\tNA\tNA\n+M599T2619\t24597.6221333335\tNA\tNA\tNA\n+M599T3096\tNA\tNA\tNA\t5745.1150000002\n+M599T4179\tNA\tNA\t769.979999999982\tNA\n+M599T3744_1\tNA\t8220.94499999976\tNA\tNA\n+M599T2885\tNA\tNA\tNA\t3269.28500000002\n+M599T4196\t1370.93999999996\tNA\tNA\tNA\n+M599T4163\tNA\t8068.71033333314\tNA\t5823.36499999964\n+M599T3478\tNA\tNA\tNA\t6298.5500000001\n+M599T3697\tNA\tNA\t55051.9369090907\tNA\n+M599T4129\tNA\tNA\t13849.6178571426\tNA\n+M599T3719\t22852.13\tNA\tNA\tNA\n+M599T3839\tNA\tNA\t5238.05500000018\tNA\n+M599T3980\tNA\t15327.6100000005\tNA\tNA\n+M599T4048\t798856.451441174\tNA\t897286.005000001\tNA\n+M599T3929\tNA\tNA\tNA\t2271127.28014893\n+M599T3744_2\t2472129.73859259\tNA\tNA\tNA\n+M599T3731\tNA\tNA\t1909653.70493332\tNA\n+M599T3431\t35592.8437333336\tNA\tNA\tNA\n+M599T4130\tNA\tNA\tNA\t707685.939314288\n+M599T2847\tNA\t5415.77280000005\tNA\tNA\n+M599T3810\t79625.6350000028\tNA\tNA\tNA\n+M599T2974\tNA\tNA\tNA\t12502.4521250001\n+M599T4127\tNA\t354770.43852632\tNA\tNA\n+M599T3724\tNA\tNA\t797434.72246154\tNA\n+M600T2730\tNA\tNA\tNA\t1760.62499999996\n+M600T3407\t3353.79499999992\tNA\tNA\tNA\n+M600T3005\tNA\t5849.96999999986\tNA\tNA\n+M600T3609\tNA\tNA\tNA\t5001.73999999997\n+M600T2523\tNA\tNA\t3209.81499999996\tNA\n+M600T2562\tNA\t2928.1150000001\tNA\tNA\n+M600T2606\t6022.12000000021\tNA\tNA\t2331.63714285708\n+M600T2782\tNA\tNA\tNA\t2608.74386666668\n+M600T3449\t4671.52499999989\t8782.77999999999\tNA\tNA\n+M600T3079\tNA\tNA\tNA\t3430.04160000003\n+M600T2542\tNA\t3639.80233333338\tNA\tNA\n+M600T2966\t9211.58999999991\tNA\tNA\tNA\n+M600T3207\t7784.31000000027\tNA\tNA\tNA\n+M600T2846\tNA\tNA\tNA\t1987.33833333336\n+M600T3348\t2327.15500000008\tNA\tNA\tNA\n'
b
diff -r 2c1d7df89cf6 -r c81275aee959 test-data/faahKO.xset.group.variableMetadata.tsv
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/faahKO.xset.group.variableMetadata.tsv Fri Apr 07 07:35:31 2017 -0400
b
b'@@ -0,0 +1,8276 @@\n+name\tnamecustom\tmz\tmzmin\tmzmax\trt\trtmin\trtmax\tnpeaks\tKO\tWT\n+M200T2877\tM200.1T2877\t200.100006103516\t200.100006103516\t200.100006103516\t2876.967\t2876.967\t2876.967\t1\t1\t0\n+M200T3874\tM200.2T3873.8\t200.199996948242\t200.199996948242\t200.199996948242\t3873.842\t3873.842\t3873.842\t1\t1\t0\n+M200T3483\tM200.2T3482.6\t200.199996948242\t200.199996948242\t200.199996948242\t3482.604\t3482.604\t3482.604\t1\t1\t0\n+M200T3188\tM200.2T3188.4\t200.199996948242\t200.199996948242\t200.199996948242\t3188.392\t3188.392\t3188.392\t1\t1\t0\n+M200T3523\tM200.2T3523.3\t200.199996948242\t200.199996948242\t200.199996948242\t3523.293\t3523.293\t3523.293\t1\t0\t1\n+M200T3672\tM200.2T3672\t200.199996948242\t200.199996948242\t200.199996948242\t3671.963\t3671.963\t3671.963\t1\t0\t1\n+M200T3980\tM200.3T3980.3\t200.300003051758\t200.300003051758\t200.300003051758\t3980.259\t3980.259\t3980.259\t1\t0\t1\n+M200T3811\tM200.3T3811.2\t200.300003051758\t200.300003051758\t200.300003051758\t3811.244\t3811.244\t3811.244\t1\t0\t1\n+M201T3548\tM200.8T3548.3\t200.800003051758\t200.800003051758\t200.800003051758\t3548.332\t3548.332\t3548.332\t1\t1\t0\n+M201T4055\tM200.8T4055.4\t200.800003051758\t200.800003051758\t200.800003051758\t4055.377\t4055.377\t4055.377\t1\t0\t1\n+M201T3778\tM200.8T3778.4\t200.800003051758\t200.800003051758\t200.800003051758\t3778.38\t3778.38\t3778.38\t1\t0\t1\n+M201T3270\tM200.9T3269.8\t200.900009155273\t200.900009155273\t200.900009155273\t3269.77\t3269.77\t3269.77\t1\t0\t1\n+M201T3630\tM200.9T3629.7\t200.900009155273\t200.900009155273\t200.900009155273\t3629.709\t3629.709\t3629.709\t1\t0\t1\n+M201T2559\tM200.9T2559.3\t200.900009155273\t200.900009155273\t200.900009155273\t2559.281\t2559.281\t2559.281\t1\t1\t0\n+M201T3141\tM201.1T3141.4\t201.100006103516\t201.100006103516\t201.100006103516\t3141.444\t3141.444\t3141.444\t1\t1\t0\n+M201T3506\tM201.2T3506.1\t201.199996948242\t201.199996948242\t201.199996948242\t3506.078\t3506.078\t3506.078\t1\t1\t0\n+M201T3683\tM201.2T3682.9\t201.199996948242\t201.199996948242\t201.199996948242\t3682.918\t3682.918\t3682.918\t1\t0\t1\n+M201T4059\tM201.2T4058.5\t201.199996948242\t201.199996948242\t201.199996948242\t4058.507\t4058.507\t4058.507\t1\t0\t1\n+M201T3802\tM201.2T3801.9\t201.199996948242\t201.199996948242\t201.199996948242\t3801.854\t3801.854\t3801.854\t1\t0\t1\n+M201T3991\tM201.2T3991.2\t201.199996948242\t201.199996948242\t201.199996948242\t3991.214\t3991.214\t3991.214\t1\t0\t1\n+M201T3885\tM201.3T3884.8\t201.300003051758\t201.300003051758\t201.300003051758\t3884.797\t3884.797\t3884.797\t1\t1\t0\n+M201T4157\tM201.3T4157.1\t201.300003051758\t201.300003051758\t201.300003051758\t4157.099\t4157.099\t4157.099\t1\t1\t0\n+M201T3930\tM201.3T3930.2\t201.300003051758\t201.300003051758\t201.300003051758\t3930.18\t3930.18\t3930.18\t1\t0\t1\n+M201T4040\tM201.3T4039.7\t201.300003051758\t201.300003051758\t201.300003051758\t4039.727\t4039.727\t4039.727\t1\t0\t1\n+M202T4013\tM201.7T4013.1\t201.699996948242\t201.699996948242\t201.699996948242\t4013.123\t4013.123\t4013.123\t1\t0\t1\n+M202T3852\tM201.7T3851.9\t201.699996948242\t201.699996948242\t201.699996948242\t3851.933\t3851.933\t3851.933\t1\t1\t0\n+M202T3298\tM201.8T3297.9\t201.800003051758\t201.800003051758\t201.800003051758\t3297.939\t3297.939\t3297.939\t1\t1\t0\n+M202T3285\tM201.8T3285.4\t201.800003051758\t201.800003051758\t201.800003051758\t3285.419\t3285.419\t3285.419\t1\t1\t0\n+M202T3318\tM201.8T3318.3\t201.800003051758\t201.800003051758\t201.800003051758\t3318.284\t3318.284\t3318.284\t1\t1\t0\n+M202T4062\tM201.8T4061.6\t201.800003051758\t201.800003051758\t201.800003051758\t4061.637\t4061.637\t4061.637\t1\t0\t1\n+M202T3758\tM201.8T3758\t201.800003051758\t201.800003051758\t201.800003051758\t3758.036\t3758.036\t3758.036\t1\t0\t1\n+M202T3170\tM201.8T3169.6\t201.800003051758\t201.800003051758\t201.800003051758\t3169.613\t3169.613\t3169.613\t1\t1\t0\n+M202T3375\tM201.8T3374.6\t201.800003051758\t201.800003051758\t201.800003051758\t3374.622\t3374.622\t3374.622\t1\t1\t0\n+M202T3897\tM201.9T3897.3\t201.900009155273\t201.900009155273\t201.900009155273\t3897.316\t3897.316\t3897.316\t1\t1\t0\n+M202T3267\tM201.9T3266.6\t201.900009155273\t201.900009155273\t201.900009155273\t3266.64\t3266.64\t3266.64\t1\t1\t0\n+M202T4145\tM201.9T4144.6\t201.900009155273\t201.900009155273\t201.900009155273\t4144.579\t4144.579\t4144.579\t1\t0\t1\n+M202T4035\tM20'..b'855.057\t1\t0\t1\n+M599T2935\tM598.7T2934.9\t598.700012207031\t598.700012207031\t598.700012207031\t2934.87\t2934.87\t2934.87\t1\t1\t0\n+M599T2622\tM598.8T2621.9\t598.799987792969\t598.799987792969\t598.799987792969\t2621.879\t2621.879\t2621.879\t1\t1\t0\n+M599T2619\tM598.9T2618.8\t598.900024414062\t598.900024414062\t598.900024414062\t2618.75\t2618.75\t2618.75\t1\t1\t0\n+M599T3096\tM598.9T3096.1\t598.900024414062\t598.900024414062\t598.900024414062\t3096.06\t3096.06\t3096.06\t1\t0\t1\n+M599T4179\tM599T4179\t599\t599\t599\t4179.008\t4179.008\t4179.008\t1\t0\t1\n+M599T3744_1\tM599.1T3744_1\t599.100036621094\t599.100036621094\t599.100036621094\t3743.951\t3743.951\t3743.951\t1\t1\t0\n+M599T2885\tM599.1T2884.8\t599.100036621094\t599.100036621094\t599.100036621094\t2884.791\t2884.791\t2884.791\t1\t0\t1\n+M599T4196\tM599.1T4196.2\t599.100036621094\t599.100036621094\t599.100036621094\t4196.223\t4196.223\t4196.223\t1\t1\t0\n+M599T4163\tM599.2T4163.4\t599.200012207031\t599.200012207031\t599.200012207031\t4163.358\t4160.228\t4166.488\t2\t1\t1\n+M599T3478\tM599.2T3477.9\t599.200012207031\t599.200012207031\t599.200012207031\t3477.909\t3477.909\t3477.909\t1\t0\t1\n+M599T3697\tM599.2T3697\t599.200012207031\t599.200012207031\t599.200012207031\t3697.002\t3697.002\t3697.002\t1\t0\t1\n+M599T4129\tM599.2T4128.9\t599.200012207031\t599.200012207031\t599.200012207031\t4128.93\t4128.93\t4128.93\t1\t0\t1\n+M599T3719\tM599.2T3718.9\t599.200012207031\t599.200012207031\t599.200012207031\t3718.912\t3718.912\t3718.912\t1\t1\t0\n+M599T3839\tM599.2T3839.4\t599.200012207031\t599.200012207031\t599.200012207031\t3839.413\t3839.413\t3839.413\t1\t0\t1\n+M599T3980\tM599.2T3980.3\t599.200012207031\t599.200012207031\t599.200012207031\t3980.259\t3980.259\t3980.259\t1\t1\t0\n+M599T4048\tM599.3T4047.6\t599.299987792969\t599.299987792969\t599.299987792969\t4047.552\t4047.552\t4053.812\t3\t1\t1\n+M599T3929\tM599.3T3928.6\t599.299987792969\t599.299987792969\t599.299987792969\t3928.615\t3928.615\t3928.615\t2\t0\t1\n+M599T3744_2\tM599.3T3744_2\t599.299987792969\t599.299987792969\t599.299987792969\t3743.951\t3743.951\t3743.951\t1\t1\t0\n+M599T3731\tM599.3T3731.4\t599.299987792969\t599.299987792969\t599.299987792969\t3731.431\t3731.431\t3731.431\t1\t0\t1\n+M599T3431\tM599.3T3431\t599.299987792969\t599.299987792969\t599.299987792969\t3430.96\t3430.96\t3430.96\t1\t1\t0\n+M599T4130\tM599.3T4130.5\t599.299987792969\t599.299987792969\t599.299987792969\t4130.494\t4130.494\t4130.494\t1\t0\t1\n+M599T2847\tM599.4T2847.2\t599.400024414062\t599.400024414062\t599.400024414062\t2847.232\t2847.232\t2847.232\t1\t1\t0\n+M599T3810\tM599.4T3809.7\t599.400024414062\t599.400024414062\t599.400024414062\t3809.679\t3809.679\t3809.679\t1\t1\t0\n+M599T2974\tM599.4T2974\t599.400024414062\t599.400024414062\t599.400024414062\t2973.994\t2973.994\t2973.994\t1\t0\t1\n+M599T4127\tM599.4T4127.4\t599.400024414062\t599.400024414062\t599.400024414062\t4127.364\t4127.364\t4127.364\t1\t1\t0\n+M599T3724\tM599.4T3723.6\t599.400024414062\t599.400024414062\t599.400024414062\t3723.607\t3723.607\t3723.607\t1\t0\t1\n+M600T2730\tM599.5T2729.9\t599.5\t599.5\t599.5\t2729.861\t2729.861\t2729.861\t1\t0\t1\n+M600T3407\tM599.5T3407.5\t599.5\t599.5\t599.5\t3407.486\t3407.486\t3407.486\t1\t1\t0\n+M600T3005\tM599.5T3005.3\t599.5\t599.5\t599.5\t3005.293\t3005.293\t3005.293\t1\t1\t0\n+M600T3609\tM599.5T3609.4\t599.5\t599.5\t599.5\t3609.365\t3609.365\t3609.365\t1\t0\t1\n+M600T2523\tM599.8T2523.3\t599.799987792969\t599.799987792969\t599.799987792969\t2523.287\t2523.287\t2523.287\t1\t0\t1\n+M600T2562\tM599.8T2562.4\t599.799987792969\t599.799987792969\t599.799987792969\t2562.411\t2562.411\t2562.411\t1\t1\t0\n+M600T2606\tM599.9T2606.2\t599.900024414062\t599.900024414062\t599.900024414062\t2606.23\t2604.665\t2607.795\t2\t1\t1\n+M600T2782\tM599.9T2781.5\t599.900024414062\t599.900024414062\t599.900024414062\t2781.504\t2781.504\t2781.504\t1\t0\t1\n+M600T3449\tM600T3449\t600\t600\t600\t3448.9575\t3445.045\t3452.87\t2\t2\t0\n+M600T3079\tM600T3078.8\t600\t600\t600\t3078.845\t3078.845\t3078.845\t1\t0\t1\n+M600T2542\tM600T2542.1\t600\t600\t600\t2542.067\t2542.067\t2542.067\t1\t1\t0\n+M600T2966\tM600T2966.2\t600\t600\t600\t2966.169\t2966.169\t2966.169\t1\t1\t0\n+M600T3207\tM600T3207.2\t600\t600\t600\t3207.172\t3207.172\t3207.172\t1\t1\t0\n+M600T2846\tM600T2845.7\t600\t600\t600\t2845.667\t2845.667\t2845.667\t1\t0\t1\n+M600T3348\tM600T3348\t600\t600\t600\t3348.018\t3348.018\t3348.018\t1\t1\t0\n'
b
diff -r 2c1d7df89cf6 -r c81275aee959 tool_dependencies.xml
--- a/tool_dependencies.xml Mon Jan 30 08:53:13 2017 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,9 +0,0 @@
-<?xml version="1.0"?>
-<tool_dependency>
-    <package name="R" version="3.1.2">
-        <repository changeset_revision="4d2fd1413b56" name="package_r_3_1_2" owner="iuc" toolshed="https://toolshed.g2.bx.psu.edu" />
-    </package>
-    <package name="bioconductor-xcms" version="1.46.0">
-        <repository changeset_revision="779207ed5674" name="package_bioconductor_xcms_1_46_0" owner="lecorguille" toolshed="https://toolshed.g2.bx.psu.edu" />
-    </package>
-</tool_dependency>
b
diff -r 2c1d7df89cf6 -r c81275aee959 xcms.r
--- a/xcms.r Mon Jan 30 08:53:13 2017 -0500
+++ b/xcms.r Fri Apr 07 07:35:31 2017 -0400
[
b'@@ -15,8 +15,8 @@\n #pkgs=c("xcms","batch")\n pkgs=c("parallel","BiocGenerics", "Biobase", "Rcpp", "mzR", "xcms","snow","batch")\n for(pkg in pkgs) {\n-  suppressPackageStartupMessages( stopifnot( library(pkg, quietly=TRUE, logical.return=TRUE, character.only=TRUE)))\n-  cat(pkg,"\\t",as.character(packageVersion(pkg)),"\\n",sep="")\n+    suppressPackageStartupMessages( stopifnot( library(pkg, quietly=TRUE, logical.return=TRUE, character.only=TRUE)))\n+    cat(pkg,"\\t",as.character(packageVersion(pkg)),"\\n",sep="")\n }\n source_local <- function(fname){ argv <- commandArgs(trailingOnly = FALSE); base_dir <- dirname(substring(argv[grep("--file=", argv)], 8)); source(paste(base_dir, fname, sep="/")) }\n cat("\\n\\n");\n@@ -38,7 +38,7 @@\n \n #image is an .RData file necessary to use xset variable given by previous tools\n if (!is.null(listArguments[["image"]])){\n-  load(listArguments[["image"]]); listArguments[["image"]]=NULL\n+    load(listArguments[["image"]]); listArguments[["image"]]=NULL\n }\n \n #Import the different functions\n@@ -61,110 +61,67 @@\n \n xsetRdataOutput = paste(thefunction,"RData",sep=".")\n if (!is.null(listArguments[["xsetRdataOutput"]])){\n-  xsetRdataOutput = listArguments[["xsetRdataOutput"]]; listArguments[["xsetRdataOutput"]]=NULL\n+    xsetRdataOutput = listArguments[["xsetRdataOutput"]]; listArguments[["xsetRdataOutput"]]=NULL\n }\n \n #saving the specific parameters\n rplotspdf = "Rplots.pdf"\n if (!is.null(listArguments[["rplotspdf"]])){\n-  rplotspdf = listArguments[["rplotspdf"]]; listArguments[["rplotspdf"]]=NULL\n+    rplotspdf = listArguments[["rplotspdf"]]; listArguments[["rplotspdf"]]=NULL\n }\n sampleMetadataOutput = "sampleMetadata.tsv"\n if (!is.null(listArguments[["sampleMetadataOutput"]])){\n-  sampleMetadataOutput = listArguments[["sampleMetadataOutput"]]; listArguments[["sampleMetadataOutput"]]=NULL\n+    sampleMetadataOutput = listArguments[["sampleMetadataOutput"]]; listArguments[["sampleMetadataOutput"]]=NULL\n }\n variableMetadataOutput = "variableMetadata.tsv"\n if (!is.null(listArguments[["variableMetadataOutput"]])){\n-  variableMetadataOutput = listArguments[["variableMetadataOutput"]]; listArguments[["variableMetadataOutput"]]=NULL\n+    variableMetadataOutput = listArguments[["variableMetadataOutput"]]; listArguments[["variableMetadataOutput"]]=NULL\n }\n dataMatrixOutput = "dataMatrix.tsv"\n if (!is.null(listArguments[["dataMatrixOutput"]])){\n-  dataMatrixOutput = listArguments[["dataMatrixOutput"]]; listArguments[["dataMatrixOutput"]]=NULL\n+    dataMatrixOutput = listArguments[["dataMatrixOutput"]]; listArguments[["dataMatrixOutput"]]=NULL\n }\n if (!is.null(listArguments[["convertRTMinute"]])){\n-  convertRTMinute = listArguments[["convertRTMinute"]]; listArguments[["convertRTMinute"]]=NULL\n+    convertRTMinute = listArguments[["convertRTMinute"]]; listArguments[["convertRTMinute"]]=NULL\n }\n if (!is.null(listArguments[["numDigitsMZ"]])){\n-  numDigitsMZ = listArguments[["numDigitsMZ"]]; listArguments[["numDigitsMZ"]]=NULL\n+    numDigitsMZ = listArguments[["numDigitsMZ"]]; listArguments[["numDigitsMZ"]]=NULL\n }\n if (!is.null(listArguments[["numDigitsRT"]])){\n   numDigitsRT = listArguments[["numDigitsRT"]]; listArguments[["numDigitsRT"]]=NULL\n }\n if (!is.null(listArguments[["intval"]])){\n-  intval = listArguments[["intval"]]; listArguments[["intval"]]=NULL\n+    intval = listArguments[["intval"]]; listArguments[["intval"]]=NULL\n }\n \n if (thefunction %in% c("xcmsSet","retcor")) {\n-  ticspdf = listArguments[["ticspdf"]]; listArguments[["ticspdf"]]=NULL\n-  bicspdf = listArguments[["bicspdf"]]; listArguments[["bicspdf"]]=NULL\n-}\n-\n-#necessary to unzip .zip file uploaded to Galaxy\n-#thanks to .zip file it\'s possible to upload many file as the same time conserving the tree hierarchy of directories\n-\n-\n-if (!is.null(listArguments[["zipfile"]])){\n-  zipfile= listArguments[["zipfile"]]; listArguments[["zipfile"]]=NULL\n-}\n-\n-if (!is.null(listArguments[["library"]])){\n-  directory=listArguments[["library"]]; listArguments[["library"]]'..b'set), listArguments)\n }\n \n cat("\\n\\n")\n@@ -172,8 +129,6 @@\n \n \n \n-\n-\n # ----- MAIN PROCESSING INFO -----\n cat("\\tMAIN PROCESSING INFO\\n")\n \n@@ -181,12 +136,12 @@\n #Verification of a group step before doing the fillpeaks job.\n \n if (thefunction == "fillPeaks") {\n-  res=try(is.null(groupnames(xset)))\n-  if (class(res) == "try-error"){\n-    error<-geterrmessage()\n-    write(error, stderr())\n-    stop("You must always do a group step after a retcor. Otherwise it won\'t work for the fillpeaks step")\n-  }\n+    res=try(is.null(groupnames(xset)))\n+    if (class(res) == "try-error"){\n+        error<-geterrmessage()\n+        write(error, stderr())\n+        stop("You must always do a group step after a retcor. Otherwise it won\'t work for the fillpeaks step")\n+    }\n \n }\n \n@@ -194,7 +149,7 @@\n #dev.new(file="Rplots.pdf", width=16, height=12)\n pdf(file=rplotspdf, width=16, height=12)\n if (thefunction == "group") {\n-  par(mfrow=c(2,2))\n+    par(mfrow=c(2,2))\n }\n #else if (thefunction == "retcor") {\n #try to change the legend display\n@@ -208,6 +163,11 @@\n cat("\\t\\tCOMPUTE\\n")\n xset = do.call(thefunction, listArguments)\n \n+# check if there are no peaks\n+if (nrow(peaks(xset)) == 0) {\n+    stop("No peaks were detected. You should review your settings")\n+}\n+\n \n cat("\\n\\n")\n \n@@ -215,40 +175,38 @@\n \n if (thefunction  == "xcmsSet") {\n \n-  #transform the files absolute pathways into relative pathways\n-  xset@filepaths<-sub(paste(getwd(),"/",sep="") ,"", xset@filepaths)\n+    #transform the files absolute pathways into relative pathways\n+    xset@filepaths<-sub(paste(getwd(),"/",sep="") ,"", xset@filepaths)\n+    if(exists("zipfile") && !is.null(zipfile) && (zipfile!="")) {\n \n-  if(exists("zipfile") && (zipfile!="")) {\n+        #Modify the samples names (erase the path)\n+        for(i in 1:length(sampnames(xset))){\n \n-    #Modify the samples names (erase the path)\n-    for(i in 1:length(sampnames(xset))){\n+            sample_name=unlist(strsplit(sampnames(xset)[i], "/"))\n+            sample_name=sample_name[length(sample_name)]\n+            sample_name= unlist(strsplit(sample_name,"[.]"))[1]\n+            sampnames(xset)[i]=sample_name\n \n-      sample_name=unlist(strsplit(sampnames(xset)[i], "/"))\n-      sample_name=sample_name[length(sample_name)]\n-      sample_name= unlist(strsplit(sample_name,"[.]"))[1]\n-      sampnames(xset)[i]=sample_name\n+        }\n \n     }\n \n-  }\n-\n }\n \n # -- TIC --\n if (thefunction == "xcmsSet") {\n-  cat("\\t\\tGET TIC GRAPH\\n")\n-  sampleNamesList = getSampleMetadata(xcmsSet=xset, sampleMetadataOutput=sampleMetadataOutput)\n-  getTICs(xcmsSet=xset, pdfname=ticspdf,rt="raw")\n-  getBPCs(xcmsSet=xset,rt="raw",pdfname=bicspdf)\n+    cat("\\t\\tGET TIC GRAPH\\n")\n+    sampleNamesList = getSampleMetadata(xcmsSet=xset, sampleMetadataOutput=sampleMetadataOutput)\n+    getTICs(xcmsSet=xset, pdfname=ticspdf,rt="raw")\n+    getBPCs(xcmsSet=xset,rt="raw",pdfname=bicspdf)\n } else if (thefunction == "retcor") {\n-  cat("\\t\\tGET TIC GRAPH\\n")\n-  getTICs(xcmsSet=xset, pdfname=ticspdf,rt="corrected")\n-  getBPCs(xcmsSet=xset,rt="corrected",pdfname=bicspdf)\n+    cat("\\t\\tGET TIC GRAPH\\n")\n+    getTICs(xcmsSet=xset, pdfname=ticspdf,rt="corrected")\n+    getBPCs(xcmsSet=xset,rt="corrected",pdfname=bicspdf)\n }\n \n-if (thefunction == "fillPeaks") {\n-  cat("\\t\\tGET THE PEAK LIST\\n")\n-  getPeaklistW4M(xset,intval,convertRTMinute,numDigitsMZ,numDigitsRT,variableMetadataOutput,dataMatrixOutput)\n+if ((thefunction == "group" || thefunction == "fillPeaks") && exists("intval")) {\n+    getPeaklistW4M(xset,intval,convertRTMinute,numDigitsMZ,numDigitsRT,variableMetadataOutput,dataMatrixOutput)\n }\n \n \n@@ -262,7 +220,7 @@\n \n \n #saving R data in .Rdata file to save the variables used in the present tool\n-objects2save = c("xset","zipfile","listOFlistArguments","md5sumList","sampleNamesList")\n+objects2save = c("xset","zipfile","singlefile","listOFlistArguments","md5sumList","sampleNamesList")\n save(list=objects2save[objects2save %in% ls()], file=xsetRdataOutput)\n \n cat("\\n\\n")\n'