comparison msconvert_macros.xml @ 5:637e309295cf draft

planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/msconvert commit d70aeb6f0e03a354fb8732f04dce8453b03477ea
author galaxyp
date Mon, 12 Dec 2016 17:07:11 -0500
parents 158a71ee5733
children 6b6bba73eadb
comparison
equal deleted inserted replaced
4:158a71ee5733 5:637e309295cf
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
9 <xml name="msconvertCommand"> 2 <xml name="msconvertCommand">
10 <command interpreter="python"> 3 <command>
11 <![CDATA[ 4 <![CDATA[
12 #import re 5 #set $output_type_str = str($output_type)
13 #set $ext = $input.ext 6 #set $input_name = $input.display_name
14 msconvert_wrapper.py 7 #set $output_name = $input_name.split(".")[0] + "." + $output_type_str
15 #if $ext == 'wiff': 8 ln -s '$input' '${input_name}' &&
16 #set basename = 'absciex' 9
17 #if hasattr($input, 'display_name') 10 #if $data_processing.precursor_refinement.use_mzrefinement
18 #set basename = $re.sub('\W','_',$input.display_name) 11 #set $input_ident_name = $data_processing.precursor_refinement.input_ident.display_name
19 #end if 12 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
30 #end if 13 #end if
31 --output=${output} 14
32 ## BEGIN_VERSION_DEFAULT 15 mkdir outdir &&
33 --fromextension=$ext 16 msconvert ${input_name} --$output_type_str -o outdir --outfile '$output_name'
34 ## END_VERSION_DEFAULT
35 --toextension=${output_type}
36 17
37 ## DATA PROCESSING FILTERS (NOTE: FOR VENDOR METHOD TO WORK, PEAK PICKING MUST BE THE FIRST FILTER!) 18 ## DATA PROCESSING FILTERS (NOTE: FOR VENDOR METHOD TO WORK, PEAK PICKING MUST BE THE FIRST FILTER!)
19 #if $data_processing.peak_picking.pick_peaks
20 --filter "peakPicking $data_processing.peak_picking.pick_peaks_algorithm msLevel=$data_processing.peak_picking.pick_peaks_ms_levels"
21 #end if
22
38 #if $data_processing.precursor_refinement.use_mzrefinement 23 #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
48 --filter "mzRefiner $input_ident_name 24 --filter "mzRefiner $input_ident_name
49 msLevels=$data_processing.precursor_refinement.precursor_refinement_ms_levels 25 msLevels=$data_processing.precursor_refinement.precursor_refinement_ms_levels
50 thresholdScore=$data_processing.precursor_refinement.thresholdScore 26 thresholdScore=$data_processing.precursor_refinement.thresholdScore
51 thresholdValue=$data_processing.precursor_refinement.thresholdValue 27 thresholdValue=$data_processing.precursor_refinement.thresholdValue
52 thresholdStep=$data_processing.precursor_refinement.thresholdStep 28 thresholdStep=$data_processing.precursor_refinement.thresholdStep
53 maxSteps=$data_processing.precursor_refinement.thresholdMaxSteps" 29 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"
58 #end if 30 #end if
59 31
60 #if str($data_processing.charge_state_calculation.charge_state_calculation_method) == "predictor" 32 #if str($data_processing.charge_state_calculation.charge_state_calculation_method) == "predictor"
61 --filter "chargeStatePredictor 33 --filter "chargeStatePredictor
62 overrideExistingCharge=$data_processing.charge_state_calculation.predictor_overrideExistingCharge 34 overrideExistingCharge=$data_processing.charge_state_calculation.predictor_overrideExistingCharge
136 #if str($filtering.analyzer) != "false" 108 #if str($filtering.analyzer) != "false"
137 --filter "analyzer $filtering.analyzer" 109 --filter "analyzer $filtering.analyzer"
138 #end if 110 #end if
139 111
140 ## OUTPUT ENCODING 112 ## OUTPUT ENCODING
141 --
142 #set $mz_encoding = str($settings.mz_encoding) 113 #set $mz_encoding = str($settings.mz_encoding)
143 #set $intensity_encoding = str($settings.intensity_encoding) 114 #set $intensity_encoding = str($settings.intensity_encoding)
144 #if $mz_encoding == $intensity_encoding 115 #if $mz_encoding == $intensity_encoding
145 #if $mz_encoding == "64" 116 #if $mz_encoding == "64"
146 --64 117 --64
169 140
170 #if $settings.gzip_compression 141 #if $settings.gzip_compression
171 --gzip 142 --gzip
172 #end if 143 #end if
173 144
145 &&
146
147 #if $data_processing.precursor_refinement.use_mzrefinement
148 mv '${input.name.rsplit('.',1)[0]}.mzRefinement.tsv' output.refinement &&
149 #end if
150
151 mv 'outdir/$output_name' output &&
152 rmdir outdir
174 ]]> 153 ]]>
175 </command> 154 </command>
176 </xml> 155 </xml>
177 156
178 <xml name="msconvertInputParameters"> 157 <xml name="msconvertInputParameters">
320 <option value="false" selected="true">no</option> 299 <option value="false" selected="true">no</option>
321 <option value="ETD">ETD</option> 300 <option value="ETD">ETD</option>
322 <option value="CID">CID</option> 301 <option value="CID">CID</option>
323 <option value="SA">SA</option> 302 <option value="SA">SA</option>
324 <option value="HCD">HCD</option> 303 <option value="HCD">HCD</option>
325 <option value="BIRD">BIRD</option> 304 <option>BIRD</option>
326 <option value="ECD">ECD</option> 305 <option>ECD</option>
327 <option value="IRMPD">IRMPD</option> 306 <option>IRMPD</option>
328 <option value="PD">PD</option> 307 <option>PD</option>
329 <option value="PSD">PSD</option> 308 <option>PSD</option>
330 <option value="PQD">PQD</option> 309 <option>PQD</option>
331 <option value="SID">SID</option> 310 <option>SID</option>
332 <option value="SORI">SORI</option> 311 <option>SORI</option>
333 </param> 312 </param>
334 313
335 <repeat name="indices" title="Filter Scan Indices"> 314 <repeat name="indices" title="Filter Scan Indices">
336 <param name="from" type="integer" label="Filter Scan Index From" value="0" optional="false" /> 315 <param name="from" type="integer" label="Filter Scan Index From" value="0" optional="false" />
337 <param name="to" type="integer" label="Filter Scan Index To" value="0" optional="true" /> 316 <param name="to" type="integer" label="Filter Scan Index To" value="0" optional="true" />
392 </section> 371 </section>
393 </xml> 372 </xml>
394 373
395 <xml name="msconvertOutput"> 374 <xml name="msconvertOutput">
396 <outputs> 375 <outputs>
397 <data format="mzml" name="output" label="${input.name.rsplit('.',1)[0]}.${output_type}" > 376 <data format="mzml" name="output" from_work_dir="output" label="${input.name.rsplit('.',1)[0]}.${output_type}" >
398 <change_format> 377 <change_format>
399 <when input="output_type" value="mz5" format="mz5" /> 378 <when input="output_type" value="mz5" format="mz5" />
400 <when input="output_type" value="mzXML" format="mzxml" /> 379 <when input="output_type" value="mzXML" format="mzxml" />
401 <when input="output_type" value="ms2" format="ms2" /> 380 <when input="output_type" value="ms2" format="ms2" />
402 <when input="output_type" value="mgf" format="mgf" /> 381 <when input="output_type" value="mgf" format="mgf" />
403 </change_format> 382 </change_format>
404 </data> 383 </data>
405 <data format="csv" name="output_refinement" label="${input.name.rsplit('.',1)[0]}.mzRefinement.tsv"> 384 <data format="csv" name="output.refinement" from_work_dir="output.refinement" label="${input.name.rsplit('.',1)[0]}.mzRefinement.tsv">
406 <filter>data_processing['precursor_refinement']['use_mzrefinement'] == True</filter> 385 <filter>data_processing['precursor_refinement']['use_mzrefinement'] == True</filter>
407 </data> 386 </data>
408 </outputs> 387 </outputs>
409 </xml> 388 </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
675 </macros> 389 </macros>