view percolator_converters.xml @ 5:dce55ca21b98 draft

planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/percolator commit 4fd46e83045d78a4703c0ae7d0cfc396bdbc8e78
author galaxyp
date Fri, 19 May 2017 09:01:27 -0400
parents 7a0951d0e13e
children 07107a686ce9
line wrap: on
line source

<tool id="percolator_input_converters" name="Search engine output to Pin converter" version="3.1">
    <description>to create Percolator input files</description>
    <requirements>
        <requirement type="package" version="3.1">percolator</requirement>
    </requirements>
    <stdio>
        <exit_code range="1:"/>
    </stdio>
    <command><![CDATA[
             mkdir target && mkdir decoy &&
             
             #if $mzids.inputtype == "multi"
                 #for $key in $mzids.target.keys()
                     ln -s '$mzids.target[$key]' 'target/$key' &&
                     echo 'target/$key' >> targetmeta &&
                 #end for
                 #for $key in $mzids.decoy.keys()
                     ln -s '$mzids.decoy[$key]' 'decoy/$key' &&
                     echo 'decoy/$key' >> decoymeta &&
                 #end for
                 $searchengine -o $pinout -e $enzyme
                 #if $matches
                     -m $matches
                 #end if
                 $aafreq $ptm $pngase $isotope targetmeta decoymeta
             
             #else
                 ln -s '$mzids.target' 'target/$target.display_name' &&
                 ln -s '$mzids.decoy' 'decoy/$decoy.display_name' &&
                 $searchengine -o $pinout -e $enzyme
                 #if $matches
                     -m $matches
                 #end if
                 $aafreq $ptm $pngase $isotope
                 'target/$mzids.target.display_name' 'decoy/$mzids.decoy.display_name'
             #end if
    ]]></command>
    <inputs>
        <param name="searchengine" type="select" label="Search engine used">
            <option value="msgf2pin">MSGF+ (mzIdentML)</option>
            <option value="tandem2pin">X!Tandem (tandem)</option>
            <option value="sqt2pin">Crux (SQT output)</option>
        </param>
        <conditional name="mzids">
            <param name="inputtype" type="select" display="radio">
                <option value="single">Single mzIdentML</option>
                <option value="multi">Multiple mzIdentMLs</option>
            </param>
	    <when value="single">
                <param name="target" type="data" format="mzid" label="Target MSGF+ results" />
                <param name="decoy" type="data" format="mzid" label="Decoy MSGF+ results" />
            </when>
	    <when value="multi">
                <param name="target" type="data_collection" collection_type="list" format="mzid" label="Target MSGF+ results" />
                <param name="decoy" type="data_collection" collection_type="list" format="mzid" label="Decoy MSGF+ results" />
            </when>
        </conditional>
        <param name="enzyme" type="select" label="Enzyme used">
          <option value="trypsin">trypsin</option>
          <option value="no_enzyme">no enzyme</option>
          <option value="elastase">elastase</option>
          <option value="pepsin">pepsin</option>
          <option value="proteinasek">proteinase K</option>
          <option value="thermolysin">thermolysin</option>
          <option value="chymotrypsin">chymotrypsin</option>
          <option value="lys-n">lys-N</option>
          <option value="lys-c">lys-C</option>
          <option value="arg-c">arg-C</option>
          <option value="asp-n">asp-N</option>
          <option value="glu-c">glu-C</option>
        </param>
        <param name="matches" type="integer" optional="true" label="Max number of PSMs for a spectrum" />
	<param name="aafreq" type="boolean" label="Calculate amino acid frequency features" truevalue="-a" falsevalue="" />
        <param name="ptm" type="boolean" label="Calculate feature for number of PTMs" truevalue="-b" falsevalue="" />
        <param name="pngase" type="boolean" label="Calculate feature based on N-linked glycosylation resulting from PNGaseF" truevalue="-N" falsevalue="" />
        <param name="isotope" type="boolean" label="Calculate mass difference to closest isotope instead of avg. mass" truevalue="-M" falsevalue="" />
    </inputs>
    <outputs>
        <data format="percin" name="pinout"/>
    </outputs>
    <tests>
        <test>
          <param name="mzids|inputtype" value="single" />
          <param name="mzids|target" value="target.mzid" />
          <param name="mzids|decoy" value="decoy.mzid" />
          <param name="ptm" value="true"/>
          <param name="matches" value="1"/>
          <output name="pinout" value="percolatorInresult.txt" compare="sim_size" delta="20" />
        </test>
        <test>
          <param name="mzids|inputtype" value="multi" />
          <param name="mzids|target">
                <collection type="list">
                    <element name="target1" value="target.mzid" />
                    <element name="target2" value="target.mzid" />
                </collection>
          </param>
          <param name="mzids|decoy">
                <collection type="list">
                    <element name="decoy1" value="decoy.mzid" />
                    <element name="decoy2" value="decoy.mzid" />
                </collection>
          </param>
          <param name="ptm" value="true"/>
          <param name="matches" value="1"/>
          <output name="pinout" value="percolatorInresult_multifractions.txt" compare="sim_size" delta="20" />
        </test>
    </tests>
    <help>
The percolator converter msgf2pin converts mzIdentML to input for percolator.
Target and decoy inputs are MzIdentML-files of MS-GF+ from
separate target and decoy searches. Internal MS-GF+ target/decoy
analysis should be turned off, and the addFeatures options turned on.
Multiple MzIdentML-files can be merged by passing lists of these.
For successful results, the different runs should be generated under 
similar conditions.
    </help>
    <citations>
        <citation type="doi">10.1021/pr400937n</citation>
    </citations>
</tool>