changeset 0:19c1d2598eb5 draft

planemo upload
author lecorguille
date Fri, 07 Aug 2015 10:57:36 -0400
parents
children da716e2937f2
files Makefile abims_xcms_retcor.xml planemo.sh repository_dependencies.xml static/images/xcms_retcor.png static/images/xcms_retcor_workflow.png 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 tool_dependencies.xml
diffstat 12 files changed, 317 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Makefile	Fri Aug 07 10:57:36 2015 -0400
@@ -0,0 +1,23 @@
+# USAGE: make [install|clean]
+
+# -------- VARIABLE --------
+
+OBJ=xcms_retcor.tgz
+DEP=abims_xcms_retcor.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
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/abims_xcms_retcor.xml	Fri Aug 07 10:57:36 2015 -0400
@@ -0,0 +1,276 @@
+<tool id="abims_xcms_retcor" name="xcms.retcor" version="2.0.2">
+
+    <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>
+        xcms.r 
+        image $image xfunction retcor 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
+        &amp;&amp; ( mv retcor.RData $xsetRData;
+        mv TICs_corrected.pdf $ticsCorPdf ;
+        mv BPCs_corrected.pdf $bpcsCorPdf ;
+        mv Rplots.pdf $rplotsPdf 2> /dev/null);
+        cat xset.log; 
+        
+    </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>
+    </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" />
+    </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"/>
+            <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" />
+        </test>
+    </tests>
+
+    <help>
+
+        
+.. 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>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/planemo.sh	Fri Aug 07 10:57:36 2015 -0400
@@ -0,0 +1,1 @@
+planemo shed_init -f --name=xcms_retcor --owner=lecorguille --description="[W4M][GC-MS] XCMS R Package - Preprocessing - Correct retention time from different samples" --homepage_url="http://workflow4metabolomics.org" --long_description="Part of the W4M project: http://workflow4metabolomics.org\n\nXCMS: http://www.bioconductor.org/packages/release/bioc/html/xcms.html\n\nRetention Time Correction using retcor function from xcms R package\n\nBEWARE: this tool don't come with its script. You will need to install the dedicated package_xcms_w4m_script too" --category="Metabolomics"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/repository_dependencies.xml	Fri Aug 07 10:57:36 2015 -0400
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<repositories>
+    <repository changeset_revision="12afb0ecb55f" name="no_unzip_datatype" owner="lecorguille" toolshed="https://toolshed.g2.bx.psu.edu" />
+    <repository changeset_revision="d64562a4ebb3" name="rdata_xcms_datatypes" owner="lecorguille" toolshed="https://toolshed.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/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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool_dependencies.xml	Fri Aug 07 10:57:36 2015 -0400
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<tool_dependency>
+    <package name="R" version="3.1.2">
+        <repository changeset_revision="9f2fddb9d6e2" name="package_r_3_1_2" owner="iuc" toolshed="https://toolshed.g2.bx.psu.edu" />
+    </package>
+    <package name="xcms" version="1.44.0">
+        <repository changeset_revision="a1c3fc774157" name="package_r_xcms_1_44_0" owner="lecorguille" toolshed="https://toolshed.g2.bx.psu.edu" />
+    </package>
+    <package name="xcms_w4m_script" version="2.1">
+        <repository changeset_revision="c94c8ef520c8" name="package_xcms_w4m_script_2_1" owner="lecorguille" toolshed="https://toolshed.g2.bx.psu.edu" />
+    </package>
+</tool_dependency>