comparison MS2snoop.xml @ 5:78d5a12406c2 draft

planemo upload commit a5f94dac9b268629399dc22c5d6ac48c5a85adc3
author workflow4metabolomics
date Fri, 05 Aug 2022 17:25:45 +0000
parents 856001213966
children 77abacd33c31
comparison
equal deleted inserted replaced
4:856001213966 5:78d5a12406c2
1 <tool id="ms2snoop" name="MS2 Snoop" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="21.09"> 1 <tool
2 id="ms2snoop"
3 name="MS2 Snoop"
4 version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@"
5 profile="21.09"
6 >
2 <description> 7 <description>
3 MS1/MS2 spectra and associated adducts extraction and cleaning 8 MS1/MS2 spectra and associated adducts extraction and cleaning
4 </description> 9 </description>
5 <macros> 10 <macros>
6 <import>macros.xml</import> 11 <import>macros.xml</import>
14 <edam_operation>operation_3860</edam_operation> 19 <edam_operation>operation_3860</edam_operation>
15 </edam_operations> 20 </edam_operations>
16 <requirements> 21 <requirements>
17 <requirement type="package" version="4.1.3">r-base</requirement> 22 <requirement type="package" version="4.1.3">r-base</requirement>
18 <requirement type="package" version="1.7.1">r-optparse</requirement> 23 <requirement type="package" version="1.7.1">r-optparse</requirement>
24 <requirement type="package" version="4.9.15">sirius-csifingerid</requirement>
25 <requirement type="package" version="3.0">zip</requirement>
19 </requirements> 26 </requirements>
20 <stdio> 27 <stdio>
21 <exit_code range="1" level="fatal" description="Missing parameter error" /> 28 <exit_code range="1" level="fatal" description="Missing parameter error" />
22 <exit_code range="2" level="fatal" description="Bad parameter's value" /> 29 <exit_code range="2" level="fatal" description="Bad parameter's value" />
23 <exit_code range="3" level="fatal" description="Missing input file" /> 30 <exit_code range="3" level="fatal" description="Missing input file" />
39 --tolrt '$tolrt' 46 --tolrt '$tolrt'
40 --seuil_ra '$seuil_ra' 47 --seuil_ra '$seuil_ra'
41 --mzdecimal '$mzdecimal' 48 --mzdecimal '$mzdecimal'
42 --r_threshold '$r_threshold' 49 --r_threshold '$r_threshold'
43 --min_number_scan '$min_number_scan' 50 --min_number_scan '$min_number_scan'
51 --ionization '$sirius.ionization'
52 --fragment_match_delta '$sirius.fragment_match_delta'
53 --fragment_match_delta_unit '$sirius.fragment_match_delta_unit'
54 $advenced.pdf
44 $advenced.debug 55 $advenced.debug
45 $advenced.verbose 56 $advenced.verbose
46 ]]> 57 ]]>
47 </command> 58 </command>
48 <inputs> 59 <inputs>
49 <param 60 <param
50 argument="--compound_txt" 61 argument="--compound_txt"
51 type="data" 62 type="data"
52 format="tabular,csv,tsv" 63 format="tabular,csv,tsv"
53 label="list of compounds" 64 label="list of compounds"
54 help="The table must fit the format: col1=Name of molecule, col2=m/z, col3=retention time" 65 help="
66 The table must fit the format:
67 compound_name [MANDATORY] ;
68 inchikey [MANDATORY] ;
69 elemcomposition [OPTIONAL] ;
70 mz [MANDATORY] ;
71 rtsec [MANDATORY].
72 "
55 /> 73 />
56 <param 74 <param
57 argument="--peaklist_frag_tsv" 75 argument="--peaklist_frag_tsv"
58 type="data" 76 type="data"
59 format="tabular,csv,tsv" 77 format="tabular,csv,tsv"
70 type="float" 88 type="float"
71 min="0.0001" 89 min="0.0001"
72 max="10" 90 max="10"
73 value="0.01" 91 value="0.01"
74 label="MZ Tolerence" 92 label="MZ Tolerence"
93 help="M/z tolerance to determine if a precursor matches a compound"
75 /> 94 />
76 <param 95 <param
77 argument="--tolrt" 96 argument="--tolrt"
78 type="integer" 97 type="integer"
79 min="0" 98 min="0"
80 max="30" 99 max="30"
81 value="20" 100 value="20"
82 label="RT Tolerence" 101 label="RT Tolerence (in seconds)"
102 help="
103 Retention time tolerance to determine if a
104 precursor matches a compound
105 "
83 /> 106 />
84 <param 107 <param
85 argument="--seuil_ra" 108 argument="--seuil_ra"
86 type="float" 109 type="float"
87 min="0" 110 min="0"
88 max="1" 111 max="1"
89 value="0.05" 112 value="0.05"
90 label="r pearson correlation threshold between precursor and fragment absolute intensity" 113 label="R-Pearson correlation threshold used to filter fragments"
91 /> 114 />
92 <param 115 <param
93 argument="--mzdecimal" 116 argument="--mzdecimal"
94 type="integer" 117 type="integer"
95 min="0" 118 min="0"
96 max="5" 119 max="5"
97 value="0" 120 value="0"
98 label="nb decimal for mz" 121 label="Number of decimal to output M/z values with"
99 /> 122 />
100 <param 123 <param
101 argument="--r_threshold" 124 argument="--r_threshold"
102 type="float" 125 type="float"
103 min="0" 126 min="0"
104 value="0.85" 127 value="0.85"
105 label="fragment absolute intensity" 128 label="
129 Minimun correlation with absolute intensity value to reach
130 for a fragment to be considered as valid.
131 In PDF generation, invalid fragments will be
132 displayed in grey.
133 "
106 /> 134 />
107 <param 135 <param
108 argument="--min_number_scan" 136 argument="--min_number_scan"
109 type="integer" 137 type="integer"
110 min="0" 138 min="0"
111 max="25" 139 max="25"
112 value="8" 140 value="8"
113 label="Present in at least X scan" 141 label="Present in at least X scan"
114 help="fragments are kept if they are found in a minimum number of scans" 142 help="
115 /> 143 Mininum scan number in which a fragment must be found,
144 to be kept.
145 "
146 />
147
148 <section title="Sirius Parameters" name="sirius">
149 <param
150 argument="--ionization"
151 type="select"
152 label="Which ionization"
153 help="Select the ionization to use in sirius"
154 optional="true"
155 >
156 <option value="[M+H]+" selected="true">[M+H]+</option>
157 <option value="[M-H]-">[M-H]-</option>
158 <option value="[M+?]+">[M+?]+</option>
159 <option value="[M+K]+">[M+K]+</option>
160 <option value="[M+Na]+">[M+Na]+</option>
161 <option value="[M+H-H2O]+">[M+H-H2O]+</option>
162 <option value="[M+H-H4O2]+">[M+H-H4O2]+</option>
163 <option value="[M+NH4]+">[M+NH4]+</option>
164 <option value="[M+Cl]-">[M+Cl]-</option>
165 <option value="[M-H2O-H]-">[M-H2O-H]-</option>
166 <option value="[M+Br]-">[M+Br]-</option>
167 </param>
168
169 <param
170 argument="--fragment_match_delta"
171 type="float"
172 min="0"
173 max="25"
174 value="10"
175 label="Fragment match delta"
176 help="
177 Delta that determines if a fragment found by sirius
178 is linked to a certain M/z value.
179 Zero means all fragments found by sirius will be
180 associated even when M/z difference is aberant.
181 "
182 />
183 <param
184 argument="--fragment_match_delta_unit"
185 type="select"
186 label="Delta unit"
187 help="Select the unit of the fragment match delta"
188 optional="true"
189 >
190 <option value="ppm" selected="true">PPM</option>
191 <option value="mz">M/z</option>
192 </param>
193 </section>
194
116 <section title="Advenced Options" name="advenced"> 195 <section title="Advenced Options" name="advenced">
196 <param
197 argument="--pdf"
198 type="boolean"
199 value=""
200 optional="true"
201 label="Output PDF"
202 help="The tool will output some pdf in a zip file"
203 truevalue="--pdf_path '$pdf_output'"
204 falsevalue=""
205 />
117 <param 206 <param
118 argument="--verbose" 207 argument="--verbose"
119 type="boolean" 208 type="boolean"
120 value="" 209 value=""
121 optional="true" 210 optional="true"
137 </section> 226 </section>
138 </inputs> 227 </inputs>
139 <outputs> 228 <outputs>
140 <data 229 <data
141 name="frag_result_txt" 230 name="frag_result_txt"
142 format="tabular" 231 format="tsv"
143 label="compound_fragments_result.txt" 232 label="${tool.name} on ${peaklist_frag_tsv.name}"
144 /> 233 />
234 <data
235 name="pdf_output"
236 format="zip"
237 label="${tool.name} PDFs for ${peaklist_frag_tsv.name}"
238 >
239 <filter>advenced['pdf']</filter>
240 </data>
145 </outputs> 241 </outputs>
146 <tests> 242 <tests>
147 <test> 243 <test>
148 <param name="compound_txt" value="compounds_pos.txt" /> 244 <!-- Regular test with no option -->
149 <param name="peaklist_frag_tsv" value="peaklist_fragments.tsv" /> 245 <param
150 <param name="peaklist_preco_tsv" value="peaklist_precursors.tsv" /> 246 name="compound_txt"
151 <output name="frag_result_txt" file="compound_fragments_result.txt" /> 247 value="compounds_pos.txt"
248 />
249 <param
250 name="peaklist_frag_tsv"
251 value="peaklist_fragments.tsv"
252 />
253 <param
254 name="peaklist_preco_tsv"
255 value="peaklist_precursors.tsv"
256 />
257 <output
258 name="frag_result_txt"
259 file="compound_fragments_result.txt"
260 />
152 <assert_stdout> 261 <assert_stdout>
153 <expand macro="has_regular_stdout"/> 262 <expand macro="has_regular_stdout"/>
154 <expand macro="has_not_verbose_stdout"/> 263 <expand macro="has_not_verbose_stdout"/>
155 <expand macro="has_not_debug_stdout"/> 264 <expand macro="has_not_debug_stdout"/>
156 </assert_stdout> 265 </assert_stdout>
157 </test> 266 </test>
158 <test> 267
159 <param name="compound_txt" value="compounds_pos.txt" /> 268 <test>
160 <param name="peaklist_frag_tsv" value="peaklist_fragments.tsv" /> 269 <!-- Regular files with verbose output -->
161 <param name="peaklist_preco_tsv" value="peaklist_precursors.tsv" /> 270 <param
271 name="compound_txt"
272 value="compounds_pos.txt"
273 />
274 <param
275 name="peaklist_frag_tsv"
276 value="peaklist_fragments.tsv"
277 />
278 <param
279 name="peaklist_preco_tsv"
280 value="peaklist_precursors.tsv"
281 />
162 <param name="verbose" value="--verbose" /> 282 <param name="verbose" value="--verbose" />
163 <output name="frag_result_txt" file="compound_fragments_result.txt" /> 283 <output
284 name="frag_result_txt"
285 file="compound_fragments_result.txt"
286 />
164 <assert_stdout> 287 <assert_stdout>
165 <expand macro="has_regular_stdout"/> 288 <expand macro="has_regular_stdout"/>
166 <expand macro="has_verbose_stdout"/> 289 <expand macro="has_verbose_stdout"/>
167 <expand macro="has_not_debug_stdout"/> 290 <expand macro="has_not_debug_stdout"/>
168 </assert_stdout> 291 </assert_stdout>
169 </test> 292 </test>
170 <test> 293
171 <param name="compound_txt" value="compounds_pos.txt" /> 294 <test>
172 <param name="peaklist_frag_tsv" value="peaklist_fragments.tsv" /> 295 <!-- Regular test with debug outputs -->
173 <param name="peaklist_preco_tsv" value="peaklist_precursors.tsv" /> 296 <param
297 name="compound_txt"
298 value="compounds_pos.txt"
299 />
300 <param
301 name="peaklist_frag_tsv"
302 value="peaklist_fragments.tsv"
303 />
304 <param
305 name="peaklist_preco_tsv"
306 value="peaklist_precursors.tsv"
307 />
174 <param name="debug" value="--debug" /> 308 <param name="debug" value="--debug" />
175 <output name="frag_result_txt" file="compound_fragments_result.txt" /> 309 <output
310 name="frag_result_txt"
311 file="compound_fragments_result.txt"
312 />
176 <assert_stdout> 313 <assert_stdout>
177 <expand macro="has_smol_stdout"/> 314 <expand macro="has_smol_stdout"/>
178 <expand macro="has_debug_stdout"/> 315 <expand macro="has_debug_stdout"/>
179 <expand macro="has_not_verbose_stdout"/> 316 <expand macro="has_not_verbose_stdout"/>
180 </assert_stdout> 317 </assert_stdout>
181 </test> 318 </test>
182 <test> 319
183 <param name="compound_txt" value="compounds_pos.txt" /> 320 <test>
184 <param name="peaklist_frag_tsv" value="peaklist_fragments.tsv" /> 321 <!-- Regular test with both verbose and debug outputs -->
185 <param name="peaklist_preco_tsv" value="peaklist_precursors.tsv" /> 322 <param
323 name="compound_txt"
324 value="compounds_pos.txt"
325 />
326 <param
327 name="peaklist_frag_tsv"
328 value="peaklist_fragments.tsv"
329 />
330 <param
331 name="peaklist_preco_tsv"
332 value="peaklist_precursors.tsv"
333 />
186 <param name="debug" value="--debug" /> 334 <param name="debug" value="--debug" />
187 <param name="verbose" value="--verbose" /> 335 <param name="verbose" value="--verbose" />
188 <output name="frag_result_txt" file="compound_fragments_result.txt" /> 336 <output
337 name="frag_result_txt"
338 file="compound_fragments_result.txt"
339 />
189 <assert_stdout> 340 <assert_stdout>
190 <expand macro="has_smol_stdout"/> 341 <expand macro="has_smol_stdout"/>
191 <expand macro="has_debug_stdout"/> 342 <expand macro="has_debug_stdout"/>
192 <expand macro="has_smol_verbose_stdout"/> 343 <expand macro="has_smol_verbose_stdout"/>
193 </assert_stdout> 344 </assert_stdout>
194 </test> 345 </test>
195 <test> 346
196 <param name="compound_txt" value="compounds_pos.csv" /> 347 <test>
197 <param name="peaklist_frag_tsv" value="peaklist_fragments.tsv" /> 348 <!--
198 <param name="peaklist_preco_tsv" value="peaklist_precursors.csv" /> 349 This test mixes tsv, csv, and so, and ms2snoop is expected
199 <output name="frag_result_txt" file="compound_fragments_result.txt" /> 350 handle them like usual.
200 <assert_stdout> 351 -->
201 <expand macro="has_regular_stdout"/> 352 <param
202 <expand macro="has_not_verbose_stdout"/> 353 name="compound_txt"
203 <expand macro="has_not_debug_stdout"/> 354 value="compounds_pos.csv"
204 </assert_stdout> 355 />
205 </test> 356 <param
206 <test> 357 name="peaklist_frag_tsv"
207 <param name="compound_txt" value="compounds_pos.csv" /> 358 value="peaklist_fragments.tsv"
208 <param name="peaklist_frag_tsv" value="peaklist_fragments.tsv" /> 359 />
209 <param name="peaklist_preco_tsv" value="peaklist_precursors.csv" /> 360 <param
361 name="peaklist_preco_tsv"
362 value="peaklist_precursors.csv"
363 />
210 <param name="verbose" value="--verbose" /> 364 <param name="verbose" value="--verbose" />
211 <output name="frag_result_txt" file="compound_fragments_result.txt" /> 365 <output
366 name="frag_result_txt"
367 file="compound_fragments_result.txt"
368 />
212 <assert_stdout> 369 <assert_stdout>
213 <expand macro="has_regular_stdout"/> 370 <expand macro="has_regular_stdout"/>
214 <expand macro="has_verbose_stdout"/> 371 <expand macro="has_verbose_stdout"/>
215 <expand macro="has_not_debug_stdout"/> 372 <expand macro="has_not_debug_stdout"/>
216 </assert_stdout> 373 </assert_stdout>
217 </test> 374 </test>
218 <test> 375
219 <param name="compound_txt" value="compounds_pos.csv" /> 376 <test>
220 <param name="peaklist_frag_tsv" value="peaklist_fragments.tsv" /> 377 <!--
221 <param name="peaklist_preco_tsv" value="peaklist_precursors.csv" /> 378 This test contains smaller datasets. This is the "regular"
222 <param name="debug" value="--debug" /> 379 smol test, to prepare further smolah tests.
223 <output name="frag_result_txt" file="compound_fragments_result.txt" /> 380 -->
224 <assert_stdout> 381 <param name="ionization" value="[M+?]+" />
225 <expand macro="has_smol_stdout"/> 382 <param name="mzdecimal" value="3" />
226 <expand macro="has_debug_stdout"/> 383 <param name="compound_txt" value="smol/smol_compounds_pos.csv"/>
227 <expand macro="has_not_verbose_stdout"/> 384 <param name="peaklist_frag_tsv" value="smol/smol_fragments.tsv" />
228 </assert_stdout> 385 <param name="peaklist_preco_tsv" value="smol/smol_precursors.tsv" />
229 </test> 386 <output name="frag_result_txt" file="smol/out-smol-base.tsv" />
230 <test> 387 </test>
231 <param name="compound_txt" value="compounds_pos.csv" /> 388
232 <param name="peaklist_frag_tsv" value="peaklist_fragments.tsv" /> 389 <test>
233 <param name="peaklist_preco_tsv" value="peaklist_precursors.csv" /> 390 <!--
234 <param name="debug" value="--debug" /> 391 Test for pdf generation
235 <param name="verbose" value="--verbose" /> 392 -->
236 <output name="frag_result_txt" file="compound_fragments_result.txt" /> 393 <param name="pdf" value="True" />
237 <assert_stdout> 394 <param name="ionization" value="[M+?]+" />
238 <expand macro="has_smol_stdout"/> 395 <param name="mzdecimal" value="3" />
239 <expand macro="has_debug_stdout"/> 396 <param name="compound_txt" value="smol/smol_compounds_pos.csv"/>
240 <expand macro="has_smol_verbose_stdout"/> 397 <param name="peaklist_frag_tsv" value="smol/smol_fragments.tsv" />
241 </assert_stdout> 398 <param name="peaklist_preco_tsv" value="smol/smol_precursors.tsv" />
242 </test> 399 <output name="frag_result_txt" file="smol/out-smol-base.tsv" />
400 </test>
401
402 <test>
403 <!--
404 test for delta in ppm
405 -->
406 <param name="ionization" value="[M+?]+" />
407 <param name="mzdecimal" value="3" />
408 <param name="compound_txt" value="smol/smol_compounds_pos.csv"/>
409 <param name="peaklist_frag_tsv" value="smol/smol_fragments.tsv" />
410 <param name="peaklist_preco_tsv" value="smol/smol_precursors.tsv" />
411 <param name="fragment_match_delta" value="8.542" />
412 <output name="frag_result_txt" file="smol/out-smol-delta-8.542.tsv" />
413 </test>
414
415 <test>
416 <!--
417 test for delta in m/z
418 -->
419 <param name="ionization" value="[M+?]+" />
420 <param name="mzdecimal" value="3" />
421 <param name="compound_txt" value="smol/smol_compounds_pos.csv"/>
422 <param name="peaklist_frag_tsv" value="smol/smol_fragments.tsv" />
423 <param name="peaklist_preco_tsv" value="smol/smol_precursors.tsv" />
424 <param name="fragment_match_delta" value="0.05" />
425 <param name="fragment_match_delta_unit" value="mz" />
426 <output name="frag_result_txt" file="smol/out-smol-delta-0.05mz.tsv" />
427 </test>
428
429 <!-- === expected to fail tests === -->
243 <test expect_exit_code="2" expect_failure="true"> 430 <test expect_exit_code="2" expect_failure="true">
244 <param name="compound_txt" value="compounds_pos_old_format.txt" /> 431 <!--
245 <param name="peaklist_frag_tsv" value="peaklist_fragments.tsv" /> 432 This test uses old format for molecules file.
246 <param name="peaklist_preco_tsv" value="peaklist_precursors.csv" /> 433 Is is expected to fail
434 -->
435 <param
436 name="compound_txt"
437 value="compounds_pos_old_format.txt"
438 />
439 <param
440 name="peaklist_frag_tsv"
441 value="peaklist_fragments.tsv"
442 />
443 <param
444 name="peaklist_preco_tsv"
445 value="peaklist_precursors.csv"
446 />
247 <assert_stderr> 447 <assert_stderr>
248 <has_line line="Error: Some columns are missing: compound_name, rtsec, inchikey" /> 448 <has_line line="Error: Some columns are missing: compound_name, rtsec, inchikey" />
249 </assert_stderr> 449 </assert_stderr>
250 </test> 450 </test>
451
251 </tests> 452 </tests>
252 <help><![CDATA[ 453 <help><![CDATA[
253 454
254 @AUTHORS@ 455 @AUTHORS@
255 456