view peptide_shaker.xml @ 14:db6cc184146c draft

Uploaded
author galaxyp
date Fri, 19 Jul 2013 11:39:19 -0400
parents 6521f577059f
children d90e25c7b492
line wrap: on
line source

<tool id="peptide_shaker" name="Peptide Shaker" version="0.1.0">
  <!-- TODO: Set defaults for weights correctly -->
  <description>
    Peform protein identification combining X! Tandem and OMSSA (using SearchGUI) and PeptideShaker pipeline.
  </description>
  <command>
    #from datetime import datetime
    #set $exp_str = "Galaxy Experiment %s" % datetime.now().strftime("%Y%m%d%H%M%s")              
    #set $samp_str = "Sample %s" % datetime.now().strftime("%Y%m%d%H%M%s")
    mkdir spectra;
    mkdir output;
    mkdir output_reports;
    cwd=`pwd`;
    #for $mgf in $peak_lists:
    #set $input_name = $mgf.display_name.replace(".mgf", "") + ".mgf"
    ln -s '$mgf' 'spectra/$input_name';
    #end for
    SearchCLI \
    -spectrum_files \$cwd/spectra \
    -output_folder \$cwd/output \
    -ppm $precursor_ion_tol_units \
    -prec_tol $precursor_ion_tol \
    -frag_tol $fragment_tol \
    -enzyme '$enzyme' \
    #set $fixed_mods_str = $fixed_modifications or ''
    #set $variable_mods_str = $variable_modifications or ''
    #if $fixed_mods_str
    -fixed_mods "$fixed_mods_str" \
    #end if
    #if $variable_mods_str
    -variable_mods "$variable_mods_str" \
    #end if
    -mc $missed_cleavages \
    #if $advanced.specify:
    -xtandem $advanced.xtandem \
    #if $advanced.omssa.run_omssa
    #set $omssa = 1
    #else 
    #set $omssa = 0
    #end if
    -omssa $omssa \
    #if $omssa == 1
    -hitlist_length ${advanced.omssa.hitlist_length} \
    -remove_prec ${advanced.omssa.remove_precursor} \
    -scale_prec ${advanced.omssa.scale_precursor} \
    -estimate_charge ${advanced.omssa.estimate_charge} \
    #end if
    #end if
    -db $input_database;
    PeptideShakerCLI \
    -experiment '$exp_str' \
    -sample '$samp_str' \ 
    -replicate 1 \
    -spectrum_files \$cwd/spectra \
    -identification_files \$cwd/output \ 
    -search_params \$cwd/output/SearchGUI.parameters \
    -out_txt_1 \$cwd/output_reports \
    #if $processing_options.specify
    -protein_FDR ${processing_options.protein_fdr} \
    -peptide_FDR ${processing_options.peptide_fdr} \ 
    -psm_FDR ${processing_options.psm_fdr} \
    -psm_FLR ${processing_options.psm_flr} \
    #if str($processing_options.a_score.use) == "1"
    #set $a_score = 1
    #else
    #set $a_score = 0
    #end if
    -a_score $a_score \
    #if str($a_score) == "1"
    -a_score_neutral_losses ${processing_options.a_score.neutral_losses} \
    #end if
    #end if
    #if $filtering_options.specify
    -min_peptide_length ${filtering_options.min_peptide_length} \
    -max_peptide_length ${filtering_options.max_peptide_length} \
    -max_precursor_error ${filtering_options.max_precursor_error}  \
    -max_precursor_error_type ${filtering_options.max_precursor_error_type}  \
    -max_xtandem_e ${filtering_options.max_xtandem_e} \
    -max_omssa_e ${filtering_options.max_omssa_e} \
    -exclude_unknown_ptms ${filtering_options.exclude_unknown_ptms} \
    #end if
    -out \$cwd/output.cps ; 
    mv output_reports/*peptides.txt peptides.txt ;
    mv output_reports/*psms.txt psms.txt ;
    mv output_reports/*proteins.txt proteins.txt
  </command>
  <stdio>
    <exit_code range="1:" level="fatal" description="Job Failed" />
  </stdio>
  <inputs>
    <param format="fasta" name="input_database" type="data" label="Protein Database" help="Select FASTA database from history. Typically, a target-decoy database is incorporated into the Scaffold engine for FDR analysis"/>
    <param format="mgf" name="peak_lists" type="data" multiple="true" label="Input Peak Lists (mgf)" help="Select appropriate MGF dataset(s) from history" />
    <param name="precursor_ion_tol_units" type="select" label="Precursor Ion Tolerance Units" help="Select based on instrument used, as different machines provide different quality of spectra. ppm is a standard for most precursor ions">
      <option value="1">Parts per million (ppm)</option>
      <option value="0">Daltons</option>
    </param>    
    <param name="precursor_ion_tol" type="float" value="10" label="Percursor Ion Tolerance" help="Provide error value for precursor ion, based on instrument used. 10 ppm recommended for Orbitrap instrument"/>
    <param name="fragment_tol" type="float" value="0.5" label="Fragment Tolerance (Daltons)" help="Provide error value for fragment ions, based on instrument used"/>
    <param name="enzyme" type="select" label="Enzyme" help="Which enzyme was used for protein digest in experiment? In most cases, trypsin is used">
      <option value="Trypsin">Trypsin</option>
      <option value="Arg-C">Arg-C</option>
      <option value="CNBr">CNBr</option>
      <option value="Chymotrypsin (FYWL)">Chymotrypsin (FYWL)</option>
      <option value="Formic Acid">Formic Acid</option>
      <option value="Lys-C">Lys-C</option>
      <option value="Lys-C, no P rule">Lys-C, no P rule</option>
      <option value="Pepsin A">Pepsin A</option>
      <option value="Trypsin + CNBr">Trypsin + CNBr</option>
      <option value="Trypsin + Chymotrypsin (FYWLKR)">Trypsin + Chymotrypsin (FYWLKR)</option>
      <option value="Trypsin, no P rule">Trypsin, no P rule</option>
      <option value="whole protein">whole protein</option>
      <option value="Asp-N">Asp-N</option>
      <option value="Glu-C">Glu-C</option>
      <option value="Asp-N + Glu-C">Asp-N + Glu-C</option>
      <option value="Top-Down">Top-Down</option>
      <option value="Semi-Tryptic">Semi-Tryptic</option>
      <option value="No enzyme">No enzyme</option>
      <option value="Chymotrypsin, no P rule (FYWL)">Chymotrypsin, no P rule (FYWL)</option>
      <option value="Asp-N (DE)">Asp-N (DE)</option>
      <option value="Glu-C (DE)">Glu-C (DE)</option>
      <option value="Lys-N (K)">Lys-N (K)</option>
      <option value="Thermolysin, no P rule">Thermolysin, no P rule</option>
      <option value="Semi-Chymotrypsin (FYWL)">Semi-Chymotrypsin (FYWL)</option>
      <option value="Semi-Glu-C">Semi-Glu-C</option>      
    </param>
    <param name="missed_cleavages" type="integer" value="2" label="Maximum Missed Cleavages" help="Allow peptides to contain up to this many missed enzyme cleavage sites. 2 is the recommended value"/>
    <param name="fixed_modifications" type="select" label="Fixed Modifications" multiple="true" help="Occurs in known places on peptide sequence. Hold the appropriate key while clicking to select multiple items">
      <options from_file="searchgui_mods.loc">
        <column name="name" index="0" />
        <column name="value" index="0" />
      </options>
    </param>
    <param name="variable_modifications" type="select" label="Variable Modifications" multiple="true" help="Can occur anywhere on the peptide sequence; adds additional error to search score. Hold the appropriate key while clicking to select multiple items">
      <options from_file="searchgui_mods.loc">
        <column name="name" index="0" />
        <column name="value" index="0" />
      </options>
    </param>        
    <param name="min_charge" label="Minimum Charge" value="2" type="integer" help="Lowest searched charge value for fragment ions"/>
    <param name="max_charge" label="Maximum Charge" value="4" type="integer" help="Highest searched charge value for fragment ions"/>
    <param name="forward_ion" label="Forward Ion" type="select" help="Searched fragment ion type. Select a, b or c based on collisions induced in experiment">
      <option value="a">a</option>
      <option value="b" selected="true">b</option>
      <option value="c">c</option>
    </param>
    <param name="reverse_ion" label="Reverse Ion" type="select" help="Searched fragment ion type. Select x, y, or z based on collisions induced in experiment">
      <option value="x">x</option>
      <option value="y" selected="true">y</option>
      <option value="z">z</option>
    </param>
    <conditional name="advanced">
      <param name="specify" label="Specify Advanced Search Options" type="boolean" truevalue="true" falsevalue="false" help=" Run X! Tandem, OMSSA, or both and provide options for OMSSA search"/>
      <when value="false" />
      <when value="true">
        <param name="xtandem" label="Run X! Tandem" type="boolean" truevalue="1" falsevalue="0" checked="true" />
        <conditional name="omssa">
          <param name="run_omssa" label="Run OMSSA" type="boolean" truevalue="1" falsevalue="0" checked="true" />
          <when value="0" />
          <when value="1">
            <param name="hitlist_length" label="OMSSA: Hit List Length" type="integer" value="25" />
            <param name="remove_precursor" label="OMSSA: Remove Precurosr" type="boolean" truevalue="1" falsevalue="0" checked="true"/>
            <param name="scale_precursor" label="OMSSA: Scale Precursor Mass" type="boolean" truevalue="1" falsevalue="0" checked="false"/>
            <param name="estimate_charge" label="OMSSA: Estimate Charge" type="boolean" truevalue="1" falsevalue="0" checked="true" />
          </when>
        </conditional>
      </when>
    </conditional>
    <conditional name="processing_options">
      <param name="specify" label="Specify Advanced PeptideShaker Processing Options" type="boolean" truevalue="true" falsevalue="false" help="Select and provide False Discovery Rate (FDR) levels at the peptide, protein, and peptide-spectral match (PSM) levels, as well as False Loss Rate (FLR) for PSM’s and A score options for post-translational modifications (PTM’s). See this link_ for more details

 .. _link: http://peptide-shaker.googlecode.com/svn-history/r1267/wiki/tutorial/6_ptm_analysis.docx" />
      <when value="false" />
      <when value="true">
        <param name="protein_fdr" label="FDR at the protein level" help="In percent (default 1% FDR: '1')" value="1" type="float" />
        <param name="peptide_fdr" label="FDR at the peptide level" help="In percent (default 1% FDR: '1')" value="1" type="float" />
        <param name="psm_fdr" label="FDR at the PSM level" help="In percent (default 1% FDR: '1')" value="1" type="float" />
        <param name="psm_flr" label="FLR at the PSM level" help="In percent (default 1% FLR: '1'). Percent for peptides with different potential modification sites and one variable modification." value="1" type="float" />
        <conditional name="a_score">
          <param name="use" label="Calculate A Score" type="boolean" truevalue="1" falsevalue="0" checked="true" />
          <when value="0" />
          <when value="1">
            <param name="neutral_losses" label="Include Neutral Losses in A Score" type="boolean" truevalue="1" falsevalue="0" />
          </when>
        </conditional>
        <!-- SKIPPING -protein_fraction_mw_confidence ${processing_options.protein_fraction_mw_confidence} -->
      </when>
    </conditional>    
    <conditional name="filtering_options">
      <param name="specify" label="Specify Advanced PeptideShaker Filtering Options" type="boolean" truevalue="true" falsevalue="false" help="Filter based on peptide lengths, precursor mass error, E value errors from X! Tandem and OMSSA, and include/exclude unknown PTM’s"/>
      <when value="false" />
      <when value="true">
        <param name="min_peptide_length" label="Minimum Peptide Length" value="6" type="integer" />
        <param name="max_peptide_length" label="Maximum Peptide Length" value="30" type="integer" />
        <param name="max_precursor_error" label="Maximum Precursor Error" value="10" type="float" help="Next option specifies units (Da or ppm)." />
        <param name="max_precursor_error_type" label="Maximum Precursor Error Type" type="select">
          <option value="0">ppm</option>
          <option value="1">Daltons</option>
        </param>
        <param name="max_xtandem_e" label="Maximum X! Tandem E Value" value="100" type="float" help="" />
        <param name="max_omssa_e" label="Maximum OMSSA E Value" value="100" type="float" help="" />
        <param name="exclude_unknown_ptms" label="Exclude Unknown PTMs" type="boolean" truevalue="1" falsevalue="0" checked="true" />
      </when>
    </conditional>
  </inputs>
  <outputs>
    <data format="cps" name="output" label="PeptideShaker CPS results for ${on_string}" from_work_dir="output.cps" />
    <data format="tabular" name="output_peptides" label="PeptideShaker Peptide Report for ${on_string}" from_work_dir="peptides.txt" />
    <data format="tabular" name="output_proteins" label="PeptideShaker Protein Report for ${on_string}" from_work_dir="proteins.txt" />
    <data format="tabular" name="output_psms" label="PeptideShaker PSM Report for ${on_string}" from_work_dir="psms.txt" />
  </outputs>
  <requirements>
    <requirement type="package" version="0.20.1">PeptideShaker</requirement>
    <requirement type="package" version="1.14.1">SearchGUI</requirement>
  </requirements>
  <help>
**What it does**

Runs multiple search engines (X! Tandem and OMSSA) on any number of MGF peak lists using the SearchGUI application and combines the results.

------

**Citation**

For the underlying tool, please cite `TODO`

If you use this tool in Galaxy, please cite Chilton J, et al. https://bitbucket.org/galaxyp/galaxyp-toolshed-peptideshaker
  </help>
</tool>