view delta_pi_calc.xml @ 3:a6341e757422 draft default tip

planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/pi_db_tools commit decb06dc90d7069d317968b979f649a04720b264
author galaxyp
date Thu, 14 Sep 2017 11:54:46 -0400
parents c093af6f2a6c
children
line wrap: on
line source

<tool id="calc_delta_pi" name="Add delta pI" version="1.3">
    <description>to peptide table</description>
    <requirements>
        <requirement type="package" version="3.6">python</requirement>
    </requirements>
    <command detect_errors="exit_code">
	    python '$__tool_directory__/peptide_pi_annotator.py' -i '$trainingpi' -p '$peptable' --out '$output'
	    #if $stripcol
	        --stripcol $stripcol
	    #else if $stripcolpattern
	        --stripcolpattern '$stripcolpattern'
	    #end if
	    #if $pepcol
                --pepcol $pepcol 
	    #else if $pepcolpattern
                --pepcolpattern '$pepcolpattern'
	    #end if
	    #if $fraccol
                --fraccol $fraccol
	    #else if $fraccolpattern
                --fraccolpattern '$fraccolpattern'
	    #end if
	    
	    --strippatterns
	    #for $strip in $strips
	        '$strip.pattern'
	    #end for

	    --intercepts 
	    #for $strip in $strips
	        $strip.intercept 
	    #end for
	    
	    --widths
	    #for $strip in $strips
		$strip.fr_width
	    #end for
	    
	    #if len($ignoremods) > 0
	        --ignoremods
	        #for $mod in $ignoremods
		    '$mod.regex'
		#end for
	    #end if
    </command>
    
    <inputs>
      <param name="trainingpi" type="data" format="tabular" label="Known peptides with annotation of pI" help="First column is sequence, second pI" />
      <param name="peptable" type="data" format="tabular" label="Peptide table to determine pI shift from" />
      <repeat name="ignoremods" title="Peptide modification weights to ignore">
          <param name="regex" label="Regex to strip modification from peptide table before looking up sequence in predicted pI" type="text" help="Enter e.g. 15.994915 for oxidation, * to ignore all modifications, or a proper regex (however brackets are stripped by galaxy). See help below.">
              <sanitizer>
                  <valid>
                      <remove preset="string.whitespace" /> 
		  </valid>
	      </sanitizer>
          </param>
      </repeat>
      <param name="pepcolpattern" type="text" value="" optional="true" label="Peptide sequence pattern for column header field in peptide table." />
      <param name="pepcol" type="integer" value="" optional="true" label="Peptide sequence column number in peptide table. First column is 1. Overrides column pattern." />
      <param name="fraccolpattern" type="text" value="" optional="true" label="Fraction number column header papttern in peptide table." />
      <param name="fraccol" type="integer" optional="true" value="" label="Fraction number column number in peptide table. First column is 1. Overrides column pattern." />
      <param name="stripcolpattern" type="text" optional="true" value="" label="Strip pattern header column pattern in peptide table" help="E.g. column with filename to derive strip name from"/>
      <param name="stripcol" type="integer" optional="true" value="" label="Strip pattern column number in peptide table" help="E.g. column with filename to derive strip name from. First column is 1. Overrides column pattern"/>
      <repeat name="strips" title="pI separation strip data">
	      <param name="pattern" type="text" label="Strip regex detection pattern" help="Regex (see help below) that identifies the pI strip from the column in the above field.">
                  <sanitizer>
                      <valid>
                          <remove preset="string.whitespace" />
                      </valid>
	          </sanitizer>
              </param>
	      <param name="intercept" type="text" label="pI intercept of strip" />
	      <param name="fr_width" type="text" label="fraction widths" />
     </repeat>
    </inputs>
    
    <outputs>
        <data format="tabular" name="output"/>
    </outputs>
    <tests>
        <test> 
            <param name="trainingpi" value="predicted_peptides.txt" />
            <param name="peptable" value="peptable.txt" />
            <repeat name="ignoremods">
                <param name="regex" value="*" />
            </repeat>
            <param name="pepcol" value="1" />
            <param name="fraccol" value="4" />
            <param name="stripcol" value="2" />
            <repeat name="strips">
                <param name="pattern" value="strip1" />
                <param name="intercept" value="8.21" />
                <param name="fr_width" value="0.013" />
            </repeat>
            <repeat name="strips">
                <param name="pattern" value="strip2" />
                <param name="intercept" value="6.11" />
                <param name="fr_width" value="0.04" />
            </repeat>
            <output name="output" value="peptable_deltapi.txt" />
        </test>
        <test> 
            <param name="trainingpi" value="predicted_peptides.txt" />
            <param name="peptable" value="peptable.txt" />
            <repeat name="ignoremods">
                <param name="regex" value="*" />
            </repeat>
            <param name="pepcolpattern" value="Sequence" />
            <param name="fraccolpattern" value="Fraction" />
            <param name="stripcolpattern" value="Filename" />
            <repeat name="strips">
                <param name="pattern" value="strip1" />
                <param name="intercept" value="8.21" />
                <param name="fr_width" value="0.013" />
            </repeat>
            <repeat name="strips">
                <param name="pattern" value="strip2" />
                <param name="intercept" value="6.11" />
                <param name="fr_width" value="0.04" />
            </repeat>
            <output name="output" value="peptable_deltapi.txt" />
        </test>
        <test>
            <param name="trainingpi" value="predicted_peptides.txt" />
            <param name="peptable" value="peptable.txt" />
            <repeat name="ignoremods">
                <param name="regex" value="15.994915" />
            </repeat>
            <param name="pepcol" value="1" />
            <param name="fraccol" value="4" />
            <param name="stripcol" value="2" />
            <repeat name="strips">
               <param name="pattern" value="strip1" />
               <param name="intercept" value="8.21" />
               <param name="fr_width" value="0.013" />
            </repeat>
            <repeat name="strips">
               <param name="pattern" value="strip2" />
               <param name="intercept" value="6.11" />
               <param name="fr_width" value="0.04" />
            </repeat>
            <output name="output" value="peptable_deltapi.txt" />
        </test>
        <test>
            <param name="trainingpi" value="predicted_peptides.txt" />
            <param name="peptable" value="peptable.txt" />
            <param name="pepcol" value="1" />
            <param name="fraccol" value="4" />
            <param name="stripcol" value="2" />
            <repeat name="strips">
                <param name="pattern" value="strip1" />
                <param name="intercept" value="8.21" />
                <param name="fr_width" value="0.013" />
            </repeat>
            <repeat name="strips">
                <param name="pattern" value="strip2" />
                <param name="intercept" value="6.11" />
                <param name="fr_width" value="0.04" />
            </repeat>
            <output name="output" value="peptable_missed_ox.txt" />
        </test>
    </tests>

    <help>
	    In case you have no pI calculation method but a large table with 
	    peptides and their predicted pIs available. This tool adds a column 
	    with delta-pI values to a peptide or PSM table for each peptide it 
	    can find in the predicted collection. Needs a tab-separated file 
	    with peptide-sequences and their predicted pI, and a PSM/peptide table 
	    with at least peptide sequences.

	    Regexes, or regular expressions are are sequences of characters that 
	    are used to find a certain pattern in a string of text. For example 
	    the regex "peptide" will find the word "peptide" in the text
	    "thisisa peptide in my sample". More advanced regexes can allow for
	    finding for example specific but variable pieces of text, e.g.
	    "[a-c].*" will match a string "acbcba" in "yxyzyxacbcbayxzyxyzxy".
	    Much more elaborate regexes exist. Since this is a python script,
	    python regexes are described here:
	    https://docs.python.org/3/library/re.html
    </help>

</tool>