Mercurial > repos > lecorguille > xcms_retcor
annotate abims_xcms_retcor.xml @ 6:fcd93f47dcbf draft
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
author | lecorguille |
---|---|
date | Thu, 07 Apr 2016 16:04:39 -0400 |
parents | d0efb2c07577 |
children | 14242e316953 |
rev | line source |
---|---|
6
fcd93f47dcbf
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
lecorguille
parents:
5
diff
changeset
|
1 <tool id="abims_xcms_retcor" name="xcms.retcor" version="2.0.6"> |
0 | 2 |
3 <description>Retention Time Correction using retcor function from xcms R package </description> | |
4 | |
6
fcd93f47dcbf
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
lecorguille
parents:
5
diff
changeset
|
5 <macros> |
fcd93f47dcbf
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
lecorguille
parents:
5
diff
changeset
|
6 <import>macros.xml</import> |
fcd93f47dcbf
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
lecorguille
parents:
5
diff
changeset
|
7 </macros> |
0 | 8 |
6
fcd93f47dcbf
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
lecorguille
parents:
5
diff
changeset
|
9 <expand macro="requirements"/> |
fcd93f47dcbf
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
lecorguille
parents:
5
diff
changeset
|
10 <expand macro="stdio"/> |
0 | 11 |
1 | 12 <command><![CDATA[ |
6
fcd93f47dcbf
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
lecorguille
parents:
5
diff
changeset
|
13 @COMMAND_XCMS_SCRIPT@ |
1 | 14 image $image |
15 xfunction retcor | |
16 | |
17 xsetRdataOutput $xsetRData | |
18 ticspdf $ticsCorPdf | |
19 bicspdf $bpcsCorPdf | |
20 rplotspdf $rplotsPdf | |
21 | |
22 method $methods.method | |
0 | 23 #if $methods.method == "obiwarp": |
24 profStep $methods.profStep | |
25 #else | |
26 smooth $methods.smooth | |
27 extra $methods.extra | |
28 missing $methods.missing | |
29 #if $methods.options.option == "show": | |
30 span $methods.options.span | |
31 family $methods.options.family | |
32 plottype $methods.options.plottype | |
33 #end if | |
34 #end if | |
6
fcd93f47dcbf
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
lecorguille
parents:
5
diff
changeset
|
35 #if $zip_file: |
fcd93f47dcbf
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
lecorguille
parents:
5
diff
changeset
|
36 zipfile $zip_file |
fcd93f47dcbf
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
lecorguille
parents:
5
diff
changeset
|
37 #end if |
fcd93f47dcbf
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
lecorguille
parents:
5
diff
changeset
|
38 @COMMAND_LOG_EXIT@ |
1 | 39 ]]></command> |
0 | 40 |
41 <inputs> | |
42 <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.)" /> | |
43 <conditional name="methods"> | |
44 <param name="method" type="select" label="Method to use for retention time correction" help="[method] See the help section below" > | |
45 <option value="obiwarp" >obiwarp</option> | |
46 <option value="peakgroups" selected="peakgroups">peakgroups</option> | |
47 </param> | |
48 <when value="obiwarp"> | |
49 <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" /> | |
50 </when> | |
51 <when value="peakgroups"> | |
52 <param name="smooth" type="select" label="Smooth method" help="[smooth] either 'loess’ for non-linear alignment or ‘linear’ for linear alignment" > | |
53 <option value="loess">loess</option> | |
54 <option value="linear">linear</option> | |
55 </param> | |
56 <param name="extra" type="integer" value="1" label="Number of extra peaks to allow in retention time correction correction groups" help="[extra]" /> | |
57 <param name="missing" type="integer" value="1" label="Number of missing samples to allow in retention time correction groups" help="[missing]" /> | |
6
fcd93f47dcbf
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
lecorguille
parents:
5
diff
changeset
|
58 |
0 | 59 <conditional name="options"> |
60 <param name="option" type="select" label="Advanced options"> | |
61 <option value="show">show</option> | |
62 <option value="hide" selected="true">hide</option> | |
63 </param> | |
64 <when value="show"> | |
65 <param name="span" type="float" value="0.2" label="Degree of smoothing for local polynomial regression fitting" help="[span]"/> | |
66 | |
1 | 67 <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"> |
68 <option value="gaussian" selected="true">gaussian</option> | |
69 <option value="symmetric">symmetric</option> | |
70 </param> | |
0 | 71 |
1 | 72 <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 | 73 <option value="none" selected="true">none</option> |
74 <option value="deviation">deviation</option> | |
75 <option value="mdevden">mdevden</option> | |
76 </param> | |
6
fcd93f47dcbf
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
lecorguille
parents:
5
diff
changeset
|
77 |
0 | 78 </when> |
1 | 79 <when value="hide"> |
80 </when> | |
0 | 81 </conditional> |
82 </when> | |
83 </conditional> | |
6
fcd93f47dcbf
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
lecorguille
parents:
5
diff
changeset
|
84 <!-- To pass planemo test --> |
fcd93f47dcbf
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
lecorguille
parents:
5
diff
changeset
|
85 <param name="zip_file" type="data" format="no_unzip.zip,zip" label="Zip file" help="Use only if you get a message which say that your original zip file have been deleted on the server." /> |
0 | 86 </inputs> |
87 | |
88 <outputs> | |
89 <data name="xsetRData" format="rdata.xcms.retcor" label="${image.name[:-6]}.retcor.RData" /> | |
90 <data name="rplotsPdf" format="pdf" label="${image.name[:-6]}.retcor.Rplots.pdf"> | |
91 <filter>(methods['method'] == 'peakgroups')</filter> | |
92 <filter>(options['option'] == 'show')</filter> | |
93 <filter>(family == 'symmetric')</filter> | |
94 <filter>(plottype != 'none')</filter> | |
95 </data> | |
96 <data name="ticsCorPdf" format="pdf" label="${image.name[:-6]}.retcor.TICs_corrected.pdf" /> | |
97 <data name="bpcsCorPdf" format="pdf" label="${image.name[:-6]}.retcor.BPCs_corrected.pdf" /> | |
1 | 98 <data name="log" format="txt" label="xset.log.txt" hidden="true" /> |
0 | 99 </outputs> |
100 | |
101 <tests> | |
102 <test> | |
103 <param name="image" value="xset.group.RData"/> | |
6
fcd93f47dcbf
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
lecorguille
parents:
5
diff
changeset
|
104 <param name="methods|method" value="peakgroups"/> |
fcd93f47dcbf
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
lecorguille
parents:
5
diff
changeset
|
105 <param name="methods|smooth" value="loess"/> |
fcd93f47dcbf
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
lecorguille
parents:
5
diff
changeset
|
106 <param name="methods|extra" value="1"/> |
fcd93f47dcbf
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
lecorguille
parents:
5
diff
changeset
|
107 <param name="methods|missing" value="1"/> |
fcd93f47dcbf
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
lecorguille
parents:
5
diff
changeset
|
108 <param name="methods|options|option" value="show"/> |
fcd93f47dcbf
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
lecorguille
parents:
5
diff
changeset
|
109 <param name="methods|options|span" value="0.2"/> |
fcd93f47dcbf
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
lecorguille
parents:
5
diff
changeset
|
110 <param name="methods|options|family" value="gaussian"/> |
fcd93f47dcbf
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
lecorguille
parents:
5
diff
changeset
|
111 <param name="methods|options|plottype" value="deviation"/> |
fcd93f47dcbf
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
lecorguille
parents:
5
diff
changeset
|
112 <param name="zip_file" value="sacuri_dir_root.zip" ftype="zip" /> |
1 | 113 <output name="log"> |
114 <assert_contents> | |
6
fcd93f47dcbf
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
lecorguille
parents:
5
diff
changeset
|
115 <has_text text="object with 4 samples" /> |
fcd93f47dcbf
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
lecorguille
parents:
5
diff
changeset
|
116 <has_text text="Time range: 0.2-1140.1 seconds (0-19 minutes)" /> |
fcd93f47dcbf
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
lecorguille
parents:
5
diff
changeset
|
117 <has_text text="Mass range: 50.0021-999.9863 m/z" /> |
fcd93f47dcbf
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
lecorguille
parents:
5
diff
changeset
|
118 <has_text text="Peaks: 59359 (about 14840 per sample)" /> |
1 | 119 <has_text text="Peak Groups: 0" /> |
120 <has_text text="Sample classes: bio, blank" /> | |
121 </assert_contents> | |
122 </output> | |
0 | 123 </test> |
124 </tests> | |
125 | |
1 | 126 <help><![CDATA[ |
0 | 127 |
6
fcd93f47dcbf
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
lecorguille
parents:
5
diff
changeset
|
128 @HELP_AUTHORS@ |
0 | 129 |
130 =========== | |
131 Xcms.retcor | |
132 =========== | |
133 | |
134 ----------- | |
135 Description | |
136 ----------- | |
137 | |
138 After matching peaks into groups, xcms can use those groups to identify and correct | |
139 correlated drifts in retention time from run to run. The aligned peaks can then be | |
140 used for a second pass of peak grouping which will be more accurate than the first. | |
141 The whole process can be repeated in an iterative fashion. Not all peak groups will be helpful | |
142 for identifying retention time drifts. Some groups may be missing peaks from a large | |
143 fraction of samples and thus provide an incomplete picture of the drift at that time point. | |
144 Still others may contain multiple peaks from the same sample, which is a sign of impropper grouping. | |
145 | |
146 .. class:: warningmark | |
147 | |
148 **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 | |
149 discarded)** | |
150 | |
151 | |
152 | |
153 ----------------- | |
154 Workflow position | |
155 ----------------- | |
156 | |
157 | |
158 **Upstream tools** | |
159 | |
160 ========================= ================= ======= ========== | |
161 Name output file format parameter | |
162 ========================= ================= ======= ========== | |
163 xcms.group xset.group.RData RData RData file | |
164 ========================= ================= ======= ========== | |
165 | |
166 | |
167 **Downstream tools** | |
168 | |
169 +---------------------------+------------------+--------+ | |
170 | Name | Output file | Format | | |
171 +===========================+==================+========+ | |
172 |xcms.group | xset.retcor.RData| RData | | |
173 +---------------------------+------------------+--------+ | |
174 | |
175 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. | |
176 | |
177 | |
178 **General schema of the metabolomic workflow** | |
179 | |
180 .. image:: xcms_retcor_workflow.png | |
181 | |
182 | |
183 ----------- | |
184 Input files | |
185 ----------- | |
186 | |
187 +---------------------------+----------------------+ | |
188 | Parameter : num + label | Format | | |
189 +===========================+======================+ | |
190 | 1 : RData file | rdata.xcms.group | | |
191 +---------------------------+----------------------+ | |
192 | |
193 | |
194 ---------- | |
195 Parameters | |
196 ---------- | |
197 | |
198 Method | |
199 ------ | |
200 | |
201 **peakgroups** | |
202 | |
203 | 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.) | |
204 | 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. | |
205 | However, it is possible to enable outlier detection and removal by setting the **family** argument to **symmetric**. | |
206 | |
207 **obiwarp** | |
208 | |
209 | 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. | |
210 | 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.** | |
211 | |
212 | |
213 ------------ | |
214 Output files | |
215 ------------ | |
216 | |
217 xset.group.retcor.TICs_corrected.pdf | |
218 | |
219 | "Total Ion Chromatograms" graph in pdf format,corrected after a retcor step. | |
220 | |
221 xset.group.retcor.BPCs_corrected.pdf | |
222 | |
223 | "Total Io"Base Peak Chromatograms" graph in pdf format,corrected after a retcor step | |
224 | |
225 xset.group.retcor.RData: rdata.xcms.retcor format | |
226 | |
227 | Rdata file that will be necessary in the **xcms.group** step of the workflow. | |
228 | |
229 | |
230 ------ | |
231 | |
232 .. class:: infomark | |
233 | |
234 The output file is an xset.retcor.RData file. You can continue your analysis using it in **xcms.fillPeaks** tool. | |
235 | |
236 | |
237 --------------------------------------------------- | |
238 | |
239 --------------- | |
240 Working example | |
241 --------------- | |
242 | |
243 Input files | |
244 ----------- | |
245 | |
246 | RData file -> **xset.group.RData** | |
247 | |
248 Parameters | |
249 ---------- | |
250 | |
251 | Method: -> **peakgroups** | |
252 | smooth: -> **loess** | |
253 | extra: -> **1** | |
254 | missing -> **1** | |
255 | Advanced options: -> **show** | |
256 | span -> **0.2** | |
257 | family -> **gaussian** | |
258 | plottype -> **deviation** | |
259 | |
260 | |
261 Output files | |
262 ------------ | |
263 | |
264 | **1) xset.group.retcor.RData: RData file** | |
265 | |
266 | **2) Example of an xset.group.retcor.TICs_corrected pdf file** | |
267 | |
268 .. image:: xcms_retcor.png | |
269 | |
5 | 270 |
271 --------------------------------------------------- | |
272 | |
273 Changelog/News | |
274 -------------- | |
275 | |
6
fcd93f47dcbf
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
lecorguille
parents:
5
diff
changeset
|
276 **Version 2.0.6 - 04/04/2016** |
fcd93f47dcbf
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
lecorguille
parents:
5
diff
changeset
|
277 |
fcd93f47dcbf
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
lecorguille
parents:
5
diff
changeset
|
278 - TEST: refactoring to pass planemo test using conda dependencies |
fcd93f47dcbf
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
lecorguille
parents:
5
diff
changeset
|
279 |
fcd93f47dcbf
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
lecorguille
parents:
5
diff
changeset
|
280 |
5 | 281 **Version 2.0.5 - 10/02/2016** |
282 | |
283 - BUGFIX: better management of errors. Datasets remained green although the process failed | |
284 | |
285 - BUGFIX: some pdf remained empty even when the process succeed | |
286 | |
287 - UPDATE: refactoring of internal management of inputs/outputs | |
288 | |
289 - UPDATE: refactoring to feed the new report tool | |
290 | |
291 | |
292 **Version 2.0.2 - 02/06/2015** | |
293 | |
294 - 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. | |
295 | |
296 - IMPROVEMENT: parameter labels have changed to facilitate their reading. | |
297 | |
298 | |
1 | 299 ]]></help> |
0 | 300 |
6
fcd93f47dcbf
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
lecorguille
parents:
5
diff
changeset
|
301 |
fcd93f47dcbf
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
lecorguille
parents:
5
diff
changeset
|
302 <expand macro="citation" /> |
0 | 303 |
304 </tool> |