Mercurial > repos > galaxyp > proteomics_moff
comparison moff.xml @ 2:28b65ce1a091 draft
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/moFF commit ba04453c8ce4bd23a138e3e546ad17064b3ac38c
author | galaxyp |
---|---|
date | Wed, 14 Feb 2018 07:19:47 -0500 |
parents | 8f0e76ad46ef |
children | 226287d75d96 |
comparison
equal
deleted
inserted
replaced
1:8f0e76ad46ef | 2:28b65ce1a091 |
---|---|
1 <tool id="proteomics_moff" name="moFF" version="@VERSION@"> | 1 <tool id="proteomics_moff" name="moFF" version="@VERSION@.1"> |
2 <description>extracts MS1 intensities from spectrum files</description> | 2 <description>extracts MS1 intensities from spectrum files</description> |
3 <macros> | 3 <macros> |
4 <token name="@VERSION@">1.2.1</token> | 4 <token name="@VERSION@">1.2.1</token> |
5 <!-- xml macros, used for shared Galaxy parameter inputs --> | 5 <!-- xml macros, used for shared Galaxy parameter inputs --> |
6 <xml name="ident_input_macro" token_allow_multiple="true" token_input_type="data"> | 6 <xml name="ident_input_macro" token_allow_multiple="true" token_input_type="data"> |
75 --inputtsv './ident_inputs/${task.ident_input.ident_input_file.display_name}' | 75 --inputtsv './ident_inputs/${task.ident_input.ident_input_file.display_name}' |
76 ]]></token> | 76 ]]></token> |
77 <token name="@WRANGLE_IDENT_INPUT_SINGLE@"><![CDATA[ | 77 <token name="@WRANGLE_IDENT_INPUT_SINGLE@"><![CDATA[ |
78 mkdir ./ident_inputs && | 78 mkdir ./ident_inputs && |
79 #if $task.ident_input.input_type_selector == "ps": | 79 #if $task.ident_input.input_type_selector == "ps": |
80 ln -s '$task.ident_input.ident_input_file' './ident_inputs/$task.ident_input.ident_input_file.display_name' && | 80 cp '$task.ident_input.ident_input_file' './ident_inputs/$task.ident_input.ident_input_file.display_name' && |
81 #else | 81 #else |
82 cp '$task.ident_input.ident_input_file' ./tempfile1.tab && | |
82 ## optionally remove first line | 83 ## optionally remove first line |
83 #if $task.ident_input.remove_header: | 84 #if $task.ident_input.remove_header: |
84 sed -i '1d' '$task.ident_input.ident_input_file' && | 85 sed -i '1d' ./tempfile1.tab && |
85 #end if | 86 #end if |
86 ## header row with correct names: "peptide", "prot", "mod_peptide", "rt", "mz", "mass", and "charge" | 87 ## header row with correct names: "peptide", "prot", "mod_peptide", "rt", "mz", "mass", and "charge" |
87 echo -e "peptide\tprot\tmod_peptide\trt\tmz\tmass\tcharge" > tempfile.tab && | 88 echo -e "peptide\tprot\tmod_peptide\trt\tmz\tmass\tcharge" > ./tempfile2.tab && |
88 awk 'BEGIN{OFS="\t"; FS="\t"}{print \$pep,\$prot,\$mod,\$rt,\$mz,\$mass,\$charge}' pep="${task.ident_input.peptide}" prot="$task.ident_input.prot" mod="$task.ident_input.mod_peptide" rt="$task.ident_input.rt" mz="$task.ident_input.mz" mass="$task.ident_input.mass" charge="$task.ident_input.charge" '$task.ident_input.ident_input_file' >> tempfile.tab && | 89 awk 'BEGIN{OFS="\t"; FS="\t"}{print \$pep,\$prot,\$mod,\$rt,\$mz,\$mass,\$charge}' pep="${task.ident_input.peptide}" prot="$task.ident_input.prot" mod="$task.ident_input.mod_peptide" rt="$task.ident_input.rt" mz="$task.ident_input.mz" mass="$task.ident_input.mass" charge="$task.ident_input.charge" ./tempfile1.tab >> ./tempfile2.tab && |
89 mv tempfile.tab '$task.ident_input.ident_input_file' && | 90 mv ./tempfile2.tab './ident_inputs/$task.ident_input.ident_input_file.display_name' && |
90 ln -s '$task.ident_input.ident_input_file' './ident_inputs/$task.ident_input.ident_input_file.display_name' && | |
91 #end if | 91 #end if |
92 ]]></token> | 92 ]]></token> |
93 <token name="@WRANGLE_IDENT_INPUT_MULTIPLE@"><![CDATA[ | 93 <token name="@WRANGLE_IDENT_INPUT_MULTIPLE@"><![CDATA[ |
94 mkdir ./ident_inputs && | 94 mkdir ./ident_inputs && |
95 #if $task.ident_input.input_type_selector == "ps": | 95 #if $task.ident_input.input_type_selector == "ps": |
96 #for $key in $task.ident_input.ident_input_file.keys(): | 96 #for $key in $task.ident_input.ident_input_file.keys(): |
97 ln -s '${task.ident_input.ident_input_file[$key]}' './ident_inputs/${task.ident_input.ident_input_file[$key].display_name}' && | 97 cp '${task.ident_input.ident_input_file[$key]}' './ident_inputs/${task.ident_input.ident_input_file[$key].display_name}' && |
98 #end for | 98 #end for |
99 #else | 99 #else |
100 #for $key in $task.ident_input.ident_input_file.keys(): | 100 #for $key in $task.ident_input.ident_input_file.keys(): |
101 cp '${task.ident_input.ident_input_file[$key]}' './tempfile${key}_1.tab' && | |
101 ## optionally remove first line | 102 ## optionally remove first line |
102 #if $task.ident_input.remove_header: | 103 #if $task.ident_input.remove_header: |
103 sed -i '1d' '$task.ident_input.ident_input_file[$key]' && | 104 sed -i '1d' './tempfile${key}_1.tab' && |
104 #end if | 105 #end if |
105 ## header row with correct names: "peptide", "prot", "mod_peptide", "rt", "mz", "mass", and "charge" | 106 ## header row with correct names: "peptide", "prot", "mod_peptide", "rt", "mz", "mass", and "charge" |
106 echo -e "peptide\tprot\tmod_peptide\trt\tmz\tmass\tcharge" > tempfile.tab && | 107 echo -e "peptide\tprot\tmod_peptide\trt\tmz\tmass\tcharge" > './tempfile${key}_2.tab' && |
107 awk 'BEGIN{OFS="\t"; FS="\t"}{print \$pep,\$prot,\$mod,\$rt,\$mz,\$mass,\$charge}' pep="${task.ident_input.peptide}" prot="$task.ident_input.prot" mod="$task.ident_input.mod_peptide" rt="$task.ident_input.rt" mz="$task.ident_input.mz" mass="$task.ident_input.mass" charge="$task.ident_input.charge" '$filename' >> tempfile.tab && | 108 awk 'BEGIN{OFS="\t"; FS="\t"}{print \$pep,\$prot,\$mod,\$rt,\$mz,\$mass,\$charge}' pep="${task.ident_input.peptide}" prot="$task.ident_input.prot" mod="$task.ident_input.mod_peptide" rt="$task.ident_input.rt" mz="$task.ident_input.mz" mass="$task.ident_input.mass" charge="$task.ident_input.charge" './tempfile${key}_1.tab' >> './tempfile${key}_2.tab' && |
108 mv tempfile.tab '$task.ident_input.ident_input_file[$key]' && | 109 mv './tempfile${key}_2.tab' './ident_inputs/$task.ident_input.ident_input_file[$key].display_name' && |
109 ln -s '$task.ident_input.ident_input_file[$key]' './ident_inputs/$task.ident_input.ident_input_file[$key].display_name' && | |
110 #end for | 110 #end for |
111 #end if | 111 #end if |
112 ]]></token> | 112 ]]></token> |
113 <token name="@RAW_INPUT_ARG_SINGLE@"><![CDATA[ | 113 <token name="@RAW_INPUT_ARG_SINGLE@"><![CDATA[ |
114 --inputraw './raws/$task.msms_input.inputraw.display_name' | 114 --inputraw './raws/$task.msms_input.inputraw.display_name' |
133 ]]></token> | 133 ]]></token> |
134 </macros> | 134 </macros> |
135 <requirements> | 135 <requirements> |
136 <requirement type="package" version="@VERSION@">moff</requirement> | 136 <requirement type="package" version="@VERSION@">moff</requirement> |
137 </requirements> | 137 </requirements> |
138 <version_command>echo @VERSION@</version_command> | |
138 <command detect_errors="aggressive"><![CDATA[ | 139 <command detect_errors="aggressive"><![CDATA[ |
139 mkdir ./out && | 140 mkdir ./out && |
140 #if $task.task_selector == "moff": | 141 #if $task.task_selector == "moff": |
141 @WRANGLE_IDENT_INPUT_SINGLE@ | 142 @WRANGLE_IDENT_INPUT_SINGLE@ |
142 @WRANGLE_RAW_INPUT_SINGLE@ | 143 @WRANGLE_RAW_INPUT_SINGLE@ |
186 #end if | 187 #end if |
187 ]]></command> | 188 ]]></command> |
188 <inputs> | 189 <inputs> |
189 <conditional name="task"> | 190 <conditional name="task"> |
190 <param name="task_selector" type="select" label="Choose which module to run"> | 191 <param name="task_selector" type="select" label="Choose which module to run"> |
191 <option value="moff" selected="true">Apex intensity</option> | 192 <option value="moff">Apex intensity</option> |
192 <option value="mbr">Match between runs</option> | 193 <option value="mbr">Match between runs</option> |
193 <option value="all">All (match-between-runs followed by quantitation)</option> | 194 <option value="all">All (match-between-runs followed by quantitation)</option> |
194 </param> | 195 </param> |
195 <when value = "moff"> | 196 <when value = "moff"> |
196 <expand macro="ident_input_macro" allow_multiple="false"/> | 197 <expand macro="ident_input_macro" allow_multiple="false"/> |
199 help="Specify the tolerance parameter in ppm." /> | 200 help="Specify the tolerance parameter in ppm." /> |
200 <param argument="--rt_w" type="float" value="3.0" label="Retention time window" | 201 <param argument="--rt_w" type="float" value="3.0" label="Retention time window" |
201 help="Specify rt window for xic in minutes." /> | 202 help="Specify rt window for xic in minutes." /> |
202 <param argument="--rt_p" type="float" value="1" label="Time window for the peak" | 203 <param argument="--rt_p" type="float" value="1" label="Time window for the peak" |
203 help="Specify the time windows for the peak in minutes." /> | 204 help="Specify the time windows for the peak in minutes." /> |
204 <param argument="--rt_p_match" type="float" value="1.5" label="Time window for the matched peak" | |
205 help="Specify the time windows for the matched peak in minutes." /> | |
206 <param argument="--peptide_summary" type="boolean" value="true" label="Output the peptide summary?"/> | 205 <param argument="--peptide_summary" type="boolean" value="true" label="Output the peptide summary?"/> |
207 </when> | 206 </when> |
208 <when value="mbr"> | 207 <when value="mbr"> |
209 <expand macro="ident_input_macro" allow_multiple="false" input_type="data_collection"/> | 208 <expand macro="ident_input_macro" allow_multiple="false" input_type="data_collection"/> |
210 <param argument="--ext" type="text" value="tab" label="Provide the extension used in the display file name (without the period)"/> | 209 <param argument="--ext" type="text" value="tab" label="Provide the extension used in the display file name (without the period)"/> |
223 <param argument="--peptide_summary" type="boolean" value="true" label="Output the peptide summary?"/> | 222 <param argument="--peptide_summary" type="boolean" value="true" label="Output the peptide summary?"/> |
224 </when> | 223 </when> |
225 </conditional> | 224 </conditional> |
226 </inputs> | 225 </inputs> |
227 <outputs> | 226 <outputs> |
228 <data format="tabular" name="output_table" label="${tool.name} quantification: ${on_string}"> | 227 <data format="tabular" name="output_table" label="${tool.name} on ${on_string}: quantification"> |
229 <filter>task['task_selector']=='moff'</filter> | 228 <filter>task['task_selector']=='moff'</filter> |
230 </data> | 229 </data> |
231 <data format="txt" name="output_logs" label="${tool.name} log: ${on_string}"> | 230 <data format="txt" name="output_logs" label="${tool.name} ${on_string}: log"> |
232 <filter>task['task_selector']=='moff'</filter> | 231 <filter>task['task_selector']=='moff'</filter> |
233 </data> | 232 </data> |
234 <collection name="ident_output" type="list" label="${tool.name} quantification: ${on_string}"> | 233 <collection name="ident_output" type="list" label="${tool.name} on ${on_string}: quantification"> |
235 <filter>task['task_selector']=='all' or task['task_selector']=='mbr'</filter> | 234 <filter>task['task_selector']=='all'</filter> |
236 <!--discover datasets method --> | |
237 <discover_datasets pattern="(?P<designation>.*)\.txt" directory="out" format="tabular"/> | 235 <discover_datasets pattern="(?P<designation>.*)\.txt" directory="out" format="tabular"/> |
238 </collection> | 236 </collection> |
239 <collection name="log_output" type="list" label="${tool.name} logs: ${on_string}"> | 237 <collection name="ident_output_mbr" type="list" label="${tool.name} on ${on_string}: matched"> |
238 <filter>task['task_selector']=='mbr'</filter> | |
239 <discover_datasets pattern="(?P<designation>.*)\.txt" directory="out" format="tabular"/> | |
240 </collection> | |
241 <collection name="log_output" type="list" label="${tool.name} on ${on_string}: logs"> | |
240 <filter>task['task_selector']=='all' or task['task_selector']=='mbr'</filter> | 242 <filter>task['task_selector']=='all' or task['task_selector']=='mbr'</filter> |
241 <discover_datasets pattern="(?P<designation>.*)\.log" directory="out" format="txt"/> | 243 <discover_datasets pattern="(?P<designation>.*)\.log" directory="out" format="txt"/> |
242 </collection> | 244 </collection> |
243 <data format="tabular" name="output_peptide_summary" label="${tool.name} peptide summary: ${on_string}"> | 245 <data format="tabular" name="output_peptide_summary" label="${tool.name} on ${on_string}: peptide summary"> |
244 <filter>task['peptide_summary']</filter> | 246 <filter>task['peptide_summary'] and (task['task_selector']=='all' or task['task_selector']=='moff')</filter> |
245 </data> | 247 </data> |
246 </outputs> | 248 </outputs> |
247 <tests> | 249 <tests> |
248 <!-- test moff_all --> | 250 <!-- test moff_all --> |
249 <test> | 251 <test> |
250 <param name="task_selector" value="all"/> | 252 <param name="task|task_selector" value="all"/> |
251 <param name="ident_input|input_type_selector" value="ps"/> | 253 <param name="ident_input|input_type_selector" value="ps"/> |
252 <param name="ident_input_file"> | 254 <param name="ident_input_file"> |
253 <collection type="list"> | 255 <collection type="list"> |
254 <element name="mbr_test1" value="input/mbr_test1.tabular"/> | 256 <element name="mbr_test1" value="input/mbr_test1.tabular"/> |
255 <element name="mbr_test2" value="input/mbr_test2.tabular"/> | 257 <element name="mbr_test2" value="input/mbr_test2.tabular"/> |
294 </element> | 296 </element> |
295 </output_collection> | 297 </output_collection> |
296 </test> | 298 </test> |
297 <!-- test moff alone --> | 299 <!-- test moff alone --> |
298 <test> | 300 <test> |
299 <param name="task_selector" value="moff"/> | 301 <param name="task|task_selector" value="moff"/> |
300 <param name="ident_input|input_type_selector" value="ps"/> | 302 <param name="ident_input|input_type_selector" value="ps"/> |
301 <param name="ident_input_file" value="input/test.tabular" ftype="tabular"/> | 303 <param name="ident_input_file" value="input/test.tabular" ftype="tabular"/> |
302 <param name="msms_input|input_type_selector" value="mzml"/> | 304 <param name="msms_input|input_type_selector" value="mzml"/> |
303 <param name="inputraw" value="input/test.mzml" ftype="mzml"/> | 305 <param name="inputraw" value="input/test.mzml" ftype="mzml"/> |
304 <param name="peptide_summary" value="true"/> | 306 <param name="peptide_summary" value="true"/> |
309 </assert_contents> | 311 </assert_contents> |
310 </output> | 312 </output> |
311 </test> | 313 </test> |
312 <!-- test the generic input --> | 314 <!-- test the generic input --> |
313 <test> | 315 <test> |
314 <param name="task_selector" value="moff"/> | 316 <param name="task|task_selector" value="moff"/> |
315 <param name="ident_input|input_type_selector" value="generic"/> | 317 <param name="ident_input|input_type_selector" value="generic"/> |
316 <param name="ident_input_file" value="input/test.tabular" ftype="tabular"/> | 318 <param name="ident_input_file" value="input/test.tabular" ftype="tabular"/> |
317 <param name="remove_header" value="true"/> | 319 <param name="remove_header" value="true"/> |
318 <param name="msms_input|input_type_selector" value="mzml"/> | 320 <param name="msms_input|input_type_selector" value="mzml"/> |
319 <param name="inputraw" value="input/test.mzml" ftype="mzml"/> | 321 <param name="inputraw" value="input/test.mzml" ftype="mzml"/> |
330 <assert_contents> | 332 <assert_contents> |
331 <has_line line="peptide at line 294 --> MZ: 677.3300 RT: 60.6078"/> | 333 <has_line line="peptide at line 294 --> MZ: 677.3300 RT: 60.6078"/> |
332 </assert_contents> | 334 </assert_contents> |
333 </output> | 335 </output> |
334 </test> | 336 </test> |
337 <test> | |
338 <param name="task|task_selector" value="all"/> | |
339 <param name="ident_input|input_type_selector" value="generic"/> | |
340 <param name="ident_input_file"> | |
341 <collection type="list"> | |
342 <element name="mbr_test1" value="input/mbr_test1.tabular"/> | |
343 <element name="mbr_test2" value="input/mbr_test2.tabular"/> | |
344 </collection> | |
345 </param> | |
346 <param name="remove_header" value="true"/> | |
347 <param name="peptide" value="3"/> | |
348 <param name="prot" value="2"/> | |
349 <param name="mod_peptide" value="7"/> | |
350 <param name="rt" value="13"/> | |
351 <param name="mz" value="14"/> | |
352 <param name="mass" value="17"/> | |
353 <param name="charge" value="15"/> | |
354 <param name="msms_input|input_type_selector" value="mzml"/> | |
355 <param name="inputraw"> | |
356 <collection type="list"> | |
357 <element name="mbr_test1" value="input/mbr_test1.mzml"/> | |
358 <element name="mbr_test2" value="input/mbr_test2.mzml"/> | |
359 </collection> | |
360 </param> | |
361 <param name="peptide_summary" value="true"/> | |
362 <output name="output_peptide_summary" ftype="tabular"> | |
363 <assert_contents> | |
364 <has_text text="sumIntensity_mbr_test1"/> | |
365 <has_text text="sumIntensity_mbr_test2"/> | |
366 </assert_contents> | |
367 </output> | |
368 <output_collection name="ident_output" type="list"> | |
369 <element name="mbr_test1_match_moff_result"> | |
370 <assert_contents> | |
371 <has_text text="NH2-QVEEAVQSDDK-COOH"/> | |
372 </assert_contents> | |
373 </element> | |
374 <element name="mbr_test2_match_moff_result"> | |
375 <assert_contents> | |
376 <has_text text="NH2-RDVGINNTVK-COOH"/> | |
377 </assert_contents> | |
378 </element> | |
379 </output_collection> | |
380 <output_collection name="log_output" type="list"> | |
381 <element name="mbr_test1_match__moff"> | |
382 <assert_contents> | |
383 <has_line line="peptide at line 200 --> MZ: 783.4200 RT: 134.6997 matched (yes=1/no=0): 0"/> | |
384 </assert_contents> | |
385 </element> | |
386 <element name="mbr_test2_match__moff"> | |
387 <assert_contents> | |
388 <has_line line="peptide at line 132 --> MZ: 767.8700 RT: 98.1975 matched (yes=1/no=0): 0"/> | |
389 </assert_contents> | |
390 </element> | |
391 </output_collection> | |
392 </test> | |
335 <!-- test mbr --> | 393 <!-- test mbr --> |
336 <test> | 394 <test> |
337 <param name="task_selector" value="mbr"/> | 395 <param name="task|task_selector" value="mbr"/> |
338 <param name="ident_input|input_type_selector" value="ps"/> | 396 <param name="ident_input|input_type_selector" value="ps"/> |
339 <param name="ident_input_file"> | 397 <param name="ident_input_file"> |
340 <collection type="list"> | 398 <collection type="list"> |
341 <element name="mbr_test1" value="input/mbr_test1.tabular"/> | 399 <element name="mbr_test1" value="input/mbr_test1.tabular"/> |
342 <element name="mbr_test2" value="input/mbr_test2.tabular"/> | 400 <element name="mbr_test2" value="input/mbr_test2.tabular"/> |
343 </collection> | 401 </collection> |
344 </param> | 402 </param> |
345 <param name="ext" value="tabular"/> | 403 <param name="ext" value="tabular"/> |
346 <output_collection name="ident_output" type="list" count="2"> | 404 <output_collection name="ident_output_mbr" type="list" count="2"> |
347 <element name="mbr_test1_match"> | 405 <element name="mbr_test1_match"> |
348 <assert_contents> | 406 <assert_contents> |
349 <has_text text="NH2-QVEEAVQSDDK-COOH"/> | 407 <has_text text="NH2-QVEEAVQSDDK-COOH"/> |
350 </assert_contents> | 408 </assert_contents> |
351 </element> | 409 </element> |
376 3. All (match between runs followed by apex intensity): this is used for more than one pair of identification and spectrum files. | 434 3. All (match between runs followed by apex intensity): this is used for more than one pair of identification and spectrum files. |
377 | 435 |
378 If both match between runs and apex intensity are desired, it is best to run them both at once (i.e., run the 'All' module). | 436 If both match between runs and apex intensity are desired, it is best to run them both at once (i.e., run the 'All' module). |
379 The MBR module is mainly useful for observing the intermediate steps of the algorithm - its outputs are not able to be used as inputs in moFF or in other tools. | 437 The MBR module is mainly useful for observing the intermediate steps of the algorithm - its outputs are not able to be used as inputs in moFF or in other tools. |
380 | 438 |
439 If quantification of multiple files without MBR is desired, the apex intensity module may be run with multiple files or a dataset collection in batch mode. | |
440 In either case, moFF must be given the paired files at the same time - thus the best method is to construct a dataset collection in which the raw and identification files are in the same order. | |
441 | |
381 | 442 |
382 *Inputs:* | 443 *Inputs:* |
383 | 444 |
384 - Identification file: this can either be a generic tabular file or the standard PSM report from PeptideShaker. | 445 - Identification file: this can either be a generic tabular file or the standard PSM report from PeptideShaker. |
385 If it is a generic tabular file, please select the columns corresponding to the required information. | 446 If it is a generic tabular file, please select the columns corresponding to the required information. |