view delta_pi_calc.xml @ 0:34c5c95740a1 draft

planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/pi_db_tools commit a58e2a324724f344a07d4499c860a5b2da06927d
author galaxyp
date Mon, 22 May 2017 05:08:23 -0400
parents
children 8a30d6e5b97d
line wrap: on
line source

<tool id="calc_delta_pi" name="Add delta pI" version="1.0">
    <requirements>
        <requirement type="package" version="3.6">python</requirement>
    </requirements>
    <description>to peptide table</description>
    <command>
	    python '$__tool_directory__/peptide_pi_annotator.py' -i '$trainingpi' -p '$peptable'
            --stripcol $stripcol --pepcol $pepcol --fraccol $fraccol --out '$output'
	    
	    --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="pepcol" type="integer" value="" label="Peptide sequence column in peptide table" />
      <param name="fraccol" type="integer" value="" label="Fraction number column in peptide table" />
      <param name="stripcol" type="integer" value="" label="Strip pattern column in peptide table" help="E.g. column with filename to derive strip name from"/>
      <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="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>