comparison msconvert_macros.xml @ 4:158a71ee5733 draft

planemo upload commit b4871f9659a924a68430aed3a93f4f9bad733fd6
author galaxyp
date Wed, 07 Dec 2016 17:43:19 -0500
parents 987d73278bf9
children 637e309295cf
comparison
equal deleted inserted replaced
3:987d73278bf9 4:158a71ee5733
1 <macros> 1 <macros>
2 <xml name="generic_requirements">
3 <requirements>
4 <requirement type="package" version="3.0.9016">proteowizard</requirement>
5 </requirements>
6 </xml>
7 <token name="@VERSION@">3.0</token>
8
2 <xml name="msconvertCommand"> 9 <xml name="msconvertCommand">
3 <command> 10 <command interpreter="python">
4 <![CDATA[ 11 <![CDATA[
5 #import re 12 #import re
6 #set $output_type_str = str($output_type) 13 #set $ext = $input.ext
7 #set $input_name = $input.display_name 14 msconvert_wrapper.py
8 #set $output_name = $input_name.split(".")[0] + "." + $output_type_str 15 #if $ext == 'wiff':
9 ln -s '$input' '${input_name}' && 16 #set basename = 'absciex'
10 17 #if hasattr($input, 'display_name')
11 #if $data_processing.precursor_refinement.use_mzrefinement 18 #set basename = $re.sub('\W','_',$input.display_name)
12 #set $input_ident_name = $data_processing.precursor_refinement.input_ident.display_name 19 #end if
13 ln -s '${data_processing.precursor_refinement.input_ident}' '${input_ident_name}' && 20 --input=${input.extra_files_path}/wiff
21 --input_name='${basename}.wiff
22 --implicit=${input.extra_files_path}/wiff_scan
23 --input=${input.extra_files_path}/wiff_scan
24 --input_name='${basename}.wiff.scan
25 #else
26 --input=${input}
27 #if hasattr($input, 'display_name')
28 --input_name='${input.display_name}'
29 #end if
14 #end if 30 #end if
15 31 --output=${output}
16 mkdir outdir && 32 ## BEGIN_VERSION_DEFAULT
17 msconvert ${input_name} --$output_type_str -o outdir --outfile '$output_name' 33 --fromextension=$ext
34 ## END_VERSION_DEFAULT
35 --toextension=${output_type}
18 36
19 ## DATA PROCESSING FILTERS (NOTE: FOR VENDOR METHOD TO WORK, PEAK PICKING MUST BE THE FIRST FILTER!) 37 ## DATA PROCESSING FILTERS (NOTE: FOR VENDOR METHOD TO WORK, PEAK PICKING MUST BE THE FIRST FILTER!)
20 #if $data_processing.peak_picking.pick_peaks
21 --filter "peakPicking $data_processing.peak_picking.pick_peaks_algorithm msLevel=$data_processing.peak_picking.pick_peaks_ms_levels"
22 #end if
23
24 #if $data_processing.precursor_refinement.use_mzrefinement 38 #if $data_processing.precursor_refinement.use_mzrefinement
39 #set $input_ident_name = $re.sub('\W','_',$data_processing.precursor_refinement.input_ident.display_name)
40 #if $data_processing.precursor_refinement.input_ident.ext == 'mzid':
41 #set $input_ident_name = $re.sub('(?i)([.]?mzid)*$','.mzid',$input_ident_name)
42 #elif $data_processing.precursor_refinement.input_ident.ext == 'pepxml':
43 #set $input_ident_name = $re.sub('(?i)([.]?pep[.]?xml)*$','.pep.xml',$input_ident_name)
44 #end if
45 --ident=$data_processing.precursor_refinement.input_ident
46 --ident_name=$input_ident_name
47 --refinement=$output_refinement
25 --filter "mzRefiner $input_ident_name 48 --filter "mzRefiner $input_ident_name
26 msLevels=$data_processing.precursor_refinement.precursor_refinement_ms_levels 49 msLevels=$data_processing.precursor_refinement.precursor_refinement_ms_levels
27 thresholdScore=$data_processing.precursor_refinement.thresholdScore 50 thresholdScore=$data_processing.precursor_refinement.thresholdScore
28 thresholdValue=$data_processing.precursor_refinement.thresholdValue 51 thresholdValue=$data_processing.precursor_refinement.thresholdValue
29 thresholdStep=$data_processing.precursor_refinement.thresholdStep 52 thresholdStep=$data_processing.precursor_refinement.thresholdStep
30 maxSteps=$data_processing.precursor_refinement.thresholdMaxSteps" 53 maxSteps=$data_processing.precursor_refinement.thresholdMaxSteps"
54 #end if
55
56 #if $data_processing.peak_picking.pick_peaks
57 --filter "peakPicking $data_processing.peak_picking.pick_peaks_algorithm msLevel=$data_processing.peak_picking.pick_peaks_ms_levels"
31 #end if 58 #end if
32 59
33 #if str($data_processing.charge_state_calculation.charge_state_calculation_method) == "predictor" 60 #if str($data_processing.charge_state_calculation.charge_state_calculation_method) == "predictor"
34 --filter "chargeStatePredictor 61 --filter "chargeStatePredictor
35 overrideExistingCharge=$data_processing.charge_state_calculation.predictor_overrideExistingCharge 62 overrideExistingCharge=$data_processing.charge_state_calculation.predictor_overrideExistingCharge
109 #if str($filtering.analyzer) != "false" 136 #if str($filtering.analyzer) != "false"
110 --filter "analyzer $filtering.analyzer" 137 --filter "analyzer $filtering.analyzer"
111 #end if 138 #end if
112 139
113 ## OUTPUT ENCODING 140 ## OUTPUT ENCODING
141 --
114 #set $mz_encoding = str($settings.mz_encoding) 142 #set $mz_encoding = str($settings.mz_encoding)
115 #set $intensity_encoding = str($settings.intensity_encoding) 143 #set $intensity_encoding = str($settings.intensity_encoding)
116 #if $mz_encoding == $intensity_encoding 144 #if $mz_encoding == $intensity_encoding
117 #if $mz_encoding == "64" 145 #if $mz_encoding == "64"
118 --64 146 --64
141 169
142 #if $settings.gzip_compression 170 #if $settings.gzip_compression
143 --gzip 171 --gzip
144 #end if 172 #end if
145 173
146 &&
147
148 #if $data_processing.precursor_refinement.use_mzrefinement
149 mv '${input.name.rsplit('.',1)[0]}.mzRefinement.tsv' output.refinement &&
150 #end if
151
152 mv 'outdir/$output_name' output &&
153 rmdir outdir
154 ]]> 174 ]]>
155 </command> 175 </command>
156 </xml> 176 </xml>
157 177
158 <xml name="msconvertInputParameters"> 178 <xml name="msconvertInputParameters">
181 <option value="cwt">CantWaiT - continuous wavelet transform</option> 201 <option value="cwt">CantWaiT - continuous wavelet transform</option>
182 </param> 202 </param>
183 </when> 203 </when>
184 </conditional> 204 </conditional>
185 205
186 <conditional name="precursor_refinement" title="MZRefinery Precursor Refinement" expanded="true"> 206 <conditional name="precursor_refinement">
187 <param type="boolean" name="use_mzrefinement" label="Apply m/z refinement with identification data?" truevalue="true" falsevalue="false" checked="False" /> 207 <param type="boolean" name="use_mzrefinement" label="Apply m/z refinement with identification data?" truevalue="true" falsevalue="false" checked="False" />
188 <when value="false"></when> 208 <when value="false"></when>
189 <when value="true"> 209 <when value="true">
190 <param name="input_ident" type="data" format="pepxml,mzid" label="MZRefinery - Input identification data" /> 210 <param name="input_ident" type="data" format="pepxml,mzid" label="MZRefinery - Input identification data" />
191 <param name="thresholdScore" type="text" value="mvh" label="MZRefinery - Threshold Score Name" help="E.g. 'mvh' for MyriMatch, 'xcorr' for Sequest, 'specevalue' for MS-GF+" /> 211 <param name="thresholdScore" type="text" value="mvh" label="MZRefinery - Threshold Score Name" help="E.g. 'mvh' for MyriMatch, 'xcorr' for Sequest, 'specevalue' for MS-GF+" />
300 <option value="false" selected="true">no</option> 320 <option value="false" selected="true">no</option>
301 <option value="ETD">ETD</option> 321 <option value="ETD">ETD</option>
302 <option value="CID">CID</option> 322 <option value="CID">CID</option>
303 <option value="SA">SA</option> 323 <option value="SA">SA</option>
304 <option value="HCD">HCD</option> 324 <option value="HCD">HCD</option>
305 <option>BIRD</option> 325 <option value="BIRD">BIRD</option>
306 <option>ECD</option> 326 <option value="ECD">ECD</option>
307 <option>IRMPD</option> 327 <option value="IRMPD">IRMPD</option>
308 <option>PD</option> 328 <option value="PD">PD</option>
309 <option>PSD</option> 329 <option value="PSD">PSD</option>
310 <option>PQD</option> 330 <option value="PQD">PQD</option>
311 <option>SID</option> 331 <option value="SID">SID</option>
312 <option>SORI</option> 332 <option value="SORI">SORI</option>
313 </param> 333 </param>
314 334
315 <repeat name="indices" title="Filter Scan Indices"> 335 <repeat name="indices" title="Filter Scan Indices">
316 <param name="from" type="integer" label="Filter Scan Index From" value="0" optional="false" /> 336 <param name="from" type="integer" label="Filter Scan Index From" value="0" optional="false" />
317 <param name="to" type="integer" label="Filter Scan Index To" value="0" optional="true" /> 337 <param name="to" type="integer" label="Filter Scan Index To" value="0" optional="true" />
372 </section> 392 </section>
373 </xml> 393 </xml>
374 394
375 <xml name="msconvertOutput"> 395 <xml name="msconvertOutput">
376 <outputs> 396 <outputs>
377 <data format="mzml" name="output" from_work_dir="output" label="${input.name.rsplit('.',1)[0]}.${output_type}" > 397 <data format="mzml" name="output" label="${input.name.rsplit('.',1)[0]}.${output_type}" >
378 <change_format> 398 <change_format>
379 <when input="output_type" value="mz5" format="mz5" /> 399 <when input="output_type" value="mz5" format="mz5" />
380 <when input="output_type" value="mzXML" format="mzxml" /> 400 <when input="output_type" value="mzXML" format="mzxml" />
381 <when input="output_type" value="ms2" format="ms2" /> 401 <when input="output_type" value="ms2" format="ms2" />
382 <when input="output_type" value="mgf" format="mgf" /> 402 <when input="output_type" value="mgf" format="mgf" />
383 </change_format> 403 </change_format>
384 </data> 404 </data>
385 <data format="csv" name="output.refinement" from_work_dir="output.refinement" label="${input.name.rsplit('.',1)[0]}.mzRefinement.tsv"> 405 <data format="csv" name="output_refinement" label="${input.name.rsplit('.',1)[0]}.mzRefinement.tsv">
386 <filter>data_processing['precursor_refinement']['use_mzrefinement'] == True</filter> 406 <filter>data_processing['precursor_refinement']['use_mzrefinement'] == True</filter>
387 </data> 407 </data>
388 </outputs> 408 </outputs>
389 </xml> 409 </xml>
410
411
412 <xml name="msconvert_tests">
413 <test>
414 <param name="input" value="small.mzML" />
415 <param name="output_type" value="mzML" />
416 <param name="pick_peaks" value="true" />
417 <param name="pick_peaks_algorithm" value="cwt" />
418 <param name="pick_peaks_ms_levels" value="1-" />
419 <output name="output" file="small-peakpicking-cwt-allMS.mzML" />
420 </test>
421
422 <!-- this data file only has profile MS1, so the result is the same -->
423 <test>
424 <param name="input" value="small.mzML" />
425 <param name="output_type" value="mzML" />
426 <param name="pick_peaks" value="true" />
427 <param name="pick_peaks_algorithm" value="cwt" />
428 <param name="pick_peaks_ms_levels" value="1" />
429 <output name="output" file="small-peakpicking-cwt-allMS.mzML" />
430 </test>
431 <test>
432 <param name="input" value="small-peakpicking-cwt-allMS.mzML" />
433 <param name="output_type" value="mz5" />
434 <param name="mz_encoding" value="64" />
435 <param name="intensity_encoding" value="64" />
436 <output name="output" file="small-zlib-64.mz5" compare="sim_size" delta="100" />
437 </test>
438 <test>
439 <param name="input" value="small-peakpicking-cwt-allMS.mzML" />
440 <param name="output_type" value="mzXML" />
441 <param name="mz_encoding" value="32" />
442 <param name="intensity_encoding" value="32" />
443 <output name="output" file="small-zlib-32.mzXML" />
444 </test>
445 <!-- TODO: how to test gzipped output?
446 <test>
447 <param name="input" value="small-peakpicking-cwt-allMS.mzML" />
448 <param name="output_type" value="mzXML" />
449 <param name="mz_encoding" value="32" />
450 <param name="intensity_encoding" value="32" />
451 <param name="binary_compression" value="false" />
452 <param name="gzip_compression" value="true" />
453 <output name="output" file="small-off-32.mzXML.gz" compare="sim_size" delta="100" />
454 </test>
455 <test>
456 <param name="input" value="small-peakpicking-cwt-allMS.mzML" />
457 <param name="output_type" value="mzML" />
458 <param name="mz_encoding" value="32" />
459 <param name="intensity_encoding" value="32" />
460 <param name="binary_compression" value="false" />
461 <param name="gzip_compression" value="true" />
462 <output name="output" file="small-off-32.mzML.gz" compare="sim_size" delta="100" />
463 </test>-->
464
465 <test>
466 <param name="input" value="small-peakpicking-cwt-allMS.mzML" />
467 <param name="output_type" value="mzML" />
468 <param name="binary_compression" value="numpressLinearPic" />
469 <output name="output" file="small-numpressLP.mzML" />
470 </test>
471
472 <test>
473 <param name="input" value="small-peakpicking-cwt-allMS.mzML" />
474 <param name="output_type" value="mzML" />
475 <param name="binary_compression" value="numpressLinearSlof" />
476 <output name="output" file="small-numpressLS.mzML" />
477 </test>
478
479 <test>
480 <param name="input" value="small-peakpicking-cwt-allMS.mzML" />
481 <param name="output_type" value="mzML" />
482 <param name="binary_compression" value="numpressLinear" />
483 <output name="output" file="small-numpressL.mzML" />
484 </test>
485
486 <test>
487 <param name="input" value="small-peakpicking-cwt-allMS.mzML" />
488 <param name="output_type" value="mzML" />
489 <param name="binary_compression" value="numpressPic" />
490 <output name="output" file="small-numpressP.mzML" />
491 </test>
492
493 <test>
494 <param name="input" value="small-peakpicking-cwt-allMS.mzML" />
495 <param name="output_type" value="mzML" />
496 <param name="binary_compression" value="numpressSlof" />
497 <output name="output" file="small-numpressS.mzML" />
498 </test>
499
500 <test>
501 <param name="input" value="Rpal_01.mz5" />
502 <param name="output_type" value="mzML" />
503 <param name="binary_compression" value="numpressLinearPic" />
504 <param name="use_mzrefinement" value="true" />
505 <param name="input_ident" value="Rpal_01.pepXML.gz" />
506 <param name="thresholdScore" value="mvh" />
507 <param name="thresholdValue" value="40-" />
508 <output name="output" file="Rpal_01-mzRefinement.mzML" compare="sim_size" delta="0" />
509 <output name="output.refinement" file="Rpal_01.pepXML.mzRefinement.tsv" />
510 </test>
511
512 <test>
513 <param name="input" value="small-peakpicking-cwt-allMS.mzML" />
514 <param name="output_type" value="mzML" />
515 <param name="binary_compression" value="numpressLinearPic" />
516 <param name="charge_state_calculation_method" value="predictor" />
517 <param name="predictor_overrideExistingCharge" value="true" />
518 <param name="minMultipleCharge" value="2" />
519 <param name="maxMultipleCharge" value="5" />
520 <param name="singleChargeFractionTIC" value="0.95" />
521 <param name="maxKnownCharge" value="8" />
522 <output name="output" file="small-chargeStatePredictor.mzML" />
523 </test>
524 <test>
525 <param name="input" value="small-peakpicking-cwt-allMS.mzML" />
526 <param name="output_type" value="mzML" />
527 <param name="binary_compression" value="numpressLinearPic" />
528 <param name="charge_state_calculation_method" value="turbocharger" />
529 <param name="minCharge" value="1" />
530 <param name="maxCharge" value="5" />
531 <param name="precursorsBefore" value="1" />
532 <param name="precursorsAfter" value="1" />
533 <param name="halfIsoWidth" value="1.5" />
534 <param name="defaultMinCharge" value="1" />
535 <param name="defaultMaxCharge" value="5" />
536 <output name="output" file="small-turbocharger.mzML" />
537 </test>
538 <test>
539 <param name="input" value="D100930_yeast_SCX10S_rak_ft8E_pc_01.mz5" />
540 <param name="output_type" value="mzML" />
541 <param name="do_etd_filtering" value="true" />
542 <param name="remove_precursor" value="true" />
543 <param name="remove_charge_reduced" value="true" />
544 <param name="remove_neutral_loss" value="false" />
545 <param name="blanket_removal" value="false" />
546 <param name="matching_tolerance" value="50" />
547 <param name="matching_tolerance_units" value="ppm" />
548 <param name="binary_compression" value="numpressLinearPic" />
549 <output name="output" file="D100930_yeast_SCX10S_rak_ft8E_pc_01-etdfilter.mzML" />
550 </test>
551 <test>
552 <param name="input" value="small-peakpicking-cwt-allMS.mzML" />
553 <param name="output_type" value="mzML" />
554 <param name="thresholds_0|threshold_type" value="count" />
555 <param name="thresholds_0|value" value="100" />
556 <param name="thresholds_0|orientation" value="most-intense" />
557 <param name="thresholds_1|threshold_type" value="absolute" />
558 <param name="thresholds_1|value" value="1" />
559 <param name="thresholds_1|orientation" value="most-intense" />
560 <param name="binary_compression" value="numpressLinearPic" />
561 <output name="output" file="small-threshold.mzML" />
562 </test>
563 <test>
564 <param name="input" value="small-peakpicking-cwt-allMS.mzML" />
565 <param name="output_type" value="mzML" />
566 <param name="do_mzwindow_filter" value="true" />
567 <param name="mz_window_from" value="420" />
568 <param name="mz_window_to" value="840" />
569 <param name="binary_compression" value="numpressLinearPic" />
570 <output name="output" file="small-mzWindow.mzML" />
571 </test>
572 <test>
573 <param name="input" value="small-peakpicking-cwt-allMS.mzML" />
574 <param name="output_type" value="mzML" />
575 <param name="denoise" value="true" />
576 <param name="num_peaks" value="10" />
577 <param name="window_width" value="40" />
578 <param name="relax" value="false" />
579 <param name="binary_compression" value="numpressLinearPic" />
580 <output name="output" file="small-denoise.mzML" />
581 </test>
582 <test>
583 <param name="input" value="small-peakpicking-cwt-allMS.mzML" />
584 <param name="output_type" value="mzML" />
585 <param name="ms2deisotope" value="true" />
586 <param name="binary_compression" value="numpressLinearPic" />
587 <output name="output" file="small-deisotope.mzML" />
588 </test>
589 <test>
590 <param name="input" value="small-peakpicking-cwt-allMS.mzML" />
591 <param name="output_type" value="mzML" />
592 <param name="activation" value="CID" />
593 <param name="binary_compression" value="numpressLinearPic" />
594 <output name="output" file="small-activation.mzML" />
595 </test>
596 <test>
597 <param name="input" value="small-peakpicking-cwt-allMS.mzML" />
598 <param name="output_type" value="mzML" />
599 <param name="indices_0|from" value="2" />
600 <param name="indices_0|to" value="4" />
601 <param name="indices_1|from" value="10" />
602 <param name="indices_1|to" value="10" />
603 <param name="indices_2|from" value="13" />
604 <param name="indices_2|to" value="15" />
605 <param name="binary_compression" value="numpressLinearPic" />
606 <output name="output" file="small-index-filter.mzML" />
607 </test>
608 <test>
609 <param name="input" value="small-peakpicking-cwt-allMS.mzML" />
610 <param name="output_type" value="mzML" />
611 <param name="strip_it" value="true" />
612 <param name="binary_compression" value="numpressLinearPic" />
613 <output name="output" file="small-strip-it.mzML" />
614 </test>
615 <test>
616 <param name="input" value="small-peakpicking-cwt-allMS.mzML" />
617 <param name="output_type" value="mzML" />
618 <param name="do_ms_level_filter" value="true" />
619 <param name="ms_level_from" value="2" />
620 <param name="ms_level_to" value="2" />
621 <param name="binary_compression" value="numpressLinearPic" />
622 <output name="output" file="small-ms-level-filter.mzML" />
623 </test>
624 <test>
625 <param name="input" value="small-peakpicking-cwt-allMS.mzML" />
626 <param name="output_type" value="mzML" />
627 <param name="polarity" value="positive" />
628 <param name="binary_compression" value="numpressLinearPic" />
629 <output name="output" file="small-polarity-filter.mzML" />
630 </test>
631 <test>
632 <param name="input" value="small-peakpicking-cwt-allMS.mzML" />
633 <param name="output_type" value="mzML" />
634 <param name="analyzer" value="IT" />
635 <param name="binary_compression" value="numpressLinearPic" />
636 <output name="output" file="small-analyzer-filter.mzML" />
637 </test>
638 <test>
639 <param name="input" value="small-peakpicking-cwt-allMS.mzML" />
640 <param name="output_type" value="mzML" />
641 <param name="scan_numbers_0|from" value="3" />
642 <param name="scan_numbers_0|to" value="5" />
643 <param name="scan_numbers_1|from" value="11" />
644 <param name="scan_numbers_1|to" value="11" />
645 <param name="scan_numbers_2|from" value="14" />
646 <param name="scan_numbers_2|to" value="16" />
647 <param name="binary_compression" value="numpressLinearPic" />
648 <output name="output" file="small-index-filter.mzML" /> <!-- the scan numbers here produce the same output as the index test above -->
649 </test>
650 <!--<test>
651 <param name="input" value="small.mzML" />
652 <param name="output_type" value="mzML" />
653 <param name="binary_compression" value="numpressLinearPic" />
654 <output name="output" file="small-deisotope-poisson.mzML" />
655 </test>-->
656 </xml>
657 <xml name="msconvert_help">
658 **What it does**
659
660 Allows interconversion within various mass spectrometry peak list formats. Additional options such as filtering and/or precursor recalculation are available.
661
662 You can view the original documentation here_.
663
664 .. _here: http://proteowizard.sourceforge.net/tools/msconvert.html
665 </xml>
666
667 <xml name="citations">
668 <citations>
669 <citation type="doi">10.1093/bioinformatics/btn323</citation>
670 <citation type="bibtex">@misc{toolsGalaxyP, author = {Chilton, J, Chambers MC, et al.}, title = {Galaxy Proteomics Tools}, publisher = {GitHub}, journal = {GitHub repository},
671 year = {2015}, url = {https://github.com/galaxyproteomics/tools-galaxyp}}</citation> <!-- TODO: fix substitution of commit ", commit = {$sha1$}" -->
672 </citations>
673 </xml>
674
390 </macros> 675 </macros>