changeset 10:753cde95b6a8 draft

Uploaded
author lecorguille
date Tue, 19 Jan 2016 10:02:28 -0500
parents 17d585d877ee
children 467dc9b12da5
files abims_xcms_report.xml abims_xcms_retcor.xml repository_dependencies.xml static/images/xcms_retcor.png static/images/xcms_retcor_workflow.png test-data/fillpeaks.RData test-data/log.txt test-data/report.html test-data/sacuri.zip test-data/xset.group.RData test-data/xset.group.retcor.BPCs_corrected.pdf test-data/xset.group.retcor.RData test-data/xset.group.retcor.Rplots.pdf test-data/xset.group.retcor.TICs_corrected.pdf
diffstat 14 files changed, 144 insertions(+), 355 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/abims_xcms_report.xml	Tue Jan 19 10:02:28 2016 -0500
@@ -0,0 +1,69 @@
+<tool id="abims_xcms_report" name="xcms.report" version="0.1.0">
+    
+    <description>Create a report of XCMS analysis</description>
+    
+    <requirements>
+        <requirement type="package" version="3.1.2">R</requirement>
+        <requirement type="binary">Rscript</requirement>
+        <requirement type="package" version="1.44.0">xcms</requirement>
+    </requirements>
+    
+    <stdio>
+        <exit_code range="1:" level="fatal" />
+    </stdio>
+    
+    <command interpreter="Rscript"><![CDATA[
+        xcms_report.r
+
+        image $image 
+        htmlOutput $htmlOutput
+        user_email $__user_email__
+       
+    ]]></command>
+    
+    <inputs>
+
+        <param name="image" type="data" format="rdata.xcms.raw,rdata.xcms.group,rdata.xcms.retcor,rdata.xcms.fillpeaks,rdata" label="xset RData file" help="output file from another function xcms (xcmsSet, group, retcor, fillpeaks etc.)" />
+
+    </inputs>
+    
+    <outputs>
+        <data name="htmlOutput" format="html" label="xcms report html" />
+    </outputs>
+    
+    <tests>
+        <test>
+            <param name="image" value="fillpeaks.RData" />
+            <output name="htmlOutput" file="report.html" />
+        </test>
+    </tests>
+    
+    <help><![CDATA[
+
+.. class:: infomark
+
+**Galaxy integration** ABiMS TEAM - UPMC/CNRS - Station biologique de Roscoff part of Workflow4Metabolomics.org [W4M]
+
+ | Contact support@workflow4metabolomics.org for any questions or concerns about the Galaxy implementation of this tool.
+
+---------------------------------------------------
+
+============
+Xcms.report
+============
+
+-----------
+Description
+-----------
+
+This tool provide a HTML report which summarizes your analysis using the [W4M] XCMS and CAMERA tools 
+
+
+    ]]></help>
+
+
+    <citations>
+        <citation type="doi">10.1093/bioinformatics/btu813</citation>
+    </citations>
+
+</tool>
--- a/abims_xcms_retcor.xml	Fri Jan 15 05:06:08 2016 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,301 +0,0 @@
-<tool id="abims_xcms_retcor" name="xcms.retcor" version="2.0.4">
-
-    <description>Retention Time Correction using retcor function from xcms R package </description>
-
-    <requirements>
-        <requirement type="package" version="3.1.2">R</requirement>
-        <requirement type="binary">Rscript</requirement>
-        <requirement type="package" version="1.44.0">xcms</requirement>
-        <requirement type="package" version="2.1">xcms_w4m_script</requirement>
-    </requirements>
-
-    <stdio>
-        <exit_code range="1:" level="fatal" />
-    </stdio>
-
-    <command><![CDATA[
-        xcms.r 
-        image $image 
-        xfunction retcor 
-
-        xsetRdataOutput $xsetRData
-        ticspdf $ticsCorPdf
-        bicspdf $bpcsCorPdf
-        rplotspdf $rplotsPdf
-
-        method $methods.method
-        #if $methods.method == "obiwarp":
-            profStep $methods.profStep
-        #else
-            smooth $methods.smooth
-            extra $methods.extra
-            missing $methods.missing
-            #if $methods.options.option == "show":
-                span $methods.options.span
-                family $methods.options.family
-                plottype $methods.options.plottype
-            #end if
-        #end if
-        #if $zip_file:
-            zipfile $zip_file
-        #end if
-        ;
-        return=\$?;
-        mv log.txt $log;
-        cat $log;
-        sh -c "exit \$return"
-        
-    ]]></command>
-
-    <inputs>
-        <param name="image" type="data" format="rdata.xcms.raw,rdata.xcms.group,rdata" label="xset RData file" help="output file from another function xcms (xcmsSet, retcor etc.)" />
-        <conditional name="methods">
-            <param name="method" type="select" label="Method to use for retention time correction" help="[method] See the help section below" >
-                <option value="obiwarp" >obiwarp</option>
-                <option value="peakgroups" selected="peakgroups">peakgroups</option>
-            </param>
-            <when value="obiwarp">
-                <param name="profStep" type="float" value="1" label="Step size (in m/z)" help="[profStep] to use for profile generation from the raw data files" />
-            </when> 
-            <when value="peakgroups">   
-                <param name="smooth" type="select" label="Smooth method" help="[smooth] either 'loess’ for non-linear alignment or ‘linear’ for linear alignment" >
-                    <option value="loess">loess</option>
-                    <option value="linear">linear</option>
-                </param>
-                <param name="extra" type="integer" value="1" label="Number of extra peaks to allow in retention time correction correction groups" help="[extra]" />
-                <param name="missing" type="integer" value="1" label="Number of missing samples to allow in retention time correction groups" help="[missing]" />
-                <conditional name="options">
-                    <param name="option" type="select" label="Advanced options">
-                        <option value="show">show</option>
-                        <option value="hide" selected="true">hide</option>
-                    </param>
-                    <when value="show">
-                        <param name="span" type="float" value="0.2" label="Degree of smoothing for local polynomial regression fitting" help="[span]"/>
-                        
-                        <param name="family" type="select" label="Family" help="[family] if gaussian fitting is by least-squares with no outlier removal, and if symmetric a re descending M estimator is used with Tukey's biweight function, allowing outlier removal">
-                            <option value="gaussian" selected="true">gaussian</option>
-                            <option value="symmetric">symmetric</option>
-                        </param>
-
-                        <param name="plottype" type="select" help="[plottype] if deviation plot retention time deviation points and regression fit, and if mdevden also plot peak overall peak density and retention time correction peak density">
-                            <option value="none" selected="true">none</option>
-                            <option value="deviation">deviation</option>
-                            <option value="mdevden">mdevden</option>
-                        </param>
-                    </when>
-                    <when value="hide">
-                    </when>
-                </conditional>
-            </when>
-        </conditional>
-        <!-- To pass planemo test -->
-        <param name="zip_file" type="hidden_data" format="no_unzip.zip" label="Zip file" />
-    </inputs>
-
-    <outputs>
-        <data name="xsetRData" format="rdata.xcms.retcor" label="${image.name[:-6]}.retcor.RData" />
-        <data name="rplotsPdf" format="pdf"  label="${image.name[:-6]}.retcor.Rplots.pdf">
-            <filter>(methods['method'] == 'peakgroups')</filter>
-            <filter>(options['option'] == 'show')</filter>
-            <filter>(family == 'symmetric')</filter>
-            <filter>(plottype != 'none')</filter>
-        </data>
-        <data name="ticsCorPdf"   format="pdf"  label="${image.name[:-6]}.retcor.TICs_corrected.pdf" />
-        <data name="bpcsCorPdf"   format="pdf" label="${image.name[:-6]}.retcor.BPCs_corrected.pdf" />
-        <data name="log" format="txt" label="xset.log.txt"  hidden="true" />
-    </outputs>
-    
-    <tests>
-        <test>
-            <param name="image" value="xset.group.RData"/>
-            <param name="methods.method" value="peakgroups"/>
-            <param name="methods.smooth" value="loess"/>
-            <param name="methods.extra" value="1"/>
-            <param name="methods.missing" value="1"/>
-            <param name="methods.options.option" value="show"/>
-            <param name="methods.options.span" value="0.2"/>
-            <param name="methods.options.family" value="gaussian"/>
-            <param name="methods.options.plottype" value="deviation"/>
-            <param name="zip_file" value="sacuri.zip"/>
-            <!--<output name="xsetRData" file="xset.group.retcor.RData" />-->
-            <!--<output name="rplotsPdf" file="xset.group.retcor.Rplots.pdf" />-->
-            <!--<output name="ticsCorPdf" file="xset.group.retcor.TICs_corrected.pdf" />-->
-            <!--<output name="bpcsCorPdf" file="xset.group.retcor.BPCs_corrected.pdf" />-->
-            <output name="log">
-                <assert_contents>
-                    <has_text text="object with 9 samples" />
-                    <has_text text="Time range: 0.7-1139.9 seconds (0-19 minutes)" />
-                    <has_text text="Mass range: 50.0019-999.9863 m/z" />
-                    <has_text text="Peaks: 135846 (about 15094 per sample)" />
-                    <has_text text="Peak Groups: 0" />
-                    <has_text text="Sample classes: bio, blank" />
-                </assert_contents>
-            </output>
-        </test>
-    </tests>
-
-    <help><![CDATA[
-
-        
-.. 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 
-
-.. class:: infomark
-
-**Galaxy integration** ABiMS TEAM - UPMC/CNRS - Station biologique de Roscoff and Yann Guitton yann.guitton@univ-nantes.fr - part of Workflow4Metabolomics.org [W4M]
-
- | Contact support@workflow4metabolomics.org for any questions or concerns about the Galaxy implementation of this tool.
-
-
-
----------------------------------------------------
-
-===========
-Xcms.retcor
-===========
-
------------
-Description
------------
-
-After matching peaks into groups, xcms can use those groups to identify and correct 
-correlated drifts in retention time from run to run. The aligned peaks can then be 
-used for a second pass of peak grouping which will be more accurate than the first. 
-The whole process can be repeated in an iterative fashion. Not all peak groups will be helpful 
-for identifying retention time drifts. Some groups may be missing peaks from a large 
-fraction of samples and thus provide an incomplete picture of the drift at that time point. 
-Still others may contain multiple peaks from the same sample, which is a sign of impropper grouping.
-
-.. class:: warningmark
-
-**After an retcor step, it is mandatory to do a group step, otherwise the rest of the workflow will not work with the RData file. (the initial peak grouping becomes invalid and is
-discarded)**
-
-
-
------------------
-Workflow position
------------------
-
-
-**Upstream tools**
-
-========================= ================= ======= ==========
-Name                      output file       format  parameter
-========================= ================= ======= ==========
-xcms.group                xset.group.RData  RData   RData file
-========================= ================= ======= ==========
-
-
-**Downstream tools**
-
-+---------------------------+------------------+--------+
-| Name                      | Output file      | Format |
-+===========================+==================+========+
-|xcms.group                 | xset.retcor.RData| RData  |
-+---------------------------+------------------+--------+
-
-The output file **xset.retcor.RData** is an RData file. You can continue your analysis using it in **xcms.group** tool as an next step.
-
-
-**General schema of the metabolomic workflow**
-
-.. image:: xcms_retcor_workflow.png
-
-
------------
-Input files
------------
-
-+---------------------------+----------------------+
-| Parameter : num + label   |   Format             |
-+===========================+======================+
-| 1 : RData file            |   rdata.xcms.group   |
-+---------------------------+----------------------+
-
-
-----------
-Parameters
-----------
-
-Method
-------
-
-**peakgroups**
-
-    | xcms ignores those groups by only considering well-behaved peak groups which are missing at most one sample and have at most one extra peak. (Those values can be changed with the **missing** and **extra** arguments.)
-    | For each of those well-behaved groups, the algorithm calculates a median retention time and, for every sample, a deviation from that median. Within a sample, the observed deviation generally changes over time in a nonlinear fashion. Those changes are approximated using a local polynomial regression technique implemented in the **loess** function. By default, the curve fitting is done using least-squares on all data points.
-    | However, it is possible to enable outlier detection and removal by setting the **family** argument to **symmetric**.
-
-**obiwarp**
-
-    | Calculate retention time deviations for each sample using the obiwarp code at "http://obi-warp.sourceforge.net/". This function is able to align multiple samples by a center-star strategy. Ordered Bijective Interpolated Warping (OBI-Warp) aligns matrices along a single axis using Dynamic Time Warping (DTW) and a one-to-one (bijective) interpolated warp function. OBI-Warp harnesses the non-linear, comprehensive alignment power of DTW and builds on the discrete, non-bijective output of DTW to give natural interpolants that can be used across multiple datasets.
-    | For the original publication see :**Chromatographic Alignment of ESI-LC-MS Proteomics Data Sets by Ordered Bijective Interpo-lated Warping John T. Prince and, Edward M. Marcotte Analytical Chemistry 2006 78 (17), 6140-6152.**
-
-
-------------
-Output files
-------------
-
-xset.group.retcor.TICs_corrected.pdf
-
-    | "Total Ion Chromatograms" graph in pdf format,corrected after a retcor step.
-
-xset.group.retcor.BPCs_corrected.pdf
-
-    | "Total Io"Base Peak Chromatograms" graph in pdf format,corrected after a retcor step
-
-xset.group.retcor.RData: rdata.xcms.retcor format
-
-    | Rdata file that will be necessary in the **xcms.group** step of the workflow.
-    
-    
-------
-
-.. class:: infomark 
-
-The output file is an xset.retcor.RData file. You can continue your analysis using it in **xcms.fillPeaks** tool.
-
-    
----------------------------------------------------
-
----------------
-Working example
----------------
-
-Input files
------------
-
-    | RData file -> **xset.group.RData**
-
-Parameters
-----------
-
-    | Method: -> **peakgroups**
-    | smooth: -> **loess**
-    | extra: -> **1**
-    | missing -> **1**
-    | Advanced options: -> **show**
-    | span -> **0.2**
-    | family -> **gaussian**
-    | plottype -> **deviation**
-    
-
-Output files
-------------
-
-    | **1) xset.group.retcor.RData: RData file**
-
-    | **2) Example of an xset.group.retcor.TICs_corrected pdf file**
-
-.. image:: xcms_retcor.png
-
-    ]]></help>
-
-    <citations>
-        <citation type="doi">10.1021/ac051437y</citation>
-        <citation type="doi">10.1093/bioinformatics/btu813</citation>
-    </citations>
-
-</tool>
--- a/repository_dependencies.xml	Fri Jan 15 05:06:08 2016 -0500
+++ b/repository_dependencies.xml	Tue Jan 19 10:02:28 2016 -0500
@@ -1,5 +1,4 @@
 <?xml version="1.0"?>
 <repositories>
-    <repository changeset_revision="9ed593071db2" name="no_unzip_datatype" owner="lecorguille" toolshed="https://testtoolshed.g2.bx.psu.edu" />
-    <repository changeset_revision="bff835d58914" name="rdata_xcms_datatypes" owner="lecorguille" toolshed="https://testtoolshed.g2.bx.psu.edu" />
+	<repository changeset_revision="bff835d58914" name="rdata_xcms_datatypes" owner="lecorguille" toolshed="https://testtoolshed.g2.bx.psu.edu" />
 </repositories>
Binary file static/images/xcms_retcor.png has changed
Binary file static/images/xcms_retcor_workflow.png has changed
Binary file test-data/fillpeaks.RData has changed
--- a/test-data/log.txt	Fri Jan 15 05:06:08 2016 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-	PACKAGE INFO
-parallel	3.1.2
-BiocGenerics	0.14.0
-Biobase	2.28.0
-Rcpp	0.12.0
-mzR	2.2.2
-xcms	1.44.0
-snow	0.3.13
-batch	1.1.4
-
-
-	ARGUMENTS INFO
-image	test-data/xset.group.RData
-xfunction	retcor
-xsetRdataOutput	test-data/xset.group.retcor.RData
-ticspdf	xset.group.retcor.TICs_corrected.pdf
-bicspdf	xset.group.retcor.BPCs_corrected.pdf
-rplotspdf	xset.group.retcor.Rplots.pdf
-method	obiwarp
-profStep	1
-zipfile	test-data/sacuri.zip
-
-
-	INFILE PROCESSING INFO
-
-
-	ARGUMENTS PROCESSING INFO
-
-
-	MAIN PROCESSING INFO
-center sample:  HU_neg_060 
-Processing: HU_neg_028  HU_neg_051  HU_neg_017  HU_neg_034  Blanc09  Blanc06  Blanc12  Blanc04  
-null device 
-          1 
-
-
-	XSET OBJECT INFO
-An "xcmsSet" object with 9 samples
-
-Time range: 0.7-1139.9 seconds (0-19 minutes)
-Mass range: 50.0019-999.9863 m/z
-Peaks: 135846 (about 15094 per sample)
-Peak Groups: 0 
-Sample classes: bio, blank 
-
-Profile settings: method = bin
-                  step = 0.01
-
-Memory usage: 13.8 MB
-
-
-	DONE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/report.html	Tue Jan 19 10:02:28 2016 -0500
@@ -0,0 +1,74 @@
+<!DOCTYPE html>
+<HTML lang='en'>
+<HEAD>
+<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />
+<title>[W4M] XCMS analysis report</title>
+<style>
+table { min-width: 500px; border:1px solid #D6B161; border-collapse:collapse;}
+th { background: #898989; text-align:left;}
+tr { border: 1px solid #000000 }
+h2 { color: #FFA212; }
+ul li { margin-bottom:10px; }
+</style>
+</HEAD>
+<BODY>
+<h1>___ XCMS analysis report using Workflow4Metabolomics ___</h1>
+<h2>Samples used:</h2>
+<table
+<tr><th>sample</th><th>filename</th></tr>
+<tr><td> HU_neg_051 </td><td> sacuri//bio2/HU_neg_051.mzXML </td></tr><tr><td> HU_neg_060 </td><td> sacuri//bio2/HU_neg_060.mzXML </td></tr><tr><td> HU_neg_017 </td><td> sacuri//bio/HU_neg_017.mzXML </td></tr><tr><td> HU_neg_028 </td><td> sacuri//bio/HU_neg_028.mzXML </td></tr><tr><td> Blanc04 </td><td> sacuri//blank/Blanc04.mzXML </td></tr><tr><td> Blanc06 </td><td> sacuri//blank/Blanc06.mzXML </td></tr>
+</table>
+<h2>Function launched:</h2>
+<table>
+<tr><th>timestamp<br />(ymd-h:m:s)</th><th>function</th><th>argument</th><th>value</th></tr>
+<tr><td rowspan='4'>151221-16:20:54</td><td rowspan='4'>xcmsSet</td>
+<td>nSlaves</td><td>1</td></tr>
+<tr><td>method</td><td>matchedFilter</td></tr>
+<tr><td>step</td><td>0.01</td></tr>
+<tr><td>fwhm</td><td>30</td></tr>
+<tr><td rowspan='5'>151221-16:37:00</td><td rowspan='5'>group</td>
+<td>method</td><td>density</td></tr>
+<tr><td>sleep</td><td>0.001</td></tr>
+<tr><td>minfrac</td><td>0.5</td></tr>
+<tr><td>bw</td><td>30</td></tr>
+<tr><td>mzwid</td><td>0.25</td></tr>
+<tr><td rowspan='1'>151221-16:37:20</td><td rowspan='1'>fillPeaks</td>
+<td>method</td><td>chrom</td></tr>
+</table>
+<h2>Information about the xcmsSet object:</h2>
+<pre>
+An "xcmsSet" object with 6 samples
+
+Time range: 16.3-1138.9 seconds (0.3-19 minutes)
+Mass range: 61.9883-481.2446 m/z
+Peaks: 1799 (about 300 per sample)
+Peak Groups: 289 
+Sample classes: bio, bio2, blank 
+
+Profile settings: method = bin
+                  step = 0.01
+
+Memory usage: 0.421 MB
+</pre>
+<h2>Citations:</h2>
+<ul>
+<li>To cite the <b>XCMS</b> package in publications use:
+<ul>
+<li>Smith, C.A. and Want, E.J. and O'Maille, G. and Abagyan,R. and Siuzdak, G.XCMS: Processing mass spectrometry data for metabolite profiling using nonlinear peak alignment, matching and identification, Analytical Chemistry, 78:779-787 (2006)</li>
+<li>Ralf Tautenhahn, Christoph Boettcher, Steffen Neumann: Highly sensitive feature detection for high resolution LC/MS BMC Bioinformatics, 9:504 (2008)</li>
+<li>H. Paul Benton, Elizabeth J. Want and Timothy M. D. Ebbels Correction of mass calibration gaps in liquid chromatography-mass spectrometry metabolomics data Bioinformatics, 26:2488 (2010)</li>
+</ul>
+</li>
+<li>To cite the <b>CAMERA</b> package in publications use:
+<ul>
+<li>Kuhl, C., Tautenhahn, R., Boettcher, C., Larson, T. R. and Neumann,S. CAMERA: an integrated strategy for compound spectra extraction and annotation of liquid chromatography/mass spectrometry data sets. Analytical Chemistry, 84:283-289 (2012)</li>
+</ul>
+</li>
+<li>To cite the <b>Workflow4Metabolimics (W4M)</b> project in publications use:
+<ul>
+<li>Franck Giacomoni, Gildas Le Corguillé, Misharl Monsoor, Marion Landi, Pierre Pericard, Mélanie Pétéra, Christophe Duperier, Marie Tremblay-Franco, Jean-François Martin, Daniel Jacob, Sophie Goulitquer, Etienne A. Thévenot and Christophe Caron (2014). Workflow4Metabolomics: A collaborative research infrastructure for computational metabolomics. Bioinformatics  doi:10.1093/bioinformatics/btu813</li>
+</ul>
+</li>
+</ul>
+</BODY>
+</HTML>
Binary file test-data/sacuri.zip has changed
Binary file test-data/xset.group.RData has changed
Binary file test-data/xset.group.retcor.BPCs_corrected.pdf has changed
Binary file test-data/xset.group.retcor.RData has changed
Binary file test-data/xset.group.retcor.Rplots.pdf has changed
Binary file test-data/xset.group.retcor.TICs_corrected.pdf has changed