1
|
1 <tool id="bank_inhouse" name="bank_inhouse" version="1.2.1">
|
0
|
2 <description>
|
|
3 search by accurate mass (and by Retention time) on a local bank
|
|
4 </description>
|
|
5
|
|
6 <requirements>
|
|
7 <requirement type="package" version="2.90">perl-json</requirement>
|
|
8 <requirement type="package" version="1.97">perl-text-csv</requirement>
|
|
9 <requirement type="package" version="6.15">perl-lwp-simple</requirement>
|
|
10 <requirement type="package" version="1.74">perl-uri</requirement>
|
|
11 <requirement type="package" version="1.19">perl-soap-lite</requirement>
|
|
12 <requirement type="package" version="2.97">perl-html-template</requirement>
|
|
13 <requirement type="package" version="0.428">perl-list-moreutils</requirement>
|
|
14 <requirement type="package" version="6.15">perl-libwww-perl</requirement>
|
|
15 </requirements>
|
|
16 <stdio>
|
|
17 <exit_code range="1" level="fatal" />
|
|
18 </stdio>
|
|
19
|
|
20 <command><![CDATA[
|
|
21 perl $__tool_directory__/bank_inhouse.pl
|
|
22
|
|
23 #if str($input_type.choice) == "YES":
|
|
24 -input "${input_type.variableMetadata_in}"
|
|
25 #if str($input_type.header.header_choice) == "YES":
|
|
26 -nbheader "${input_type.header.nbheader}"
|
|
27 #end if
|
|
28
|
|
29 -colmass "${input_type.colmass}"
|
|
30 #if str($input_type.use_file_rt.rt_file_choice) == "YES":
|
|
31 -colrt "${input_type.use_file_rt.colrt}"
|
|
32 -rt_delta "${input_type.use_file_rt.rt_file_delta}"
|
|
33 #end if
|
|
34 #else:
|
|
35 #if str($input_type.use_rt.rt_choice) == "YES":
|
|
36 -rt "${input_type.use_rt.rt}"
|
|
37 -rt_delta "${input_type.use_rt.rt_delta}"
|
|
38 #end if
|
|
39 -masse "${input_type.masse}"
|
|
40 #end if
|
|
41
|
|
42 -mz_delta "${mz_delta_type.mz_delta}"
|
|
43 -mass_delta "${mz_delta_type.mass_delta}"
|
|
44
|
|
45 #if str($bank_type.perso_bank) == "YES":
|
|
46 -bank_in "${bank_type.bank_in}" -bank_name "${bank_type.bank_in.name}"
|
|
47 -mzdb "${bank_type.mzdb}"
|
|
48 #if str($bank_type.bank_rt.bank_rt_choice) == "YES":
|
|
49 -rtdb "${bank_type.bank_rt.rtdb}"
|
|
50 #end if
|
|
51 #end if
|
|
52
|
|
53 #if str($input_type.choice) == "YES":
|
|
54 -outputTab "$variableMetadata_out"
|
|
55 -outputXls "$bankInhouseResXls_filein"
|
|
56 #if str($outfiles) == "YES":
|
|
57 -outputFull "$variableMetadata_full_out"
|
|
58 #end if
|
|
59 #else:
|
|
60 -outputXls "$bankInhouseResXls_manualin"
|
|
61 #end if
|
|
62
|
|
63 #if str($outfiles) == "YES":
|
|
64 -outputJson "$Json"
|
|
65 #end if
|
|
66 ]]></command>
|
|
67
|
|
68 <inputs>
|
|
69 <conditional name="input_type">
|
|
70 <param name="choice" type="select" display="radio" label="* Would you use a file?" help="if 'NO' is selected then one or more mass(es) must be entered manually">
|
|
71 <option value="NO">NO</option>
|
|
72 <option value="YES" selected="true">YES</option>
|
|
73 </param>
|
|
74 <when value="YES">
|
|
75 <param name="variableMetadata_in" type="data" label="FILE OF MASSES (format: tabular)" help="Generally variable metadata file" format="tabular" />
|
|
76
|
|
77 <conditional name="header">
|
|
78 <param name="header_choice" type="boolean" checked="true" truevalue="YES" falsevalue="NO" label="Do you have a header?" help="if 'YES' is selected then enter your number of header lines" />
|
|
79 <when value="YES">
|
|
80 <param name="nbheader" type="integer" label="Number of header lines" value="1" min="1" max="10" help="number of lines not containing masses"/>
|
|
81 </when>
|
|
82 <when value="NO"/>
|
|
83 </conditional>
|
|
84
|
|
85 <conditional name="use_file_rt">
|
|
86 <param name="rt_file_choice" type="boolean" checked="true" truevalue="YES" falsevalue="NO" label="Would you use retention time (RT)?" help="Do you have retention times in your bank? In your analyzed file? Would you use it?" />
|
|
87 <when value="YES">
|
|
88 <param name="colrt" label="Column of retention time (RT)" type="data_column" data_ref="variableMetadata_in" accept_default="true" />
|
|
89 <param name="rt_file_delta" label="Delta of retention time (RT) (in minutes)" type="float" value="0.1" min="0" max="60" help="Default value is 0.1min"/>
|
|
90 </when>
|
|
91 <when value="NO"/>
|
|
92 </conditional>
|
|
93
|
|
94 <param name="colmass" label="Column of masses (MZ)" type="data_column" data_ref="variableMetadata_in" accept_default="true" />
|
|
95 </when>
|
|
96 <when value="NO">
|
|
97 <conditional name="use_rt">
|
|
98 <param name="rt_choice" type="boolean" checked="true" truevalue="YES" falsevalue="NO" label="Would you use retention time (RT)?" help="Do you have retention times in your bank? Would you use it?" />
|
|
99 <when value="YES">
|
|
100 <param name="rt" label="retention time (RT) to submit" type="text" size="10" help="For a rt list, writes : rt1 rt2 rt3. Your values ​​must be separated by spaces. You should use dot (.) like decimal separator"/>
|
|
101 <param name="rt_delta" label="Delta of retention time (RT) (in minutes)" type="float" value="0.1" min="0" max="60" help="Default value is 0.1min"/>
|
|
102 </when>
|
|
103 <when value="NO"/>
|
|
104 </conditional>
|
|
105
|
|
106 <param name="masse" type="text" label="Mass (MZ) to submit" size="20" help="For a masses list, writes : m1 m2 m3. Your values ​​must be separated by spaces. You should use dot (.) like decimal separator"/>
|
|
107 </when>
|
|
108 </conditional>
|
|
109
|
|
110 <conditional name="mz_delta_type">
|
|
111 <param name="mz_delta" label="Delta type" type="select" display="radio" help="">
|
|
112 <option value="Da">Da</option>
|
|
113 <option value="ppm">ppm</option>
|
|
114 </param>
|
|
115 <when value="Da">
|
|
116 <param name="mass_delta" label="Delta of mass (MZ) (in Dalton)" type="float" value="0.005" min="0" max="3000" help="Default value is 0.005 Da"/>
|
|
117 </when>
|
|
118 <when value="ppm">
|
|
119 <param name="mass_delta" label="Delta of mass (MZ) (in ppm)" type="float" value="5" min="0" max="300000" help="Default value is 5 ppm"/>
|
|
120 </when>
|
|
121 </conditional>
|
|
122
|
|
123 <conditional name="bank_type">
|
|
124 <param name="perso_bank" type="boolean" checked="true" truevalue="YES" falsevalue="NO" label="* Use personal data bank?" help="if 'NO' is selected an internal file will be used! It doesn't contain a retention time (RT)" />
|
|
125 <when value="YES">
|
|
126 <param name="bank_in" type="data" label="BANK FILE" help="" format="tabular" />
|
|
127 <param name="mzdb" label="Column of masses (MZ) in Bank file" type="data_column" data_ref="bank_in" accept_default="true" />
|
|
128 <conditional name="bank_rt">
|
|
129 <param name="bank_rt_choice" type="boolean" checked="true" truevalue="YES" falsevalue="NO" label="Have you used the retention time (RT) for your input data?" help="Do you have retention times in your bank? In your analyzed data? Would you use it?" />
|
|
130 <when value="YES">
|
|
131 <param name="rtdb" label="Column of retention time (RT) in Bank file" type="data_column" data_ref="bank_in" accept_default="true" />
|
|
132 </when>
|
|
133 <when value="NO"/>
|
|
134 </conditional>
|
|
135 </when>
|
|
136 <when value="NO"/>
|
|
137 </conditional>
|
|
138 <param name="outfiles" type="select" label="* Would you more output?" display="radio" help="if 'YES' is selected then 2 more files will be generate (JSON + variableMetadata and bank full column)">
|
|
139 <option value="YES">YES</option>
|
|
140 <option value="NO" selected="true">NO</option>
|
|
141 </param>
|
|
142 </inputs>
|
|
143
|
|
144 <outputs>
|
|
145 <data name="variableMetadata_out" format="tabular" label="${tool.name}_${input_type.variableMetadata_in.name}_TSV" >
|
|
146 <filter>(input_type['choice'] == 'YES')</filter>
|
|
147 </data>
|
|
148 <data name="bankInhouseResXls_filein" format="tabular" label="${tool.name}_${input_type.variableMetadata_in.name}_XLS" >
|
|
149 <filter>(input_type['choice'] == 'YES')</filter>
|
|
150 </data>
|
|
151 <data name="variableMetadata_full_out" format="tabular" label="${tool.name}_${input_type.variableMetadata_in.name}_full_TSV" >
|
|
152 <filter>(input_type['choice'] == 'YES')</filter>
|
|
153 <filter>(outfiles == 'YES')</filter>
|
|
154 </data>
|
|
155 <data name="bankInhouseResXls_manualin" format="tabular" label="${tool.name}_manual_XLS" >
|
|
156 <filter>(input_type['choice'] == 'NO')</filter>
|
|
157 </data>
|
|
158 <data name="Json" format="vjson" label="${tool.name}_Json" >
|
|
159 <filter>(outfiles == 'YES')</filter>
|
|
160 </data>
|
|
161 <!--<data name="View" format="html" label="${tool.name}_View" ></data>-->
|
|
162 </outputs>
|
|
163
|
|
164 <tests>
|
|
165 <test>
|
|
166 <param name="choice" value="NO"/>
|
|
167 <param name="rt_choice" value="NO"/>
|
|
168 <param name="masse" value="422.0849114 18.0105647 535.3181236 209.987659 98.952389"/>
|
|
169 <param name="mz_delta" value="Da"/>
|
|
170 <param name="mass_delta" value="0.005"/>
|
|
171 <param name="perso_bank" value="NO"/>
|
|
172 <param name="outfiles" value="NO"/>
|
|
173 <output name="bankInhouseResXls_manualin" file="out_test1.tabular"/>
|
|
174 </test>
|
|
175 <test>
|
|
176 <param name="choice" value="YES"/>
|
|
177 <param name="variableMetadata_in" value="in_test2.tabular"/>
|
|
178 <param name="header_choice" value="YES"/>
|
|
179 <param name="nbheader" value="1"/>
|
|
180 <param name="rt_file_choice" value="NO"/>
|
|
181 <param name="colmass" value="2"/>
|
|
182 <param name="mz_delta" value="Da"/>
|
|
183 <param name="mass_delta" value="0.005"/>
|
|
184 <param name="perso_bank" value="NO"/>
|
|
185 <param name="outfiles" value="NO"/>
|
|
186
|
|
187 <output name="variableMetadata_out" file="out_test2a.tabular"/>
|
|
188 <output name="bankInhouseResXls_filein" file="out_test2b.tabular"/>
|
|
189 </test>
|
|
190 <!--
|
|
191 <test>
|
|
192 <param name="choice" value="YES"/>
|
|
193 <param name="variableMetadata_in" value="in_test3.tabular"/>
|
|
194 <param name="header_choice" value="YES"/>
|
|
195 <param name="nbheader" value="1"/>
|
|
196 <param name="rt_file_choice" value="NO"/>
|
|
197 <param name="colmass" value="2"/>
|
|
198 <param name="mz_delta" value="Da"/>
|
|
199 <param name="mass_delta" value="0.005"/>
|
|
200 <param name="perso_bank" value="NO"/>
|
|
201 <param name="outfiles" value="NO"/>
|
|
202
|
|
203 <output name="variableMetadata_out" file="out_test3a.tabular"/>
|
|
204 <output name="bankInhouseResXls_filein" file="out_test3b.tabular"/>
|
|
205 </test>
|
|
206 <test>
|
|
207 <param name="choice" value="YES"/>
|
|
208 <param name="variableMetadata_in" value="in_test4.tabular"/>
|
|
209 <param name="header_choice" value="YES"/>
|
|
210 <param name="nbheader" value="1"/>
|
|
211 <param name="rt_file_choice" value="YES"/>
|
|
212 <param name="colrt" value="10"/>
|
|
213 <param name="rt_file_delta" value="0.2"/>
|
|
214 <param name="colmass" value="8"/>
|
|
215 <param name="mz_delta" value="Da"/>
|
|
216 <param name="mass_delta" value="0"/>
|
|
217 <param name="perso_bank" value="YES"/>
|
|
218 <param name="bank_in" value="in_test4.tabular"/>
|
|
219 <param name="mzdb" value="8"/>
|
|
220 <param name="bank_rt_choice" value="YES"/>
|
|
221 <param name="rtdb" value="10"/>
|
|
222 <param name="outfiles" value="YES"/>
|
|
223
|
|
224 <output name="variableMetadata_out" file="out_test4a.tabular"/>
|
|
225 <output name="bankInhouseResXls_filein" file="out_test4b.tabular"/>
|
|
226 <output name="variableMetadata_full_out" file="out_test4c.tabular"/>
|
|
227 <output name="Json" file="out_test4d.vjson"/>
|
|
228 </test>-->
|
|
229 </tests>
|
|
230
|
|
231 <help><![CDATA[
|
|
232
|
|
233 .. class:: infomark
|
|
234
|
|
235 **Authors**
|
1
|
236 | Jean-François Martin - PFEM ; INRA ; MetaboHUB (for original version in R)
|
|
237 | Marion Landi - FLAME ; PFEM ; INRA ; MetaboHUB (for adapted version and development of this Perl script and for xml interface and Perl wrapper)
|
|
238 | Franck Giacomoni - PFEM ; INRA ; MetaboHUB (for actual dev and maintaining)
|
0
|
239
|
|
240 ---------------------------------------------------
|
|
241
|
|
242
|
|
243 ==============
|
|
244 bank_inhouse
|
|
245 ==============
|
|
246
|
|
247 -----------
|
|
248 Description
|
|
249 -----------
|
|
250
|
|
251 | Search informations on a local bank with one or more mass(es), with or without retention time, in a file or entered manually
|
|
252
|
|
253
|
|
254 Keywords
|
|
255 ========
|
|
256
|
|
257 Masses + rt to inhouse info
|
|
258
|
|
259
|
|
260 -----------------
|
|
261 Workflow position
|
|
262 -----------------
|
|
263
|
|
264
|
|
265 .. image:: bank_inhouse.png
|
|
266 :width: 800
|
|
267
|
|
268
|
|
269 -----------
|
|
270 Input files
|
|
271 -----------
|
|
272
|
|
273
|
|
274 +-----------------------------+-----------+
|
|
275 | Parameter : num + label | Format |
|
|
276 +=============================+===========+
|
|
277 | 1 : File of masses | tabular |
|
|
278 +-----------------------------+-----------+
|
|
279 | 2 : personal data bank file | tabular |
|
|
280 +-----------------------------+-----------+
|
|
281
|
|
282 File of masses (Generally variable metadata file) must have at least the 2 following column :
|
|
283 | Id : column to identify masses in the tsv input file
|
|
284 | Masses : column with all the masses in the tsv input file
|
|
285 | RT : (optional) column with all the retention time in the tsv input file
|
|
286 |
|
|
287
|
|
288 personal data bank file must contain certain columns :
|
|
289 | Masses (Mandatory) and RT (optional)
|
|
290 |
|
|
291
|
|
292 ----------
|
|
293 Parameters
|
|
294 ----------
|
|
295
|
|
296 Would you use a file
|
|
297 | Choose whether the masses are in a file or entered manually
|
|
298 | YES (default) : parameters **File of masses ; Do you have a header ; Column of Id ; Column of masses** are visible
|
|
299 | NO : parameter **Mass to submit** is visible
|
|
300 |
|
|
301
|
|
302
|
|
303 If 'use file'='YES'
|
|
304
|
|
305 File of masses
|
|
306 | see "Input files" section above
|
|
307 | Tabular file format, Generally variable metadata file
|
|
308 |
|
|
309
|
|
310 Do you have a header
|
|
311 | YES (default) : parameter **Number of header lines** is visible
|
|
312 | NO : all lines are considered to contain masses
|
|
313 |
|
|
314
|
|
315 If 'have a header'='YES'
|
|
316
|
|
317 Number of header lines
|
|
318 | Number of lines not containing masses values, these lines will be ignored
|
|
319 |
|
|
320
|
|
321 In all header cases :
|
|
322
|
|
323 Column of Id
|
|
324 | Specify the column number for the id in the tsv input file
|
|
325 |
|
|
326
|
|
327 Would you use retention time (RT)
|
|
328 | YES (default) : parameter **Column of retention time (RT)** and **Delta of retention time (RT) (in minutes)** are visible
|
|
329 | NO : Search will be made solely on the basis of the masses
|
|
330 |
|
|
331
|
|
332 If 'Would you use retention time (RT)'='YES'
|
|
333
|
|
334 Column of retention time (RT)
|
|
335 | Specify the column number for the retention time (RT) in the tsv input file
|
|
336 |
|
|
337
|
|
338 Delta of retention time (RT) (in minutes)
|
|
339 | Specify a delta to apply on retention time - This value is a float.
|
|
340 |
|
|
341
|
|
342 In all RT cases :
|
|
343
|
|
344 Column of masses
|
|
345 | Specify the column number for the mass in the tsv input file
|
|
346 |
|
|
347
|
|
348
|
|
349 If 'use file'='NO'
|
|
350
|
|
351 Would you use retention time (RT)
|
|
352 | YES (default) : parameter **retention time (RT) to submit** and **Delta of retention time (RT) (in minutes)** are visible
|
|
353 | NO : Search will be made solely on the basis of the masses
|
|
354 |
|
|
355
|
|
356 If 'Would you use retention time (RT)'='YES'
|
|
357
|
|
358 retention time (RT) to submit
|
|
359 | Specify a list of retention time to request
|
|
360 | one or more retention time entered manually
|
|
361 | For a RT list, writes : rt1 rt2 rt3
|
|
362 | You must separate yours values with space
|
|
363 | dot (.) is for float number
|
|
364 |
|
|
365 Delta of retention time (RT) (in minutes)
|
|
366 | Specify a delta to apply on retention time - This value is a float.
|
|
367 |
|
|
368
|
|
369 In all RT cases :
|
|
370
|
|
371 Mass to submit
|
|
372 | Specify a list of mass to request
|
|
373 | one or more mass(es) entered manually
|
|
374 | For a masses list, writes : m1 m2 m3
|
|
375 | You must separate yours values with space
|
|
376 | dot (.) is for float number
|
|
377 |
|
|
378
|
|
379 In all cases :
|
|
380
|
|
381 Delta type
|
|
382 | Specify a delta type : "in Dalton" or "in ppm"
|
|
383 |
|
|
384
|
|
385 Delta of mass ("in Dalton" or "in ppm" according to choice)
|
|
386 | Specify a delta to apply on mass - This value is a float.
|
|
387 |
|
|
388
|
|
389 Use personal data bank
|
|
390 | YES : parameter **Bank file**, **Column of masses (MZ) in Bank file** and **Column of retention time (RT) in Bank file** (optional) are visible, the search will be made only on the information of the file
|
|
391 | NO : a internal bank will be used
|
|
392 |
|
|
393
|
|
394 If 'Use personal data bank'='YES'
|
|
395
|
|
396 Bank file
|
|
397 | see "Input files" section above
|
|
398 | Tabular file format, Generally variable metadata file
|
|
399 |
|
|
400
|
|
401 Column of masses
|
|
402 | Specify the column number for the mass in the bank input file
|
|
403 |
|
|
404
|
|
405 Have you used the retention time (RT) for your input data
|
|
406 | Answering same as for "Would you use retention time (RT)"
|
|
407 | YES (default) : parameter **Column of retention time (RT) in Bank file** is visible
|
|
408 | NO : Search will be made solely on the basis of the masses
|
|
409 |
|
|
410
|
|
411 Column of retention time (RT) in Bank file
|
|
412 | Specify the column number for the rt in the bank input file
|
|
413 |
|
|
414
|
|
415
|
|
416 ------------
|
|
417 Output files
|
|
418 ------------
|
|
419
|
|
420 Two types of files (if you manually enter the masses both files are mingled):
|
|
421 | bank_inhouse_(input.name)_TSV.tabular : for linking with others modules.
|
|
422 |
|
|
423 | bank_inhouse_(input.name)_XLS.tabular : an excel-like output will be available.
|
|
424 |
|
|
425
|
|
426
|
|
427 ---------------------------------------------------
|
|
428
|
|
429
|
|
430 ---------------
|
|
431 Working example
|
|
432 ---------------
|
|
433
|
|
434
|
|
435 .. class:: warningmark
|
|
436
|
|
437 Refer to the corresponding W4M HowTo section: http://workflow4metabolomics.org/howto
|
|
438 | Format Data For Postprocessing
|
|
439 | Perform LCMS Annotations
|
|
440
|
|
441 .. class:: warningmark
|
|
442
|
1
|
443 And their "W4M courses 2018":
|
0
|
444 | Using Galaxy4Metabolomics - W4M table format for Galaxy
|
|
445 | Annotation Banks - Annotation
|
|
446
|
|
447 ]]></help>
|
|
448 </tool>
|