Mercurial > repos > galaxyp > msconvert
comparison msconvert_macros.xml @ 14:3cf310697624 draft
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msconvert commit 79157337a253a1c2fce2ad1739668c66b6c54df1"
author | galaxyp |
---|---|
date | Mon, 16 Nov 2020 17:25:12 +0000 |
parents | 9b61227976d6 |
children | 6153e8ada1ee |
comparison
equal
deleted
inserted
replaced
13:9b61227976d6 | 14:3cf310697624 |
---|---|
1 <macros> | 1 <macros> |
2 <token name="@VERSION@">3.0.19052</token> | 2 <token name="@VERSION@">3.0.19052</token> |
3 <token name="@FULL_VERSION@">@VERSION@-089e81090</token> | 3 <token name="@FULL_VERSION@">@VERSION@-089e81090</token> |
4 | 4 |
5 <xml name="msconvertCommand"> | 5 <xml name="msconvertCommand"> |
6 <command detect_errors="exit_code"> | 6 <command detect_errors="exit_code"> |
7 <![CDATA[ | 7 <![CDATA[ |
8 #import re | 8 #import re |
9 #set $ext = $input.ext | 9 #set $ext = $input.ext |
37 #set input_ident_name = ".".join((os.path.splitext($basename)[0], $data_processing.precursor_refinement.input_ident.ext)) | 37 #set input_ident_name = ".".join((os.path.splitext($basename)[0], $data_processing.precursor_refinement.input_ident.ext)) |
38 #set output_refinement_name = os.path.splitext($basename)[0] + '.mzRefinement.tsv' | 38 #set output_refinement_name = os.path.splitext($basename)[0] + '.mzRefinement.tsv' |
39 ln -s '$data_processing.precursor_refinement.input_ident' '$input_ident_name' && | 39 ln -s '$data_processing.precursor_refinement.input_ident' '$input_ident_name' && |
40 #end if | 40 #end if |
41 | 41 |
42 uid=`id -u` && | 42 |
43 gid=`id -g` && | 43 CAN_SUDO=\$(sudo -n -l 2> /dev/null; echo \$?) && |
44 | 44 if [ "\$CAN_SUDO" -eq "0" ]; then |
45 wine64_anyuser msconvert ${inputmask} | 45 uid=`id -u` && |
46 gid=`id -g` && | |
47 WINE="wine64_anyuser"; | |
48 else | |
49 WINE="wine64" && | |
50 ## create a writable copy of wine prefix (since copying fails for some html | |
51 ## stderr and exit code is swallowed) | |
52 export WINEPREFIX=\$(mktemp -d) && | |
53 (cp -a /wineprefix64/* \$WINEPREFIX 2> /dev/null || true); | |
54 fi | |
55 && | |
56 \$WINE msconvert ${inputmask} | |
57 | |
46 --outdir outputs | 58 --outdir outputs |
47 --${output_type} | 59 --${output_type} |
48 | 60 $general_options.combineIonMobilitySpectra |
49 #if $general_options.combineIonMobilitySpectra: | 61 $general_options.simAsSpectra |
50 --combineIonMobilitySpectra | 62 $general_options.srmAsSpectra |
51 #end if | 63 $general_options.acceptZeroLengthSpectra |
52 | 64 $general_options.ignoreUnknownInstrumentError |
53 #if $general_options.simAsSpectra: | |
54 --simAsSpectra | |
55 #end if | |
56 | |
57 #if $general_options.srmAsSpectra: | |
58 --srmAsSpectra | |
59 #end if | |
60 | |
61 #if $general_options.acceptZeroLengthSpectra: | |
62 --acceptZeroLengthSpectra | |
63 #end if | |
64 | |
65 #if $general_options.ignoreUnknownInstrumentError: | |
66 --ignoreUnknownInstrumentError | |
67 #end if | |
68 | 65 |
69 #if $general_options.scan_summing.do_scan_summing: | 66 #if $general_options.scan_summing.do_scan_summing: |
70 --filter "scanSumming precursorTol=$general_options.scan_summing.precursorTol scanTimeTol=$general_options.scan_summing.scanTimeTol ionMobilityTol=$general_options.scan_summing.ionMobilityTol" | 67 --filter "scanSumming precursorTol=$general_options.scan_summing.precursorTol scanTimeTol=$general_options.scan_summing.scanTimeTol ionMobilityTol=$general_options.scan_summing.ionMobilityTol" |
71 #end if | 68 #end if |
72 | 69 |
179 #end if | 176 #end if |
180 | 177 |
181 #if str($filtering.analyzer) != "false" | 178 #if str($filtering.analyzer) != "false" |
182 --filter "analyzer $filtering.analyzer" | 179 --filter "analyzer $filtering.analyzer" |
183 #end if | 180 #end if |
184 | 181 |
185 ## OUTPUT ENCODING | 182 ## OUTPUT ENCODING |
186 #set $mz_encoding = str($settings.mz_encoding) | 183 #set $mz_encoding = str($settings.mz_encoding) |
187 #set $intensity_encoding = str($settings.intensity_encoding) | 184 #set $intensity_encoding = str($settings.intensity_encoding) |
188 #if $mz_encoding == $intensity_encoding | 185 #if $mz_encoding == $intensity_encoding |
189 #if $mz_encoding == "64" | 186 #if $mz_encoding == "64" |
190 --64 | 187 --64 |
215 --gzip | 212 --gzip |
216 #end if | 213 #end if |
217 | 214 |
218 #if $general_options.multi_run_output.do_multi_run_output == 'false': | 215 #if $general_options.multi_run_output.do_multi_run_output == 'false': |
219 --outfile '${os.path.splitext($basename)[0]}' | 216 --outfile '${os.path.splitext($basename)[0]}' |
220 && sudo mv 'outputs/${os.path.splitext($basename)[0]}.${output_type}' '${output}' && sudo chown \$uid:\$gid '${output}' | 217 && |
218 if [ "\$CAN_SUDO" -eq "0" ]; then | |
219 sudo chown \$uid:\$gid 'outputs/${os.path.splitext($basename)[0]}.${output_type}' && | |
220 sudo mv 'outputs/${os.path.splitext($basename)[0]}.${output_type}' '${output}'; | |
221 else | |
222 mv 'outputs/${os.path.splitext($basename)[0]}.${output_type}' '${output}'; | |
223 fi | |
221 #else | 224 #else |
222 && sudo chown \$uid:\$gid 'outputs' -R | |
223 && ls -la outputs/ | 225 && ls -la outputs/ |
224 #end if | 226 #end if |
225 | 227 |
226 #if $data_processing.precursor_refinement.use_mzrefinement | 228 #if $data_processing.precursor_refinement.use_mzrefinement |
227 && sudo mv '$output_refinement_name' '$output_refinement' && sudo chown \$uid:\$gid '$output_refinement' | 229 && if [ "\$CAN_SUDO" -ne "0" ]; then |
230 mv '$output_refinement_name' '$output_refinement'; | |
231 fi | |
228 #end if | 232 #end if |
229 ]]> | 233 ]]> |
230 </command> | 234 </command> |
231 </xml> | 235 </xml> |
232 | 236 |
241 <option value="mzXML">mzXML</option> | 245 <option value="mzXML">mzXML</option> |
242 <option value="mgf">mgf</option> | 246 <option value="mgf">mgf</option> |
243 <option value="ms2">ms2</option> | 247 <option value="ms2">ms2</option> |
244 </param> | 248 </param> |
245 | 249 |
246 <section name="data_processing" title="Data Processing Filters"> | 250 <section name="data_processing" title="Data Processing Filters"> |
247 <conditional name="peak_picking"> | 251 <conditional name="peak_picking"> |
248 <param type="boolean" name="pick_peaks" label="Apply peak picking?" truevalue="true" falsevalue="false" /> | 252 <param type="boolean" name="pick_peaks" label="Apply peak picking?" truevalue="true" falsevalue="false" /> |
249 <when value="false" /> | 253 <when value="false" /> |
250 <when value="true"> | 254 <when value="true"> |
251 <param name="pick_peaks_ms_levels" type="select" label="Peak Peaking - Apply to MS Levels"> | 255 <param name="pick_peaks_ms_levels" type="select" label="Peak Peaking - Apply to MS Levels"> |
405 | 409 |
406 </section> | 410 </section> |
407 | 411 |
408 | 412 |
409 <section name="filtering" title="Scan Inclusion/Exclusion Filters"> | 413 <section name="filtering" title="Scan Inclusion/Exclusion Filters"> |
410 | 414 |
411 <param name="activation" type="select" label="Filter by Activation"> | 415 <param name="activation" type="select" label="Filter by Activation"> |
412 <option value="false" selected="true">no</option> | 416 <option value="false" selected="true">no</option> |
413 <option value="ETD">ETD</option> | 417 <option value="ETD">ETD</option> |
414 <option value="CID">CID</option> | 418 <option value="CID">CID</option> |
415 <option value="SA">SA</option> | 419 <option value="SA">SA</option> |
460 <option value="TOF">Time of flight</option> | 464 <option value="TOF">Time of flight</option> |
461 </param> | 465 </param> |
462 </section> | 466 </section> |
463 | 467 |
464 <section name="general_options" title="General Options"> | 468 <section name="general_options" title="General Options"> |
465 <param argument="--combineIonMobilitySpectra" type="boolean" label="Combine ion mobility spectra" help="When false, each mobility scan is written as a separate spectrum. When true, each retention time point will have a single merged scan. For Bruker TIMS spectra, the ion mobilities will be preserved in a separate binaryDataArray, and for TIMS PASEF MS2s, each precursor will be merged separately." /> | 469 <param argument="--combineIonMobilitySpectra" type="boolean" truevalue="--combineIonMobilitySpectra" falsevalue="" label="Combine ion mobility spectra" help="When false, each mobility scan is written as a separate spectrum. When true, each retention time point will have a single merged scan. For Bruker TIMS spectra, the ion mobilities will be preserved in a separate binaryDataArray, and for TIMS PASEF MS2s, each precursor will be merged separately." /> |
466 | 470 |
467 <conditional name="scan_summing"> | 471 <conditional name="scan_summing"> |
468 <param name="do_scan_summing" type="boolean" truevalue="true" falsevalue="false" label="Sum adjacent scans" help="Sums MS2 sub-scans whose precursors are similar in the m/z, scan time, and/or ion mobility dimensions. It is useful for some Waters DDA data and Bruker PASEF data, where sub-scans should be summed together to increase the SNR" /> | 472 <param name="do_scan_summing" type="boolean" truevalue="true" falsevalue="false" label="Sum adjacent scans" help="Sums MS2 sub-scans whose precursors are similar in the m/z, scan time, and/or ion mobility dimensions. It is useful for some Waters DDA data and Bruker PASEF data, where sub-scans should be summed together to increase the SNR" /> |
469 <when value="false" /> | 473 <when value="false" /> |
470 <when value="true"> | 474 <when value="true"> |
472 <param name="scanTimeTol" type="float" label="Scan time tolerance" value="10.0" min="0" optional="true" help="Spectra with scan times with a difference less than this tolerance (in seconds) are summed together." /> | 476 <param name="scanTimeTol" type="float" label="Scan time tolerance" value="10.0" min="0" optional="true" help="Spectra with scan times with a difference less than this tolerance (in seconds) are summed together." /> |
473 <param name="ionMobilityTol" type="float" label="Ion mobility tolerance" value="0.01" min="0" optional="true" help="Spectra with ion mobility values with a difference less than this tolerance are summed together. Only relevant for ion mobility spectra." /> | 477 <param name="ionMobilityTol" type="float" label="Ion mobility tolerance" value="0.01" min="0" optional="true" help="Spectra with ion mobility values with a difference less than this tolerance are summed together. Only relevant for ion mobility spectra." /> |
474 </when> | 478 </when> |
475 </conditional> | 479 </conditional> |
476 | 480 |
477 <param argument="--simAsSpectra" type="boolean" label="SIM as Spectra" help="Write selected ion monitoring as spectra, not chromatograms" /> | 481 <param argument="--simAsSpectra" type="boolean" truevalue="--simAsSpectra" falsevalue="" label="SIM as Spectra" help="Write selected ion monitoring as spectra, not chromatograms" /> |
478 <param argument="--srmAsSpectra" type="boolean" label="SRM as Spectra" help="Write selected reaction monitoring as spectra, not chromatograms" /> | 482 <param argument="--srmAsSpectra" type="boolean" truevalue="--srmAsSpectra" falsevalue="" label="SRM as Spectra" help="Write selected reaction monitoring as spectra, not chromatograms" /> |
479 <param argument="--acceptZeroLengthSpectra" type="boolean" label="Accept zero-length spectra" help="Some vendor readers have an efficient way of filtering out empty spectra, but it takes more time to open the file" /> | 483 <param argument="--acceptZeroLengthSpectra" type="boolean" truevalue="--acceptZeroLengthSpectra" falsevalue="" label="Accept zero-length spectra" help="Some vendor readers have an efficient way of filtering out empty spectra, but it takes more time to open the file" /> |
480 <param argument="--ignoreUnknownInstrumentError" type="boolean" label="Ignore unknown instrument error" help="If true, if an instrument cannot be determined from a vendor file, it will not be an error" /> | 484 <param argument="--ignoreUnknownInstrumentError" type="boolean" truevalue="--ignoreUnknownInstrumentError" falsevalue="" label="Ignore unknown instrument error" help="If true, if an instrument cannot be determined from a vendor file, it will not be an error" /> |
481 | 485 |
482 <conditional name="multi_run_output"> | 486 <conditional name="multi_run_output"> |
483 <param name="do_multi_run_output" type="boolean" truevalue="true" falsevalue="false" label="Output multiple runs per file" help="Some input types can store multiple runs (samples) in a single file (e.g. WIFF). Each run must be written to a separate output file, so check this option if you want to output all runs for a file (each file will create a dataset collection)" /> | 487 <param name="do_multi_run_output" type="boolean" truevalue="true" falsevalue="false" label="Output multiple runs per file" help="Some input types can store multiple runs (samples) in a single file (e.g. WIFF). Each run must be written to a separate output file, so check this option if you want to output all runs for a file (each file will create a dataset collection)" /> |
484 <when value="false"> | 488 <when value="false"> |
485 <param argument="--runIndexSet" type="integer" label="Select a single run for multi-run sources" value="0" min="0" help="For multi-run sources (e.g. WIFF), select only the specified run index (first run is index 0)" /> | 489 <param argument="--runIndexSet" type="integer" label="Select a single run for multi-run sources" value="0" min="0" help="For multi-run sources (e.g. WIFF), select only the specified run index (first run is index 0)" /> |
512 <option value="numpressSlof">numpressSlof only</option> | 516 <option value="numpressSlof">numpressSlof only</option> |
513 </param> | 517 </param> |
514 <param type="boolean" name="gzip_compression" label="Compress output file with gzip" truevalue="true" falsevalue="false" /> | 518 <param type="boolean" name="gzip_compression" label="Compress output file with gzip" truevalue="true" falsevalue="false" /> |
515 </section> | 519 </section> |
516 </xml> | 520 </xml> |
517 | 521 |
518 <xml name="msconvertOutput"> | 522 <xml name="msconvertOutput"> |
519 <outputs> | 523 <outputs> |
520 <data format="mzml" name="output" label="${($input.name[:-4] if $input.name.endswith('.tar') else $input.name).rsplit('.',1)[0]}.${output_type}" > | 524 <data format="mzml" name="output" label="${($input.name[:-4] if $input.name.endswith('.tar') else $input.name).rsplit('.',1)[0]}.${output_type}" > |
521 <filter>general_options['multi_run_output']['do_multi_run_output'] == False</filter> | 525 <filter>general_options['multi_run_output']['do_multi_run_output'] == False</filter> |
522 <change_format> | 526 <change_format> |
644 <param name="license_agreement" value="true" /> | 648 <param name="license_agreement" value="true" /> |
645 <param name="output_type" value="mzML" /> | 649 <param name="output_type" value="mzML" /> |
646 <param name="pick_peaks" value="true" /> | 650 <param name="pick_peaks" value="true" /> |
647 <param name="pick_peaks_algorithm" value="cwt" /> | 651 <param name="pick_peaks_algorithm" value="cwt" /> |
648 <param name="pick_peaks_ms_levels" value="1" /> | 652 <param name="pick_peaks_ms_levels" value="1" /> |
649 <output name="output" file="small-peakpicking-cwt-allMS.mzML" lines_diff="8" /> | 653 <output name="output" file="small-peakpicking-cwt-allMS.mzML" lines_diff="8" /> |
650 </test> | 654 </test> |
651 <test> | 655 <test> |
652 <param name="input" value="small-peakpicking-cwt-allMS.mzML" /> | 656 <param name="input" value="small-peakpicking-cwt-allMS.mzML" /> |
653 <param name="license_agreement" value="true" /> | 657 <param name="license_agreement" value="true" /> |
654 <param name="output_type" value="mz5" /> | 658 <param name="output_type" value="mz5" /> |
734 <param name="thresholdScore" value="mvh" /> | 738 <param name="thresholdScore" value="mvh" /> |
735 <param name="thresholdValue" value="40-" /> | 739 <param name="thresholdValue" value="40-" /> |
736 <output name="output" file="Rpal_01-mzRefinement.mzML" compare="sim_size" delta="0" /> | 740 <output name="output" file="Rpal_01-mzRefinement.mzML" compare="sim_size" delta="0" /> |
737 <output name="output_refinement" file="Rpal_01.pepXML.mzRefinement.tsv" /> | 741 <output name="output_refinement" file="Rpal_01.pepXML.mzRefinement.tsv" /> |
738 </test> | 742 </test> |
739 | 743 |
740 <test> | 744 <test> |
741 <param name="input" value="small-peakpicking-cwt-allMS.mzML" /> | 745 <param name="input" value="small-peakpicking-cwt-allMS.mzML" /> |
742 <param name="license_agreement" value="true" /> | 746 <param name="license_agreement" value="true" /> |
743 <param name="output_type" value="mzML" /> | 747 <param name="output_type" value="mzML" /> |
744 <param name="binary_compression" value="numpressLinearPic" /> | 748 <param name="binary_compression" value="numpressLinearPic" /> |