view myrimatch.xml @ 7:7055a90a71d7 draft

Uploaded
author galaxyp
date Mon, 24 Jun 2013 17:41:31 -0400
parents 2f8b7c7e48bc
children cf49f245a4ea
line wrap: on
line source

<tool id="myrimatch" name="myrimatch" version="0.1.0">
  <description></description>
  <command>
  #set $mod_rep_chars = "*$^@.%!"
  #set $db_name = $input_database.display_name.replace(".fasta", "") + ".fasta"
  #if $output_type.value == "mzid"
  #set $output_ext="mzid"
  #set $output_format="mzIdentML"
  #else 
  #set $output_ext="pepXML"
  #set $output_format="pepXML"
  #end if
  #set $input_name = $input.display_name
  #set $output_name = $input_name.split(".")[0] + "." + $output_ext
  #set $static_mods_str = ""
  #for $static_mod in $static_mods
  #set $static_mods_str = $static_mods_str + "" + str($static_mod.aa) + " " + str($static_mod.mass)
  #end for
  #set $dynamic_mods_str = ""
  #set $dynamic_mod_index = 0
  #for $dynamic_mod in $dynamic_mods
  #set $dynamic_mods_str = $dynamic_mods_str + "" + str($dynamic_mod.motif) + " " + $mod_rep_chars[$dynamic_mod_index] + " " + str($dynamic_mod.mass)
  #set $dynamic_mod_index = $dynamic_mod_index + 1
  #end for
  ln -s '$input' '${input_name}';
  ln -s '$input_database' '${db_name}';
  myrimatch -DecoyPrefix '${decoy_prefix}' \
  -ProteinDatabase '${db_name}' \
  -OutputFormat '${$output_format}' \
  '${input_name}' \
  -StaticMods '${static_mods_str}' \
  -DynamicMods '${dynamic_mods_str}' \
  -CleavageRules '${protease}' \
  #set $percursor_type = $percursor_tolerance.percursor_type
  -PrecursorMzToleranceRule '${percursor_type}' \
  #if $percursor_type == "auto" or $percursor_type == "mono"
  -MonoPrecursorMzTolerance '${percursor_tolerance.mono_precursor_mz_tolerance}${percursor_tolerance.mono_precursor_mz_tolerance_units}' \
  #end if
  #if $percursor_type == "auto" or $percursor_type == "avg"
  -AvgPrecursorMzTolerance '${percursor_tolerance.avg_precursor_mz_tolerance}${percursor_tolerance.avg_precursor_mz_tolerance_units}' \
  #end if
  -FragmentMzTolerance '${fragment_mz_tolerance}${fragment_mz_tolerance_units}' \
  #if $advanced.use_advanced
  -UseSmartPlusThreeModel $advanced.use_smart_plus_three_model \
  -MinPeptideLength $advanced.min_peptide_length \
  -MaxPeptideLength $advanced.max_peptide_length \
  #if $advanced.max_peak_count
  -MaxPeakCount $advanced.max_peak_count \
  #end if
  #if $advanced.fragmentation_rule.override
  -FragmentationAutoRule false -FragmentationRule 'manual:${advanced.fragmentation_rule.fragmentation_rule}' \
  #end if
  #end if
  ;
  mv '$output_name' output
  </command>
  <stdio>
    <exit_code range="1:" level="fatal" description="Job Failed" />
    <regex match="^Could not find the default configuration file.*$"
      source="both"
      level="warning" />
  </stdio>
  <inputs>
    <conditional name="type">
      <param name="input_type" type="select" label="Input Type">
        <option value="mzml">mzML</option>
        <option value="mzxml">mzXML</option>
        <option value="mgf">mgf</option>
        <option value="ms2">ms2</option>
      </param>
      <when value="mzml">
        <param format="mzml" name="input" type="data" label="Input mzML"/>
      </when>
      <when value="mzxml">
        <param format="mzxml" name="input" type="data" label="Input mzXML"/>
      </when>
      <when value="mgf">
        <param format="mgf" name="input" type="data" label="Input mgf"/>
      </when>
      <when value="ms2">
        <param format="ms2" name="input" type="data" label="Input ms2"/>
      </when>
    </conditional>
    <param name="output_type" type="select" label="Output Type">
      <option value="raw_pepxml">pepXML</option>
      <option value="mzid">mzIdentML</option>
    </param> 
    <param format="fasta" name="input_database" type="data" label="Protein Database"/>
    <param name="decoy_prefix" type="text" label="Decoy Prefix"/>
    <param name="protease" type="select" label="Protease"> 
      <options from_file="proteases.loc">
        <column name="name" index="0" />
        <column name="value" index="1" />
      </options>
    </param>    
    <repeat name="static_mods" title="Static Modifications">
      <param name="aa" type="text" label="Amino Acid" />
      <param name="mass" type="float" label="Mass" value="0" />
    </repeat>
    <repeat name="dynamic_mods" title="Dynamic Modifications" max="7">
      <param name="motif" type="text" label="Amino Acid Motif" />
      <param name="mass" type="float" label="Mass" value="0" />
    </repeat>
    <conditional name="percursor_tolerance">
      <param name="percursor_type" type="select" label="Percursor Mass Type" help="For data from Thermo instruments, using the 'auto' setting on a will automatically choose monoisotopic or average mass values, for other instruments monoisotopic or average should be chosen.">
        <option value="auto">Auto</option>
        <option value="avg">Average</option>
        <option value="mono">Monoisotopic</option>
      </param>
      <when value="auto">
        <param name="mono_precursor_mz_tolerance" type="float" value="10" label="Monoisotopic Percursor m/z Tolerance" />
        <param name="mono_precursor_mz_tolerance_units" type="select" label="Monoisotopic Percursor m/z Tolerance Units">
          <option value="ppm">Parts per million</option>
          <option value="daltons">Daltons</option>
        </param>
        <param name="avg_precursor_mz_tolerance" type="float" value="1.5" label="Average Percursor m/z Tolerance" />
        <param name="avg_precursor_mz_tolerance_units" type="select" label="Average Percursor m/z Tolerance Units">
          <option value="ppm">Parts per million</option>
          <option value="daltons" selected="true">Daltons</option>          
        </param>
      </when>
      <when value="avg">
        <param name="avg_precursor_mz_tolerance" type="float" value="1.5" label="Average Percursor m/z Tolerance" />
        <param name="avg_precursor_mz_tolerance_units" type="select" label="Average Percursor m/z Tolerance Units">
          <option value="ppm">Parts per million</option>
          <option value="daltons" selected="true">Daltons</option>          
        </param>
      </when>
      <when value="mono">
        <param name="mono_precursor_mz_tolerance" type="float" value="10" label="Monoisotopic Percursor m/z Tolerance" />
        <param name="mono_precursor_mz_tolerance_units" type="select" label="Monoisotopic Percursor m/z Tolerance Units">
          <option value="ppm">Parts per million</option>
          <option value="daltons">Daltons</option>
        </param>        
      </when>
    </conditional>
    <param name="fragment_mz_tolerance" type="float" value="1.5" label="Fragement m/z Tolerance" />
    <param name="fragment_mz_tolerance_units" type="select" label="Fragment m/z Tolerance Units">
      <option value="ppm">Parts per million</option>
      <option value="daltons" selected="true">Daltons</option>
    </param>
    <conditional name="advanced">
      <param name="use_advanced" type="boolean" label="Set Advanced Options" />
      <when value="false">
      </when>
      <when value="true">
        <param name="max_peak_count" type="integer" value="" optional="true" label="Use Max Peaks" help="Filter out all but the specified number of peaks, keep empty to use all peaks." />
        <conditional name="fragmentation_rule">
          <param name="override" type="boolean" label="Override Fragmentation Rule (Ion Series)" />
          <when value="false" />
          <when value="true">
            <param type="text" name="fragmentation_rule" label="Fragmentation Rule" help="specify as a comma-separated list of a, b, c, x, y, z, or z* (z+1), e.g. b,y,z" />
          </when>
        </conditional>
        <param name="min_peptide_length" type="integer" value="5" label="Minimum Peptide Length" />
        <param name="max_peptide_length" type="integer" value="75" label="Maximum Peptide Length" />
        <param name="use_smart_plus_three_model" type="boolean" truevalue="true" falsevalue="false" label="Use Smart Plus 3 Model"  help="For +3 and higher precursors, the fragment ions predicted depend on the way this parameter is set. When this parameter is true, then for each peptide bond, an internal calculation is done to estimate the basicity of the b and y fragment sequence. When this parameter is false, however, ALL possible charge distributions for the fragment ions are generated for every peptide bond." checked="true" />

      </when>
    </conditional>
    <!--
    <param name="max_peptide_length" value="75"

    <param name="use_smart_plus_three_model" type="boolean" truevalue="true" falsevalue="false" label="Use Smart Plus 3 Model"  help="For +3 and higher precursors, the fragment ions predicted depend on the way this parameter is set. When this parameter is true, then for each peptide bond, an internal calculation is done to estimate the basicity of the b and y fragment sequence. When this parameter is false, however, ALL possible charge distributions for the fragment ions are generated for every peptide bond." checked="true" />
  -->
  </inputs>
  <outputs>
    <data format="raw_pepxml" name="output" from_work_dir="output">
      <change_format>
        <when input="output_type" value="mzid" format="mzid" />
      </change_format>
    </data>
  </outputs>

  <requirements>
    <requirement type="package">myrimatch</requirement>
  </requirements>

  <help>
**What it does**

Performs protein identification via database search using MyriMatch.

------

**Citation**

For the underlying tool, please cite `MyriMatch: highly accurate tandem mass spectral peptide identification by multivariate hypergeometric analysis. Tabb DL, Fernando CG, Chambers MC. J Proteome Res. 6(2) 654-61. 2007 Feb. PMCID PMC2525619`

If you use this tool in Galaxy, please cite TODO
  </help>
</tool>