Mercurial > repos > galaxyp > msconvert
comparison msconvert_macros.xml @ 0:ab59b1826345 draft
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/msconvert commit 815179cfd9754d3859239258fa30c331d5daaa41-dirty
| author | galaxyp |
|---|---|
| date | Thu, 22 Oct 2015 14:00:58 -0400 |
| parents | |
| children | 987d73278bf9 |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:ab59b1826345 |
|---|---|
| 1 <macros> | |
| 2 <xml name="msconvertCommand"> | |
| 3 <command> | |
| 4 <![CDATA[ | |
| 5 #import re | |
| 6 #set $output_type_str = str($output_type) | |
| 7 #set $input_name = $input.display_name | |
| 8 #set $output_name = $input_name.split(".")[0] + "." + $output_type_str | |
| 9 ln -s '$input' '${input_name}' && | |
| 10 | |
| 11 #if $data_processing.precursor_refinement.use_mzrefinement | |
| 12 #set $input_ident_name = $data_processing.precursor_refinement.input_ident.display_name | |
| 13 ln -s '${data_processing.precursor_refinement.input_ident}' '${input_ident_name}' && | |
| 14 #end if | |
| 15 | |
| 16 mkdir outdir && | |
| 17 msconvert ${input_name} --$output_type_str -o outdir --outfile '$output_name' | |
| 18 | |
| 19 ## 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 | |
| 25 --filter "mzRefiner $input_ident_name | |
| 26 msLevels=$data_processing.precursor_refinement.precursor_refinement_ms_levels | |
| 27 thresholdScore=$data_processing.precursor_refinement.thresholdScore | |
| 28 thresholdValue=$data_processing.precursor_refinement.thresholdValue | |
| 29 thresholdStep=$data_processing.precursor_refinement.thresholdStep | |
| 30 maxSteps=$data_processing.precursor_refinement.thresholdMaxSteps" | |
| 31 #end if | |
| 32 | |
| 33 #if str($data_processing.charge_state_calculation.charge_state_calculation_method) == "predictor" | |
| 34 --filter "chargeStatePredictor | |
| 35 overrideExistingCharge=$data_processing.charge_state_calculation.predictor_overrideExistingCharge | |
| 36 minMultipleCharge=$data_processing.charge_state_calculation.minMultipleCharge | |
| 37 maxMultipleCharge=$data_processing.charge_state_calculation.maxMultipleCharge | |
| 38 singleChargeFractionTIC=$data_processing.charge_state_calculation.singleChargeFractionTIC | |
| 39 maxKnownCharge=$data_processing.charge_state_calculation.maxKnownCharge" | |
| 40 #else if str($data_processing.charge_state_calculation.charge_state_calculation_method) == "turbocharger" | |
| 41 --filter "turbocharger | |
| 42 minCharge=$data_processing.charge_state_calculation.minCharge | |
| 43 maxCharge=$data_processing.charge_state_calculation.maxCharge | |
| 44 precursorsBefore=$data_processing.charge_state_calculation.precursorsBefore | |
| 45 precursorsAfter=$data_processing.charge_state_calculation.precursorsAfter | |
| 46 halfIsoWidth=$data_processing.charge_state_calculation.halfIsoWidth | |
| 47 defaultMinCharge=$data_processing.charge_state_calculation.defaultMinCharge | |
| 48 defaultMaxCharge=$data_processing.charge_state_calculation.defaultMaxCharge" | |
| 49 #end if | |
| 50 | |
| 51 #for threshold_entry in $data_processing.thresholds | |
| 52 --filter "threshold $threshold_entry.threshold_type $threshold_entry.value $threshold_entry.orientation" | |
| 53 #end for | |
| 54 | |
| 55 #if $data_processing.filter_mz_windows.do_mzwindow_filter | |
| 56 --filter "mzWindow [$data_processing.filter_mz_windows.mz_window_from,$data_processing.filter_mz_windows.mz_window_to]" | |
| 57 #end if | |
| 58 | |
| 59 #if $data_processing.etd_filtering.do_etd_filtering | |
| 60 --filter "ETDFilter $data_processing.etd_filtering.remove_precursor | |
| 61 $data_processing.etd_filtering.remove_charge_reduced | |
| 62 $data_processing.etd_filtering.remove_neutral_loss | |
| 63 $data_processing.etd_filtering.blanket_removal | |
| 64 $data_processing.etd_filtering.matching_tolerance $data_processing.etd_filtering.matching_tolerance_units" | |
| 65 #end if | |
| 66 | |
| 67 #if $data_processing.ms2denoise.denoise | |
| 68 --filter "MS2Denoise $data_processing.ms2denoise.num_peaks $data_processing.ms2denoise.window_width $data_processing.ms2denoise.relax" | |
| 69 #end if | |
| 70 | |
| 71 #if str($data_processing.ms2deisotope) == "true" | |
| 72 --filter "MS2Deisotope" | |
| 73 #end if | |
| 74 | |
| 75 | |
| 76 ## SCAN INCLUSION/EXCLUSION FILTERS | |
| 77 #if str($filtering.activation) != "false" | |
| 78 --filter "activation $filtering.activation" | |
| 79 #end if | |
| 80 | |
| 81 #if len($filtering.indices) > 0 | |
| 82 --filter "index | |
| 83 #for $index in $filtering.indices | |
| 84 [${index.from},${index.to}] | |
| 85 #end for | |
| 86 " | |
| 87 #end if | |
| 88 | |
| 89 #if len($filtering.scan_numbers) > 0 | |
| 90 --filter "scanNumber | |
| 91 #for $scan_number in $filtering.scan_numbers | |
| 92 [${scan_number.from},${scan_number.to}] | |
| 93 #end for | |
| 94 " | |
| 95 #end if | |
| 96 | |
| 97 #if $filtering.strip_it.value | |
| 98 --filter "stripIT" | |
| 99 #end if | |
| 100 | |
| 101 #if $filtering.filter_ms_levels.do_ms_level_filter | |
| 102 --filter "msLevel [$filtering.filter_ms_levels.ms_level_from, $filtering.filter_ms_levels.ms_level_to]" | |
| 103 #end if | |
| 104 | |
| 105 #if str($filtering.polarity) != "false" | |
| 106 --filter "polarity $filtering.polarity" | |
| 107 #end if | |
| 108 | |
| 109 #if str($filtering.analyzer) != "false" | |
| 110 --filter "analyzer $filtering.analyzer" | |
| 111 #end if | |
| 112 | |
| 113 ## OUTPUT ENCODING | |
| 114 #set $mz_encoding = str($settings.mz_encoding) | |
| 115 #set $intensity_encoding = str($settings.intensity_encoding) | |
| 116 #if $mz_encoding == $intensity_encoding | |
| 117 #if $mz_encoding == "64" | |
| 118 --64 | |
| 119 #else | |
| 120 --32 | |
| 121 #end if | |
| 122 #else | |
| 123 --mz${mz_encoding} | |
| 124 --inten${intensity_encoding} | |
| 125 #end if | |
| 126 | |
| 127 #set binary_compression = str($settings.binary_compression) | |
| 128 #if $binary_compression == "zlib" | |
| 129 --zlib | |
| 130 #else if $binary_compression == "numpressLinearPic" | |
| 131 --numpressLinear --numpressPic | |
| 132 #else if $binary_compression == "numpressLinearSlof" | |
| 133 --numpressLinear --numpressSlof | |
| 134 #else if $binary_compression == "numpressLinear" | |
| 135 --numpressLinear | |
| 136 #else if $binary_compression == "numpressPic" | |
| 137 --numpressPic | |
| 138 #else if $binary_compression == "numpressSlof" | |
| 139 --numpressSlof | |
| 140 #end if | |
| 141 | |
| 142 #if $settings.gzip_compression | |
| 143 --gzip | |
| 144 #end if | |
| 145 | |
| 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 ]]> | |
| 155 </command> | |
| 156 </xml> | |
| 157 | |
| 158 <xml name="msconvertInputParameters"> | |
| 159 <param name="output_type" type="select" label="Output Type"> | |
| 160 <option value="mz5" selected="true">mz5</option> | |
| 161 <option value="mzML">mzML</option> | |
| 162 <option value="mzXML">mzXML</option> | |
| 163 <option value="mgf">mgf</option> | |
| 164 <option value="ms2">ms2</option> | |
| 165 </param> | |
| 166 | |
| 167 <section name="data_processing" title="Data Processing Filters"> | |
| 168 | |
| 169 <conditional name="peak_picking"> | |
| 170 <param type="boolean" name="pick_peaks" label="Apply peak picking?" truevalue="true" falsevalue="false" /> | |
| 171 <when value="false" /> | |
| 172 <when value="true"> | |
| 173 <param name="pick_peaks_ms_levels" type="select" label="Peak Peaking - Apply to MS Levels"> | |
| 174 <option value="1">MS1 Only (1)</option> | |
| 175 <option value="2">MS2 Only (2)</option> | |
| 176 <option value="2-">MS2 and on (2-)</option> | |
| 177 <option value="1-" selected="true">All Levels (1-)</option> | |
| 178 </param> | |
| 179 <param type="select" name="pick_peaks_algorithm" label="Peak Picking - Algorithm" help="The vendor method only works on Agilent, Bruker, Sciex, Thermo data, and only on Windows (although some vendors work on Wine)"> | |
| 180 <option value="vendor" selected="true">Prefer vendor algorithm, fallback to local-maximum</option> | |
| 181 <option value="cwt">CantWaiT - continuous wavelet transform</option> | |
| 182 </param> | |
| 183 </when> | |
| 184 </conditional> | |
| 185 | |
| 186 <conditional name="precursor_refinement" title="MZRefinery Precursor Refinement" expanded="true"> | |
| 187 <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> | |
| 189 <when value="true"> | |
| 190 <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+" /> | |
| 192 <param name="thresholdValue" type="text" value="50-" label="MZRefinery - Threshold Score Value" help="MZRefinery uses peptide-spectrum-matches with scores from this range to build its model. '100-' means score equal to or greater than 100. '-1e-10' means less than or equal to 1e-10." /> | |
| 193 <param name="thresholdStep" type="float" value="0" label="MZRefinery - Threshold Score Step" help="If there are not enough quality hits at the given score threshold value, the threshold can be increased by this step (until maxSteps is reached)." /> | |
| 194 <param name="thresholdMaxSteps" type="integer" value="0" label="MZRefinery - At most, how many steps to widen the threshold?" /> | |
| 195 <param name="precursor_refinement_ms_levels" type="select" label="MZRefinery - Apply to MS Levels"> | |
| 196 <option value="1">MS1 Only (1)</option> | |
| 197 <option value="2">MS2 Only (2)</option> | |
| 198 <option value="2-">MS2 and on (2-)</option> | |
| 199 <option value="1-" selected="true">All Levels (1-)</option> | |
| 200 </param> | |
| 201 </when> | |
| 202 </conditional> | |
| 203 | |
| 204 <conditional name="charge_state_calculation"> | |
| 205 <param name="charge_state_calculation_method" type="select" label="(Re-)calculate charge states?"> | |
| 206 <option value="false">no</option> | |
| 207 <option value="predictor">Based on how much intensity is above vs. below the precursor m/z in the MS/MS scan</option> | |
| 208 <option value="turbocharger">Based on isotopic distribution of the precursor in nearby survey scans</option> | |
| 209 </param> | |
| 210 <when value="false" /> | |
| 211 <when value="predictor"> | |
| 212 <param name="predictor_overrideExistingCharge" type="boolean" label="Always override existing charge?" value="false" /> | |
| 213 <param name="minMultipleCharge" type="integer" label="Minimum multiple charge state" value="2" /> | |
| 214 <param name="maxMultipleCharge" type="integer" label="Maximum multiple charge state" value="3" /> | |
| 215 <param name="singleChargeFractionTIC" type="float" label="Fraction of intensity below the precursor to be considered singly charged" max="1" min="0" value="0.9" /> | |
| 216 <param name="maxKnownCharge" type="integer" label="Maximum charge allowed for "known" charges" help="This is applied even when not overriding existing charges (i.e. it overrides only obviously bogus charge states)" value="0" /> | |
| 217 </when> | |
| 218 <when value="turbocharger"> | |
| 219 <param name="minCharge" type="integer" label="Minimum possible charge state" value="1" min="1" help="Charge states lower than this will not be considered." /> | |
| 220 <param name="maxCharge" type="integer" label="Maximum possible charge state" value="8" min="2" help="Charge states greater than this will not be considered." /> | |
| 221 <param name="precursorsBefore" type="integer" label="Number of preceding survey scans to check for precursor isotopes" value="2" min="1" /> | |
| 222 <param name="precursorsAfter" type="integer" label="Number of succeeding survey scans to check for precursor isotopes" value="0" min="0" /> | |
| 223 <param name="halfIsoWidth" type="float" label="Half-width of isolation window" min="0.0001" value="1.25" /> | |
| 224 <param name="defaultMinCharge" type="integer" label="Minimum possible charge state to apply if no isotope is found" value="0" /> | |
| 225 <param name="defaultMaxCharge" type="integer" label="Maximum possible charge state to apply if no isotope is found" value="0" /> | |
| 226 </when> | |
| 227 </conditional> | |
| 228 | |
| 229 <repeat name="thresholds" title="Filter by Threshold"> | |
| 230 <param type="select" label="Specify threshold on" name="threshold_type" help=""> | |
| 231 <option value="count">Peak count</option> | |
| 232 <option value="count-after-ties">Peak count (after ties)</option> | |
| 233 <option value="absolute">Peak absolute intensity</option> | |
| 234 <option value="bpi-relative">Fraction of base peak intensity</option> | |
| 235 <option value="tic-relative">Fraction of total ion current</option> | |
| 236 <option value="tic-fraction">Aggregate fraction of total ion current</option> | |
| 237 </param> | |
| 238 <param type="float" name="value" label="Threshold" value="1" help="For count methods, this is the number of peaks to keep. For the absolute method, this is the raw intensity above/below which peak will be accepted. For the "Aggregated fraction" method, peaks are accepted until this fraction of the TIC is accounted for." /> | |
| 239 <param type="select" label="Keep" name="orientation"> | |
| 240 <option value="most-intense">Most intense peaks</option> | |
| 241 <option value="least-intense">Least intense peaks</option> | |
| 242 </param> | |
| 243 </repeat> | |
| 244 | |
| 245 <conditional name="filter_mz_windows"> | |
| 246 <param name="do_mzwindow_filter" type="boolean" truevalue="true" falsevalue="false" label="Filter m/z Window" help="" /> | |
| 247 <when value="false" /> | |
| 248 <when value="true"> | |
| 249 <param name="mz_window_from" type="float" label="Filter m/z From" value="0.0" optional="false" /> | |
| 250 <param name="mz_window_to" type="float" label="Filter m/z To" value="0.0" optional="true" /> | |
| 251 </when> | |
| 252 </conditional> | |
| 253 | |
| 254 <conditional name="etd_filtering"> | |
| 255 <param type="boolean" name="do_etd_filtering" label="Filter out ETD precursor peaks?" truevalue="true" falsevalue="false" /> | |
| 256 <when value="false" /> | |
| 257 <when value="true"> | |
| 258 <param name="remove_precursor" type="select" label="ETD Remove Unreacted Precursor"> | |
| 259 <option value="true" selected="true">yes</option> | |
| 260 <option value="false">no</option> | |
| 261 </param> | |
| 262 <param name="remove_charge_reduced" type="select" label="ETD Remove Charge Reduced Precursors"> | |
| 263 <option value="true" selected="true">yes</option> | |
| 264 <option value="false">no</option> | |
| 265 </param> | |
| 266 <param name="remove_neutral_loss" type="select" label="ETD Remove Neutral Losses" help="Remove neutral loss species from nominal and charge reduced precursors"> | |
| 267 <option value="true" selected="true">yes</option> | |
| 268 <option value="false">no</option> | |
| 269 </param> | |
| 270 <param name="blanket_removal" type="select" label="ETD Blanket Removal of Neutral Losses" help="Remove neutral losses in a charge-scaled 60 Da swath (rather than only around known loss species)"> | |
| 271 <option value="true" selected="true">yes</option> | |
| 272 <option value="false">no</option> | |
| 273 </param> | |
| 274 <param name="matching_tolerance" type="float" label="ETD Matching Tolerance" value="3.1" /> | |
| 275 <param name="matching_tolerance_units" type="select" label="Units for ETD Matching Tolerance"> | |
| 276 <option value="MZ" selected="true">mz</option> | |
| 277 <option value="PPM">ppm</option> | |
| 278 </param> | |
| 279 </when> | |
| 280 </conditional> | |
| 281 | |
| 282 <conditional name="ms2denoise"> | |
| 283 <param name="denoise" type="boolean" label="De-noise MS2 with moving window filter" /> | |
| 284 <when value="true"> | |
| 285 <param name="num_peaks" label="De-noise: Number of peaks in window" value="6" type="integer" /> | |
| 286 <param name="window_width" type="float" label="De-noise: Window width (Daltons)" value="30" /> | |
| 287 <param name="relax" label="De-noise: Multicharge fragment relaxation" checked="true" type="boolean" truevalue="true" falsevalue="false" /> | |
| 288 </when> | |
| 289 <when value="false" /> | |
| 290 </conditional> | |
| 291 | |
| 292 <param name="ms2deisotope" type="boolean" label="Deisotope MS2 using Markey method" help="" truevalue="true" falsevalue="false" /> | |
| 293 | |
| 294 </section> | |
| 295 | |
| 296 | |
| 297 <section name="filtering" title="Scan Inclusion/Exclusion Filters"> | |
| 298 | |
| 299 <param name="activation" type="select" label="Filter by Activation"> | |
| 300 <option value="false" selected="true">no</option> | |
| 301 <option value="ETD">ETD</option> | |
| 302 <option value="CID">CID</option> | |
| 303 <option value="SA">SA</option> | |
| 304 <option value="HCD">HCD</option> | |
| 305 <option>BIRD</option> | |
| 306 <option>ECD</option> | |
| 307 <option>IRMPD</option> | |
| 308 <option>PD</option> | |
| 309 <option>PSD</option> | |
| 310 <option>PQD</option> | |
| 311 <option>SID</option> | |
| 312 <option>SORI</option> | |
| 313 </param> | |
| 314 | |
| 315 <repeat name="indices" title="Filter Scan Indices"> | |
| 316 <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" /> | |
| 318 </repeat> | |
| 319 | |
| 320 <repeat name="scan_numbers" title="Filter Scan Numbers"> | |
| 321 <param name="from" type="integer" label="Filter Scan Number From" value="0" optional="false" /> | |
| 322 <param name="to" type="integer" label="Filter Scan Number To" value="0" optional="true" /> | |
| 323 </repeat> | |
| 324 | |
| 325 <param type="boolean" name="strip_it" label="Strip Ion Trap MS1 Scans" /> | |
| 326 | |
| 327 <conditional name="filter_ms_levels"> | |
| 328 <param name="do_ms_level_filter" type="boolean" label="Filter MS Levels" /> | |
| 329 <when value="false" /> | |
| 330 <when value="true"> | |
| 331 <param name="ms_level_from" type="integer" label="Filter MS Level From" value="0" optional="false" /> | |
| 332 <param name="ms_level_to" type="integer" label="Filter MS Level To" value="0" optional="true" /> | |
| 333 </when> | |
| 334 </conditional> | |
| 335 | |
| 336 <param name="polarity" type="select" label="Filter by Polarity"> | |
| 337 <option value="false" selected="true">no</option> | |
| 338 <option value="positive">positive</option> | |
| 339 <option value="negative">negative</option> | |
| 340 </param> | |
| 341 | |
| 342 <param name="analyzer" type="select" label="Filter by Analyzer"> | |
| 343 <option value="false" selected="true">no</option> | |
| 344 <option value="quad">Quadrupole</option> | |
| 345 <option value="orbi">Orbitrap</option> | |
| 346 <option value="FT">Fourier-transform</option> | |
| 347 <option value="IT">Ion trap</option> | |
| 348 <option value="TOF">Time of flight</option> | |
| 349 </param> | |
| 350 </section> | |
| 351 | |
| 352 | |
| 353 <section name="settings" title="Output Encoding Settings"> | |
| 354 <param type="select" name="mz_encoding" label="m/z Encoding Precision"> | |
| 355 <option value="64" selected="true">64</option> | |
| 356 <option value="32">32</option> | |
| 357 </param> | |
| 358 <param type="select" name="intensity_encoding" label="Intensity Encoding Precision"> | |
| 359 <option value="64">64</option> | |
| 360 <option value="32" selected="true">32</option> | |
| 361 </param> | |
| 362 <param type="select" name="binary_compression" label="Binary data compression"> | |
| 363 <option value="false">None</option> | |
| 364 <option value="zlib" selected="true">zlib</option> | |
| 365 <option value="numpressLinearPic">numpressLinear/numpressPic</option> | |
| 366 <option value="numpressLinearSlof">numpressLinear/numpressSlof</option> | |
| 367 <option value="numpressLinear">numpressLinear only</option> | |
| 368 <option value="numpressPic">numpressPic only</option> | |
| 369 <option value="numpressSlof">numpressSlof only</option> | |
| 370 </param> | |
| 371 <param type="boolean" name="gzip_compression" label="Compress output file with gzip" truevalue="true" falsevalue="false" /> | |
| 372 </section> | |
| 373 </xml> | |
| 374 | |
| 375 <xml name="msconvertOutput"> | |
| 376 <outputs> | |
| 377 <data format="mzml" name="output" from_work_dir="output" label="${input.name.rsplit('.',1)[0]}.${output_type}" > | |
| 378 <change_format> | |
| 379 <when input="output_type" value="mz5" format="mz5" /> | |
| 380 <when input="output_type" value="mzXML" format="mzxml" /> | |
| 381 <when input="output_type" value="ms2" format="ms2" /> | |
| 382 <when input="output_type" value="mgf" format="mgf" /> | |
| 383 </change_format> | |
| 384 </data> | |
| 385 <data format="csv" name="output.refinement" from_work_dir="output.refinement" label="${input.name.rsplit('.',1)[0]}.mzRefinement.tsv"> | |
| 386 | |
| 387 </data> | |
| 388 </outputs> | |
| 389 </xml> | |
| 390 </macros> |
