comparison ipo4retgroup.xml @ 1:ae8de756dfcf draft

"planemo upload for repository https://github.com/rietho/IPO commit 5083f3b5800bdd8515519f2f6398046b41e1df97"
author workflow4metabolomics
date Mon, 16 Dec 2019 05:26:42 -0500
parents ac5f2936575b
children
comparison
equal deleted inserted replaced
0:ac5f2936575b 1:ae8de756dfcf
1 <tool id="ipo4retgroup" name="IPO for group and retcor" version="0.0.1"> 1 <tool id="ipo4retgroup" name="IPO for group and retcor" version="@TOOL_VERSION@+galaxy0">
2 2
3 <description>IPO optimization process for xcms.group and xcms.retcor</description> 3 <description>IPO optimization process for xcms.groupChromPeaks and xcms.adjustRtime</description>
4 4
5 <macros> 5 <macros>
6 <import>macros.xml</import> 6 <import>macros.xml</import>
7
8 <macro name="group_density_bw_fixed">
9 <param name="bw" type="integer" value="30" label="Bandwidth" help="[bw] bandwidth (standard deviation or half width at half maximum) of gaussian smoothing kernel to apply to the peak density chromatogram" />
10 </macro>
11
12 <macro name="group_density_mzwid_fixed">
13 <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 " />
14 </macro>
15 </macros> 7 </macros>
16 8
17 <expand macro="requirements"/> 9 <expand macro="requirements"/>
18 <expand macro="stdio"/> 10
19 11 <command detect_errors="exit_code"><![CDATA[
20 <command><![CDATA[ 12 LANG=C Rscript '$__tool_directory__/ipo4retgroup.r'
21 LANG=C Rscript $__tool_directory__/ipo4retgroup.r
22 13
23 image '$image' 14 image '$image'
24 15
25 parametersOutput '$parametersOutput' 16 parametersOutput '$parametersOutput'
26 17
29 @COMMAND_NSLAVES@ 20 @COMMAND_NSLAVES@
30 21
31 ## group methods 22 ## group methods
32 23
33 sleep 0.001 24 sleep 0.001
34 #if $group.methods.method == "density": 25 #if $group.method == "density":
35 bw "c($group.methods.section_group_density_optiomizable.conditional_parameter.bw)" 26 bw "c($group.section_group_density_optiomizable.bw)"
36 mzwid "c($group.methods.section_group_density_optiomizable.conditional_parameter.mzwid)" 27 mzwid "c($group.section_group_density_optiomizable.mzwid)"
37 28
38 minfrac $group.methods.section_group_density_non_optimizable.minfrac 29 minfrac $group.section_group_density_non_optimizable.minfrac
39 max $group.methods.section_group_density_non_optimizable.max 30 max $group.section_group_density_non_optimizable.max
40 #end if 31 #end if
41 32
42 ## retcor methods 33 ## retcor methods
43 34
44 #if $retcor.methods.method == "obiwarp": 35 #if $retcor.methods.method == "obiwarp":
45 retcorMethod obiwarp 36 retcorMethod obiwarp
46 profStep $methods.section_retcor_obiwarp_non_optimizable.profStep 37 profStep $retcor.methods.section_retcor_obiwarp_non_optimizable.profStep
47 38
48 #elif $retcor.methods.method == "peakgroups": 39 #elif $retcor.methods.method == "peakgroups":
49 retcorMethod loess 40 retcorMethod loess
50 smooth $retcor.methods.section_retcor_peakgroups_non_optimizable.smooth 41 smooth $retcor.methods.section_retcor_peakgroups_non_optimizable.smooth
51 extra $retcor.methods.section_retcor_peakgroups_non_optimizable.extra 42 extra $retcor.methods.section_retcor_peakgroups_non_optimizable.extra
56 #elif $retcor.methods.method == "none": 47 #elif $retcor.methods.method == "none":
57 retcorMethod none 48 retcorMethod none
58 #end if 49 #end if
59 50
60 @COMMAND_FILE_LOAD@ 51 @COMMAND_FILE_LOAD@
61
62 @COMMAND_LOG_EXIT@
63 ]]></command> 52 ]]></command>
64 53
65 <inputs> 54 <inputs>
66 55
67 <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.)" /> 56 <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.)" />
68 57
69 <param name="samplebyclass" type="integer" value="2" label="Number of samples used per class to estimate the best parameters" help="Set to 0 to use the whole dataset. To save time, reduce this number" /> 58 <param name="samplebyclass" type="integer" value="2" min="0" label="Number of samples used per class to estimate the best parameters" help="Set to 0 to use the whole dataset. To save time, reduce this number" />
70 59
71 <section name="group" title="Group Options" expanded="True"> 60 <section name="group" title="groupChromPeaks Options" expanded="True">
61 <param argument="method" type="select" label="Method to use for grouping" help="See the help section below. Only the density method is available so far">
62 <option value="density" selected="true">density</option>
63 </param>
64 <section name="section_group_density_optiomizable" title="Optimizable parameters" expanded="True">
65 <param argument="bw" type="text" value="22,38" label="Range or a fixed value for Bandwidth" help="bandwidth (standard deviation or half width at half maximum) of gaussian smoothing kernel to apply to the peak density chromatogram (ex: 22,38)">
66 <expand macro="input_validator_range_integer"/>
67 </param>
68 <param argument="mzwid" type="text" value="0.015,0.035" label="Range or a fixed value for Width of overlapping m/z slices" help="to use for creating peak density chromatograms and grouping peaks across samples (ex: 0.015,0.035)" >
69 <expand macro="input_validator_range_float_neg"/>
70 </param>
71 </section>
72 <section name="section_group_density_non_optimizable" title="Non optimizable parameters" expanded="True">
73 <param argument="minfrac" type="float" value="0.5" label="Minimum fraction of samples necessary" help="in at least one of the sample groups for it to be a valid group" />
74 <param argument="max" type="integer" value="50" label="Maximum number of groups to identify in a single m/z slice" />
75 </section>
76 </section>
77
78 <section name="retcor" title="adjustRtime Options" expanded="True">
72 <conditional name="methods"> 79 <conditional name="methods">
73 <param name="method" type="select" label="Method to use for grouping" help="[method] See the help section below. Only the density method is available so far"> 80 <param argument="method" type="select" label="Method to use for retention time correction" help="See the help section below" >
74 <option value="density" selected="true">density</option>
75 </param>
76 <when value="density">
77 <section name="section_group_density_optiomizable" title="Optimizable parameters" expanded="True">
78 <conditional name="conditional_parameter">
79 <param name="select_parameter" type="select" label="Which parameter do you want to optimize?" help="Only one paramter can be optimized at once. The other will require fixed values">
80 <option value="bw">Bandwidth [bw]</option>
81 <option value="mzwid">Width of overlapping m/z slices [mzwid]</option>
82 </param>
83 <when value="bw">
84 <param name="bw" type="text" value="22,38" label="Range for Bandwidth" help="[bw] bandwidth (standard deviation or half width at half maximum) of gaussian smoothing kernel to apply to the peak density chromatogram (ex: 22,38)">
85 <validator type="regex" message="Should be this format XX,YY">[0-9]+,[0-9]+</validator>
86 </param>
87 <expand macro="group_density_mzwid_fixed" />
88 </when>
89 <when value="mzwid">
90 <param name="mzwid" type="text" value="0.015,0.035" label="Range for Width of overlapping m/z slices" help="[mzwid] to use for creating peak density chromatograms and grouping peaks across samples (ex: 0.015,0.035)" >
91 <validator type="regex" message="Should be one combinaison of those format: XX,YY or -XX,YY or XX.XX,YY.YY">[\-]?[0-9]+[\.]?[0-9]*,[\-]?[0-9]+[\.]?[0-9]*</validator>
92 </param>
93 <expand macro="group_density_bw_fixed" />
94 </when>
95 </conditional>
96 </section>
97 <section name="section_group_density_non_optimizable" title="Non optimizable parameters" expanded="True">
98 <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" />
99 <param name="max" type="integer" value="50" label="Maximum number of groups to identify in a single m/z slice" help="[max]" />
100 </section>
101 </when>
102 </conditional>
103 </section>
104
105 <section name="retcor" title="Retcor Options" expanded="True">
106 <conditional name="methods">
107 <param name="method" type="select" label="Method to use for retention time correction" help="[method] See the help section below" >
108 <option value="obiwarp">obiwarp</option> 81 <option value="obiwarp">obiwarp</option>
109 <option value="peakgroups">peakgroups</option> 82 <option value="peakgroups">peakgroups</option>
110 </param> 83 </param>
111 <when value="obiwarp"> 84 <when value="obiwarp">
112 <section name="section_retcor_obiwarp_non_optimizable" title="Non optimizable parameters" expanded="True"> 85 <section name="section_retcor_obiwarp_non_optimizable" title="Non optimizable parameters" expanded="True">
113 <param name="profStep" type="text" value="0.7,1.0" label="Range for Step size (in m/z)" help="[profStep] to use for profile generation from the raw data files (ex: 1 or 0.7 1.0)" /> 86 <param argument="profStep" type="text" value="0.7,1.0" label="Range or a fixed value for Step size (in m/z)" help="to use for profile generation from the raw data files (ex: 1 or 0.7 1.0)" >
87 <expand macro="input_validator_range_float_neg"/>
88 </param>
114 </section> 89 </section>
115 </when> 90 </when>
116 <when value="peakgroups"> 91 <when value="peakgroups">
117 <section name="section_retcor_peakgroups_non_optimizable" title="Non optimizable parameters" expanded="True"> 92 <section name="section_retcor_peakgroups_non_optimizable" title="Non optimizable parameters" expanded="True">
118 <param name="smooth" type="select" label="Smooth method" help="[smooth] only the 'loess’ for non-linear alignment is available so far" > 93 <param argument="smooth" type="select" label="Smooth method" help="only the 'loess’ for non-linear alignment is available so far" >
119 <option value="loess">loess</option> 94 <option value="loess">loess</option>
120 </param> 95 </param>
121 <param name="extra" type="integer" value="1" label="Number of extra peaks to allow in retention time correction correction groups" help="[extra]" /> 96 <param argument="extra" type="integer" value="1" min="0" label="Number of extra peaks to allow in retention time correction correction groups" />
122 <param name="missing" type="integer" value="1" label="Number of missing samples to allow in retention time correction groups" help="[missing]" /> 97 <param argument="missing" type="integer" value="1" min="0" label="Number of missing samples to allow in retention time correction groups" />
123 <param name="span" type="float" value="0.2" label="Degree of smoothing for local polynomial regression fitting" help="[span]"/> 98 <param argument="span" type="float" value="0.2" min="0" label="Degree of smoothing for local polynomial regression fitting" />
124 <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"> 99 <param argument="family" type="select" label="Family" help="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">
125 <option value="gaussian" selected="true">gaussian</option> 100 <option value="gaussian" selected="true">gaussian</option>
126 <option value="symmetric">symmetric</option> 101 <option value="symmetric">symmetric</option>
127 </param> 102 </param>
128 <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"> 103 <param argument="plottype" type="select" help="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">
129 <option value="none" selected="true">none</option> 104 <option value="none" selected="true">none</option>
130 <option value="deviation">deviation</option> 105 <option value="deviation">deviation</option>
131 <option value="mdevden">mdevden</option> 106 <option value="mdevden">mdevden</option>
132 </param> 107 </param>
133 </section> 108 </section>
139 <expand macro="input_file_load"/> 114 <expand macro="input_file_load"/>
140 115
141 </inputs> 116 </inputs>
142 117
143 <outputs> 118 <outputs>
144 <data name="parametersOutput" format="tabular" label="IPO_parameters4xcmsSet.tsv" /> 119 <data name="parametersOutput" format="tabular" label="IPO_parameters4xcmsSet.tsv" from_work_dir="IPO_parameters4xcmsSet.tsv"/>
145 <data name="log" format="txt" label="ipo4xcmsSet.log.txt" />
146 </outputs> 120 </outputs>
147 121
148 <tests> 122 <tests>
149 <!-- TOO LONG
150 <test> 123 <test>
151 <param name="image" value="faahKO.xset.RData"/> 124 <param name="image" value="faahKO.xset_single.RData"/>
152 <param name="group|methods|method" value="density"/> 125 <param name="samplebyclass" value="0"/>
153 <param name="group|methods|bw" value="28,32"/>
154 <param name="group|methods|minfrac" value="1"/>
155 <param name="group|methods|mzwid" value="0.15,0.35"/>
156 <param name="retcor|methods|method" value="peakgroups"/>
157 <param name="retcor|methods|smooth" value="loess"/>
158 <param name="retcor|methods|extra" value="1"/>
159 <param name="retcor|methods|missing" value="1"/>
160 <expand macro="test_file_load_zip"/>
161 <output name="parametersOutput" file="faahKO_IPO_parameters4retgroup.tsv" />
162 </test>-->
163
164 <test>
165 <param name="image" value="faahKO.xset.RData"/>
166 <section name="group"> 126 <section name="group">
167 <conditional name="methods"> 127 <param name="method" value="density"/>
168 <param name="method" value="density"/> 128 <section name="section_group_density_optiomizable">
169 <section name="section_group_density_optiomizable"> 129 <param name="bw" value="5,6"/>
170 <conditional name="conditional_parameter"> 130 <param name="mzwid" value="0.01,0.02"/>
171 <param name="bw" value="28,32"/> 131 </section>
172 <param name="mzwid" value="0.25"/> 132 <section name="section_group_density_non_optimizable">
173 </conditional> 133 <param name="minfrac" value="1"/>
174 </section> 134 </section>
175 <section name="section_group_density_non_optimizable">
176 <param name="minfrac" value="1"/>
177 </section>
178 </conditional>
179 </section> 135 </section>
180 <section name="retcor"> 136 <section name="retcor">
181 <conditional name="methods"> 137 <conditional name="methods">
182 <param name="method" value="peakgroups"/> 138 <param name="method" value="peakgroups"/>
183 <section name="section_retcor_peakgroups_non_optimizable"> 139 <section name="section_retcor_peakgroups_non_optimizable">
185 <param name="rextra" value="1"/> 141 <param name="rextra" value="1"/>
186 <param name="missing" value="1"/> 142 <param name="missing" value="1"/>
187 </section> 143 </section>
188 </conditional> 144 </conditional>
189 </section> 145 </section>
190 <expand macro="test_file_load_zip"/> 146 <expand macro="test_file_load_single"/>
191 <output name="parametersOutput" file="faahKO_IPO_parameters4retgroup_bw.tsv" /> 147 <output name="parametersOutput" file="faahKO_IPO_parameters4retgroup_bw.tsv" />
192 </test> 148 </test>
193
194 <!--<test>
195 <param name="image" value="faahKO.xset.RData"/>
196 <param name="group|methods|method" value="density"/>
197 <param name="group|methods|bw" value="30"/>
198 <param name="group|methods|minfrac" value="1"/>
199 <param name="group|methods|mzwid" value="0.15,0.35"/>
200 <param name="retcor|methods|method" value="peakgroups"/>
201 <param name="retcor|methods|smooth" value="loess"/>
202 <param name="retcor|methods|extra" value="1"/>
203 <param name="retcor|methods|missing" value="1"/>
204 <expand macro="test_file_load_zip"/>
205 <output name="parametersOutput" file="faahKO_IPO_parameters4retgroup_mzmid.tsv" />
206 </test>-->
207
208 <!--<test>
209 <param name="image" value="MM-xset-merge.RData"/>
210 <param name="group|methods|method" value="density"/>
211 <param name="group|methods|bw" value="22,38"/>
212 <param name="group|methods|minfrac" value="1"/>
213 <param name="group|methods|mzwid" value="0.015,0.035"/>
214 <param name="retcor|methods|method" value="peakgroups"/>
215 <param name="retcor|methods|smooth" value="loess"/>
216 <param name="retcor|methods|extra" value="1"/>
217 <param name="retcor|methods|missing" value="1"/>
218 <param name="file_load_conditional|file_load_select" value="yes" />
219 <expand macro="test_file_load_single"/>
220 <output name="parametersOutput" file="MM_IPO_parameters4retgroup.tsv" />
221 </test>-->
222 </tests> 149 </tests>
223 150
224 <help><![CDATA[ 151 <help><![CDATA[
225 152
226 @HELP_AUTHORS@ 153 @HELP_AUTHORS@
240 Workflow position 167 Workflow position
241 ----------------- 168 -----------------
242 169
243 **Upstream tools** 170 **Upstream tools**
244 171
245 ========================= ================= ======= ========= 172 ==================================== ======================== ==============================
246 Name output file format parameter 173 Name Output file Format
247 ========================= ================= ======= ========= 174 ==================================== ======================== ==============================
248 NA NA zip NA 175 xcms.findChromPeaks Merger (single) xset.merged.RData rdata.xcms.findchrompeaks
249 ========================= ================= ======= ========= 176 ------------------------------------ ------------------------ ------------------------------
177 xcms.adjustRtime ``*``.adjustRtime.RData rdata.xcms.retcor
178 ==================================== ======================== ==============================
250 179
251 180
252 **Downstream tools** 181 **Downstream tools**
253 182
254 +---------------------------+----------------------+-----------------+ 183 +---------------------------+----------------------+-----------------+
255 | Name | Output file | Format | 184 | Name | Output file | Format |
256 +===========================+======================+=================+ 185 +===========================+======================+=================+
257 |xcms.xcmsSet | parametersOutput.tsv | Tabular | 186 |xcms.groupChromPeaks | parametersOutput.tsv | Tabular |
258 +---------------------------+--------------------+-------------------+ 187 +---------------------------+--------------------+-------------------+
259
260
261
262 -----------
263 Input files
264 -----------
265
266 +---------------------------+------------+
267 | Parameter : num + label | Format |
268 +===========================+============+
269 | 1 : Choose your inputs | zip |
270 +---------------------------+------------+
271
272 **Choose your inputs**
273
274 You have two methods for your inputs:
275
276 | Zip file (recommended): You can put a zip file containing your inputs: myinputs.zip (containing all your conditions as sub-directories).
277 | library folder: You must specify the name of your "library" (folder) created within your space project (for example: /projet/externe/institut/login/galaxylibrary/yourlibrary). Your library must contain all your conditions as sub-directories.
278
279 Steps for creating the zip file
280 -------------------------------
281
282 **Step1: Creating your directory and hierarchize the subdirectories**
283
284
285 VERY IMPORTANT: If you zip your files under Windows, you must use the 7Zip software (http://www.7-zip.org/), otherwise your zip will not be well unzipped on the platform W4M (zip corrupted bug).
286
287 Your zip should contain all your conditions as sub-directories. For example, two conditions (mutant and wild):
288 arabidopsis/wild/01.raw
289 arabidopsis/mutant/01.raw
290
291 **Step2: Creating a zip file**
292
293 Create your zip file (e.g.: arabidopsis.zip).
294
295 **Step 3 : Uploading it to our Galaxy server**
296
297 If your zip file is less than 2Gb, you get use the Get Data tool to upload it.
298
299 Otherwise if your zip file is larger than 2Gb, please refer to the HOWTO on workflow4metabolomics.org (http://application.sb-roscoff.fr/download/w4m/howto/galaxy_upload_up_2Go.pdf).
300
301 For more informations, don't hesitate to send us an email at supportATworkflow4metabolomics.org).
302
303 Advices for converting your files for the XCMS input
304 ----------------------------------------------------
305
306 We recommend you to convert your raw files to **mzXML** in centroid mode (smaller files) and the files will be compatible with the xmcs centWave method.
307
308 **We recommend you the following parameters:**
309
310 Use Filtering: **True**
311
312 Use Peak Picking: **True**
313
314 Peak Peaking -Apply to MS Levels: **All Levels (1-)** : Centroid Mode
315
316 Use zlib: **64**
317
318 Binary Encoding: **64**
319
320 m/z Encoding: **64**
321
322 Intensity Encoding: **64**
323 188
324 189
325 ---------- 190 ----------
326 Parameters 191 Parameters
327 ---------- 192 ----------
328 193
329 Extraction method for peaks detection 194 Method to use for groupChromPeaks
330 ------------------------------------- 195 ---------------------------------
331 196
332 **Matched Filter** 197 **PeakDensity**
333 198
334 | One parameter to consider is the Gaussian model peak width used for matched filtration,an integral part of the peak detection algorithm. 199 | This method performs performs correspondence (chromatographic peak grouping) based on the density (distribution) of identified peaks along the retention time axis within slices of overlapping mz ranges. All peaks (from the same or from different samples) being close on the retention time axis are grouped into a feature (peak group).
335 | For a discussion of how model peak width affects the signal to noise ratio, see Danielsson et al. (2002). 200 | See the PeakDensity_manual_
336 201
337 202
338 **cent Wave** 203 .. _PeakDensity_manual: https://rdrr.io/bioc/xcms/man/groupChromPeaks-density.html#heading-2
339 204
340 | This algorithm is most suitable for high resolution LC/{TOF,OrbiTrap,FTICR}-MS data in centroid mode. 205
341 | Due to the fact that peak centroids are used, a binning step is not necessary. 206 Method to use for adjustRtime
342 | The method is capable of detecting close-by-peaks and also overlapping peaks. Some efforts are made to detect the exact peak boundaries to get precise peak integrals. 207 -------------------------------------------
343 208
344 209 **PeakGroups**
345 ------------ 210
346 Output files 211 | This method performs retention time adjustment based on the alignment of chromatographic peak groups present in all/most samples (hence corresponding to house keeping compounds). First the retention time deviation of these peak groups is described by fitting either a polynomial (‘smooth = "loess"’) or a linear ( ‘smooth = "linear"’) model to the data points. These models are subsequently used to adjust the retention time of each spectrum in each sample.
347 ------------ 212 | See the PeakGroups_manual_
348 213
349 IPO_parameters4xcmsSet.tsv 214 **Obiwarp**
350 215
351 | Optimal parameters for xcmsSet 216 | This method performs retention time adjustment using the Obiwarp method [Prince 2006]. It is based on the code at http://obi-warp.sourceforge.net but supports alignment of multiple samples by aligning each against a _center_ sample. The alignment is performed directly on the ‘profile-matrix’ and can hence be performed independently of the peak detection or peak grouping.
352 217 | See the Obiwarp_manual_
218
219 .. _PeakGroups_manual: https://rdrr.io/bioc/xcms/man/adjustRtime-peakGroups.html#heading-2
220 .. _Obiwarp_manual: https://rdrr.io/bioc/xcms/man/adjustRtime-obiwarp.html
353 221
354 --------------------------------------------------- 222 ---------------------------------------------------
355 223
356 Changelog/News 224 Changelog/News
357 -------------- 225 --------------
358 226
359 227 @HELP_NEWVERSION_1_10_0_0@
360 228
361 ]]></help> 229 ]]></help>
362 230
363 <expand macro="citation" /> 231 <expand macro="citation" />
364 </tool> 232 </tool>