view pi_db_split.xml @ 2:77ddaee887a8 draft

planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/pi_db_tools commit 71a4265d11aef48342142b8cf2caa86f79f9a554
author galaxyp
date Fri, 01 Sep 2017 03:14:54 -0400
parents 8a30d6e5b97d
children
line wrap: on
line source

<tool id="pi_db_split" name="Split peptide database" version="1.2">
    <description>into pI separated fractions</description>
    <requirements>
        <requirement type="package">numpy</requirement>
        <requirement type="package" version="3.6">python</requirement>
    </requirements>
    <command detect_errors="exit_code">
	    <![CDATA[
	    mkdir pi_fr_out && cd pi_fr_out &&
	    python '$__tool_directory__/pi_database_splitter.py' -i '$pipeptides' -p '$peptable'
	    #for $strip in $strips
	        #if not $strip.peptable_pattern or str($strip.peptable_pattern) in $peptable.element_identifier
                    --intercept $strip.intercept --width $strip.fr_width --tolerance $strip.tolerance --amount $strip.fr_amount --prefix pisplit --picutoff $strip.picutoff 
                    #if $strip.reverse
                        --reverse
                    #end if
	            #break
                #end if 
            #end for

	    #if $deltacol
	        --deltacol $deltacol 
            #else if $deltacolpattern
		--deltacolpattern '$deltacolpattern'
            #end if
	    #if $fdrcol
	        --fdrcol $fdrcol --fdrcutoff $fdrcutoff 
            #else if $fdrcolpattern
                --fdrcolpattern '$fdrcolpattern' --fdrcutoff $fdrcutoff 
	    #end if
            #if $maxlen
                --maxlen $maxlen
            #end if
            --minlen $minlen
	    ]]>
    </command>
    
    <inputs>
      <param name="pipeptides" type="data" format="tabular" label="Target peptides with pI and accession" help="First col accession, second sequence, third pI" />
      <param name="peptable" type="data" format="tabular" label="Peptide table to determine pI shift from" help="Should have delta pI as a column" />
      <param name="fdrcolpattern" type="text" optional="true" label="FDR (q-value) column pattern in peptide table" />
      <param name="fdrcol" type="integer" value="" optional="true" label="FDR (q-value) column number in peptide table" help="Overrides column pattern if filled. First column is 1" />
      <param name="fdrcutoff" type="float" value="0.0" help="Not used when no FDR column specified" label="FDR value cutoff for inclusion in shift determination" />
      <param name="deltacolpattern" type="text" value="" label="Delta pI column pattern in peptide table" />
      <param name="deltacol" type="integer" optional="true" value="" label="Delta pI column number in peptide table" help="Overrides column pattern if filled. First column is 1"/>
      <param name="minlen" type="integer" value="8" label="Minimum length of peptide to include in split DB" />
      <param name="maxlen" type="integer" optional="true" value="" label="Max. length of peptide to include in split DB" />
      <repeat name="strips" title="pI separation strip data">
          <param name="peptable_pattern" type="text" label="Pattern to find correct peptide table for a strip, for when multiple peptide tables have different strips" help="Will match against peptide table's name. Leave blank for single peptide table or when using same strip in all tables" />
          <param name="intercept" type="float" value="" label="Intercept of pI strip" />
          <param name="fr_width" type="float" value="" label="Fraction width" />
          <param name="tolerance" type="float" value="" label="pI tolerance" />
          <param name="fr_amount" type="integer" value="" label="Fraction amount" />
          <param name="reverse" type="boolean" label="Strip is reversed (high-to-low pI)?" />
          <param name="picutoff" type="float" value="0.2" optional="true" label="delta-pI cutoff for inclusion in shift determination" />
      </repeat>
    </inputs>
    
    <outputs>
	<collection name="target_pi_db" type="list" label="target pI separated db">
            <discover_datasets pattern="pisplit_(?P&lt;designation&gt;.+)\.fasta" ext="fasta" directory="pi_fr_out" />
	</collection>
	<collection name="decoy_pi_db" type="list" label="decoy pI separated db">
            <discover_datasets pattern="decoy_pisplit_(?P&lt;designation&gt;.+)\.fasta" ext="fasta" directory="pi_fr_out" />
	</collection>
    </outputs>
    <tests>
	    <test>
		    <param name="pipeptides" value="predicted_peptides_to_split.txt" />
		    <param name="peptable" value="peptable_deltapi.txt" />
		    <param name="fdrcol" value="3" />
		    <param name="fdrcutoff" value="0.2" />
		    <param name="deltacol" value="-1" />
		    <param name="minlen" value="8" />
                    <repeat name="strips">
		        <param name="peptable_pattern" value="deltapi" />
		        <param name="intercept" value="5.6" />
		        <param name="fr_width" value="1.3" />
		        <param name="tolerance" value="0.1" />
		        <param name="fr_amount" value="3" />
		        <param name="reverse" value="false" />
		        <param name="picutoff" value="10" />
                    </repeat>
		    <output_collection name="target_pi_db" type="list">
			    <element name="fr1" value="target_splitdb_fr1.fasta" />
			    <element name="fr2" value="target_splitdb_fr2.fasta" />
			    <element name="fr3" value="target_splitdb_fr3.fasta" />
		    </output_collection>
		    <output_collection name="decoy_pi_db" type="list">
			    <element name="fr1" value="decoy_splitdb_fr1.fasta" />
			    <element name="fr2" value="decoy_splitdb_fr2.fasta" />
			    <element name="fr3" value="decoy_splitdb_fr3.fasta" />
		    </output_collection>
	    </test>
	    <test>
		    <param name="pipeptides" value="predicted_peptides_to_split.txt" />
		    <param name="peptable" value="peptable_deltapi.txt" />
		    <param name="fdrcolpattern" value="FDR" />
		    <param name="fdrcutoff" value="0.2" />
		    <param name="deltacolpattern" value="Delta" />
		    <param name="minlen" value="8" />
                    <repeat name="strips">
		        <param name="intercept" value="5.6" />
		        <param name="fr_width" value="1.3" />
		        <param name="tolerance" value="0.1" />
		        <param name="fr_amount" value="3" />
		        <param name="reverse" value="false" />
		        <param name="picutoff" value="10" />
                    </repeat>
		    <output_collection name="target_pi_db" type="list">
			    <element name="fr1" value="target_splitdb_fr1.fasta" />
			    <element name="fr2" value="target_splitdb_fr2.fasta" />
			    <element name="fr3" value="target_splitdb_fr3.fasta" />
		    </output_collection>
		    <output_collection name="decoy_pi_db" type="list">
			    <element name="fr1" value="decoy_splitdb_fr1.fasta" />
			    <element name="fr2" value="decoy_splitdb_fr2.fasta" />
			    <element name="fr3" value="decoy_splitdb_fr3.fasta" />
		    </output_collection>
	    </test>
    </tests>

    <help>
	    Creates a pI separated database collection from a pI-determined input
	    file of peptide/protein mappings. Outputs one db for target, one
	    for decoy.
    </help>

</tool>