3
|
1 <tool id="abims_xcms_retcor" name="xcms.retcor" version="2.0.5">
|
0
|
2
|
|
3 <description>Retention Time Correction using retcor function from xcms R package </description>
|
|
4
|
|
5 <requirements>
|
|
6 <requirement type="package" version="3.1.2">R</requirement>
|
|
7 <requirement type="binary">Rscript</requirement>
|
|
8 <requirement type="package" version="1.44.0">xcms</requirement>
|
3
|
9 <requirement type="package" version="2.2.0">xcms_w4m_script</requirement>
|
0
|
10 </requirements>
|
|
11
|
|
12 <stdio>
|
|
13 <exit_code range="1:" level="fatal" />
|
|
14 </stdio>
|
|
15
|
1
|
16 <command><![CDATA[
|
0
|
17 xcms.r
|
1
|
18 image $image
|
|
19 xfunction retcor
|
|
20
|
|
21 xsetRdataOutput $xsetRData
|
|
22 ticspdf $ticsCorPdf
|
|
23 bicspdf $bpcsCorPdf
|
|
24 rplotspdf $rplotsPdf
|
|
25
|
|
26 method $methods.method
|
0
|
27 #if $methods.method == "obiwarp":
|
|
28 profStep $methods.profStep
|
|
29 #else
|
|
30 smooth $methods.smooth
|
|
31 extra $methods.extra
|
|
32 missing $methods.missing
|
|
33 #if $methods.options.option == "show":
|
|
34 span $methods.options.span
|
|
35 family $methods.options.family
|
|
36 plottype $methods.options.plottype
|
|
37 #end if
|
|
38 #end if
|
4
|
39 ###if $zip_file:
|
|
40 ## zipfile $zip_file
|
|
41 ###end if
|
1
|
42 ;
|
|
43 return=\$?;
|
|
44 mv log.txt $log;
|
|
45 cat $log;
|
|
46 sh -c "exit \$return"
|
0
|
47
|
1
|
48 ]]></command>
|
0
|
49
|
|
50 <inputs>
|
|
51 <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.)" />
|
|
52 <conditional name="methods">
|
|
53 <param name="method" type="select" label="Method to use for retention time correction" help="[method] See the help section below" >
|
|
54 <option value="obiwarp" >obiwarp</option>
|
|
55 <option value="peakgroups" selected="peakgroups">peakgroups</option>
|
|
56 </param>
|
|
57 <when value="obiwarp">
|
|
58 <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" />
|
|
59 </when>
|
|
60 <when value="peakgroups">
|
|
61 <param name="smooth" type="select" label="Smooth method" help="[smooth] either 'loess’ for non-linear alignment or ‘linear’ for linear alignment" >
|
|
62 <option value="loess">loess</option>
|
|
63 <option value="linear">linear</option>
|
|
64 </param>
|
|
65 <param name="extra" type="integer" value="1" label="Number of extra peaks to allow in retention time correction correction groups" help="[extra]" />
|
|
66 <param name="missing" type="integer" value="1" label="Number of missing samples to allow in retention time correction groups" help="[missing]" />
|
|
67 <conditional name="options">
|
|
68 <param name="option" type="select" label="Advanced options">
|
|
69 <option value="show">show</option>
|
|
70 <option value="hide" selected="true">hide</option>
|
|
71 </param>
|
|
72 <when value="show">
|
|
73 <param name="span" type="float" value="0.2" label="Degree of smoothing for local polynomial regression fitting" help="[span]"/>
|
|
74
|
1
|
75 <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">
|
|
76 <option value="gaussian" selected="true">gaussian</option>
|
|
77 <option value="symmetric">symmetric</option>
|
|
78 </param>
|
0
|
79
|
1
|
80 <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">
|
0
|
81 <option value="none" selected="true">none</option>
|
|
82 <option value="deviation">deviation</option>
|
|
83 <option value="mdevden">mdevden</option>
|
|
84 </param>
|
|
85 </when>
|
1
|
86 <when value="hide">
|
|
87 </when>
|
0
|
88 </conditional>
|
|
89 </when>
|
|
90 </conditional>
|
1
|
91 <!-- To pass planemo test -->
|
4
|
92 <!--<param name="zip_file" type="hidden_data" format="no_unzip.zip" label="Zip file" />-->
|
0
|
93 </inputs>
|
|
94
|
|
95 <outputs>
|
|
96 <data name="xsetRData" format="rdata.xcms.retcor" label="${image.name[:-6]}.retcor.RData" />
|
|
97 <data name="rplotsPdf" format="pdf" label="${image.name[:-6]}.retcor.Rplots.pdf">
|
|
98 <filter>(methods['method'] == 'peakgroups')</filter>
|
|
99 <filter>(options['option'] == 'show')</filter>
|
|
100 <filter>(family == 'symmetric')</filter>
|
|
101 <filter>(plottype != 'none')</filter>
|
|
102 </data>
|
|
103 <data name="ticsCorPdf" format="pdf" label="${image.name[:-6]}.retcor.TICs_corrected.pdf" />
|
|
104 <data name="bpcsCorPdf" format="pdf" label="${image.name[:-6]}.retcor.BPCs_corrected.pdf" />
|
1
|
105 <data name="log" format="txt" label="xset.log.txt" hidden="true" />
|
0
|
106 </outputs>
|
|
107
|
|
108 <tests>
|
|
109 <test>
|
|
110 <param name="image" value="xset.group.RData"/>
|
|
111 <param name="methods.method" value="peakgroups"/>
|
|
112 <param name="methods.smooth" value="loess"/>
|
|
113 <param name="methods.extra" value="1"/>
|
|
114 <param name="methods.missing" value="1"/>
|
|
115 <param name="methods.options.option" value="show"/>
|
|
116 <param name="methods.options.span" value="0.2"/>
|
|
117 <param name="methods.options.family" value="gaussian"/>
|
|
118 <param name="methods.options.plottype" value="deviation"/>
|
1
|
119 <param name="zip_file" value="sacuri.zip"/>
|
|
120 <!--<output name="xsetRData" file="xset.group.retcor.RData" />-->
|
|
121 <!--<output name="rplotsPdf" file="xset.group.retcor.Rplots.pdf" />-->
|
|
122 <!--<output name="ticsCorPdf" file="xset.group.retcor.TICs_corrected.pdf" />-->
|
|
123 <!--<output name="bpcsCorPdf" file="xset.group.retcor.BPCs_corrected.pdf" />-->
|
|
124 <output name="log">
|
|
125 <assert_contents>
|
|
126 <has_text text="object with 9 samples" />
|
|
127 <has_text text="Time range: 0.7-1139.9 seconds (0-19 minutes)" />
|
|
128 <has_text text="Mass range: 50.0019-999.9863 m/z" />
|
|
129 <has_text text="Peaks: 135846 (about 15094 per sample)" />
|
|
130 <has_text text="Peak Groups: 0" />
|
|
131 <has_text text="Sample classes: bio, blank" />
|
|
132 </assert_contents>
|
|
133 </output>
|
0
|
134 </test>
|
|
135 </tests>
|
|
136
|
1
|
137 <help><![CDATA[
|
0
|
138
|
|
139
|
|
140 .. class:: infomark
|
|
141
|
|
142 **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
|
|
143
|
|
144 .. class:: infomark
|
|
145
|
|
146 **Galaxy integration** ABiMS TEAM - UPMC/CNRS - Station biologique de Roscoff and Yann Guitton yann.guitton@univ-nantes.fr - part of Workflow4Metabolomics.org [W4M]
|
|
147
|
|
148 | Contact support@workflow4metabolomics.org for any questions or concerns about the Galaxy implementation of this tool.
|
|
149
|
|
150
|
|
151
|
|
152 ---------------------------------------------------
|
|
153
|
|
154 ===========
|
|
155 Xcms.retcor
|
|
156 ===========
|
|
157
|
|
158 -----------
|
|
159 Description
|
|
160 -----------
|
|
161
|
|
162 After matching peaks into groups, xcms can use those groups to identify and correct
|
|
163 correlated drifts in retention time from run to run. The aligned peaks can then be
|
|
164 used for a second pass of peak grouping which will be more accurate than the first.
|
|
165 The whole process can be repeated in an iterative fashion. Not all peak groups will be helpful
|
|
166 for identifying retention time drifts. Some groups may be missing peaks from a large
|
|
167 fraction of samples and thus provide an incomplete picture of the drift at that time point.
|
|
168 Still others may contain multiple peaks from the same sample, which is a sign of impropper grouping.
|
|
169
|
|
170 .. class:: warningmark
|
|
171
|
|
172 **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
|
|
173 discarded)**
|
|
174
|
|
175
|
|
176
|
|
177 -----------------
|
|
178 Workflow position
|
|
179 -----------------
|
|
180
|
|
181
|
|
182 **Upstream tools**
|
|
183
|
|
184 ========================= ================= ======= ==========
|
|
185 Name output file format parameter
|
|
186 ========================= ================= ======= ==========
|
|
187 xcms.group xset.group.RData RData RData file
|
|
188 ========================= ================= ======= ==========
|
|
189
|
|
190
|
|
191 **Downstream tools**
|
|
192
|
|
193 +---------------------------+------------------+--------+
|
|
194 | Name | Output file | Format |
|
|
195 +===========================+==================+========+
|
|
196 |xcms.group | xset.retcor.RData| RData |
|
|
197 +---------------------------+------------------+--------+
|
|
198
|
|
199 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.
|
|
200
|
|
201
|
|
202 **General schema of the metabolomic workflow**
|
|
203
|
|
204 .. image:: xcms_retcor_workflow.png
|
|
205
|
|
206
|
|
207 -----------
|
|
208 Input files
|
|
209 -----------
|
|
210
|
|
211 +---------------------------+----------------------+
|
|
212 | Parameter : num + label | Format |
|
|
213 +===========================+======================+
|
|
214 | 1 : RData file | rdata.xcms.group |
|
|
215 +---------------------------+----------------------+
|
|
216
|
|
217
|
|
218 ----------
|
|
219 Parameters
|
|
220 ----------
|
|
221
|
|
222 Method
|
|
223 ------
|
|
224
|
|
225 **peakgroups**
|
|
226
|
|
227 | 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.)
|
|
228 | 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.
|
|
229 | However, it is possible to enable outlier detection and removal by setting the **family** argument to **symmetric**.
|
|
230
|
|
231 **obiwarp**
|
|
232
|
|
233 | 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.
|
|
234 | 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.**
|
|
235
|
|
236
|
|
237 ------------
|
|
238 Output files
|
|
239 ------------
|
|
240
|
|
241 xset.group.retcor.TICs_corrected.pdf
|
|
242
|
|
243 | "Total Ion Chromatograms" graph in pdf format,corrected after a retcor step.
|
|
244
|
|
245 xset.group.retcor.BPCs_corrected.pdf
|
|
246
|
|
247 | "Total Io"Base Peak Chromatograms" graph in pdf format,corrected after a retcor step
|
|
248
|
|
249 xset.group.retcor.RData: rdata.xcms.retcor format
|
|
250
|
|
251 | Rdata file that will be necessary in the **xcms.group** step of the workflow.
|
|
252
|
|
253
|
|
254 ------
|
|
255
|
|
256 .. class:: infomark
|
|
257
|
|
258 The output file is an xset.retcor.RData file. You can continue your analysis using it in **xcms.fillPeaks** tool.
|
|
259
|
|
260
|
|
261 ---------------------------------------------------
|
|
262
|
|
263 ---------------
|
|
264 Working example
|
|
265 ---------------
|
|
266
|
|
267 Input files
|
|
268 -----------
|
|
269
|
|
270 | RData file -> **xset.group.RData**
|
|
271
|
|
272 Parameters
|
|
273 ----------
|
|
274
|
|
275 | Method: -> **peakgroups**
|
|
276 | smooth: -> **loess**
|
|
277 | extra: -> **1**
|
|
278 | missing -> **1**
|
|
279 | Advanced options: -> **show**
|
|
280 | span -> **0.2**
|
|
281 | family -> **gaussian**
|
|
282 | plottype -> **deviation**
|
|
283
|
|
284
|
|
285 Output files
|
|
286 ------------
|
|
287
|
|
288 | **1) xset.group.retcor.RData: RData file**
|
|
289
|
|
290 | **2) Example of an xset.group.retcor.TICs_corrected pdf file**
|
|
291
|
|
292 .. image:: xcms_retcor.png
|
|
293
|
1
|
294 ]]></help>
|
0
|
295
|
|
296 <citations>
|
|
297 <citation type="doi">10.1021/ac051437y</citation>
|
|
298 <citation type="doi">10.1093/bioinformatics/btu813</citation>
|
|
299 </citations>
|
|
300
|
|
301 </tool>
|