view idpquery.xml @ 3:42dc8e9e58d8 draft

planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tools/bumbershoot commit 82368da0ad9f7dcce4ce99a15c749eed915606ee
author galaxyp
date Thu, 02 Nov 2017 14:15:35 -0400
parents c0e3ae85a40d
children 47c6b21c0afe
line wrap: on
line source

<?xml version="1.0"?>
<tool id="idpquery" name="idpQuery" version="@VERSION@.0">
    <description>Creates text reports from idpDB files.</description>
    <macros>
        <import>macros.xml</import>
        <xml name="proteinGroupByColumns">
            <param name="report_columns" type="select" label="Select report columns" display="checkboxes" multiple="true">
                <option value="Accession" selected="true">Accession</option>
                <option value="GeneId">Gene Id</option>
                <option value="GeneGroup">Gene Group</option>
                <option value="DistinctPeptides">Distinct Peptides</option>
                <option value="DistinctMatches">Distinct Matches</option>
                <option value="FilteredSpectra">Filtered Spectra</option>
                <option value="IsDecoy">Is Decoy</option>
                <option value="Cluster">Cluster</option>
                <option value="ProteinGroup">Protein Group</option>
                <option value="Length">Length</option>
                <option value="PercentCoverage">Percent Coverage</option>
                <option value="Sequence">Sequence</option>
                <option value="Description">Description</option>
                <option value="TaxonomyId">Taxonomy Id</option>
                <option value="GeneName">Gene Name</option>
                <option value="GeneFamily">Gene Family</option>
                <option value="Chromosome">Chromosome</option>
                <option value="GeneDescription">Gene Description</option>
                <option value="PrecursorIntensity">Precursor Intensity</option>
                <option value="PrecursorArea">Precursor Area</option>
                <option value="PrecursorBestSNR">Precursor Best SNR</option>
                <option value="PrecursorMeanSNR">Precursor Mean SNR</option>
                <option value="iTRAQ4plex">iTRAQ 4-plex</option>
                <option value="iTRAQ8plex">iTRAQ 8-plex</option>
                <option value="TMT2plex">TMT 2-plex</option>
                <option value="TMT6plex">TMT 6-plex</option>
                <option value="TMT10plex">TMT 10-plex</option>
                <option value="PivotMatchesByGroup">Pivot Matches By Group</option>
                <option value="PivotMatchesBySource">Pivot Matches By Source</option>
                <option value="PivotPeptidesByGroup">Pivot Peptides By Group</option>
                <option value="PivotPeptidesBySource">Pivot Peptides By Source</option>
                <option value="PivotSpectraByGroup">Pivot Spectra By Group</option>
                <option value="PivotSpectraBySource">Pivot Spectra By Source</option>
                <option value="PivotPrecursorIntensityByGroup">Pivot Precursor Intensity By Group</option>
                <option value="PivotPrecursorIntensityBySource">Pivot Precursor Intensity By Source</option>
                <option value="PivotPrecursorAreaByGroup">Pivot Precursor Area By Group</option>
                <option value="PivotPrecursorAreaBySource">Pivot Precursor Area By Source</option>
                <option value="PivotPrecursorBestSNRByGroup">Pivot Precursor Best SNR By Group</option>
                <option value="PivotPrecursorBestSNRBySource">Pivot Precursor Best SNR By Source</option>
                <option value="PivotPrecursorMeanSNRByGroup">Pivot Precursor Mean SNR By Group</option>
                <option value="PivotPrecursorMeanSNRBySource">Pivot Precursor Mean SNR By Source</option>
                <option value="PivotITRAQByGroup">Pivot iTRAQ By Group</option>
                <option value="PivotITRAQBySource">Pivot iTRAQ By Source</option>
                <option value="PivotTMTByGroup">Pivot TMT By Group</option>
                <option value="PivotTMTBySource">Pivot TMT By Source</option>
                <option value="PeptideGroups">Peptide Groups</option>
                <option value="PeptideSequences">Peptide Sequences</option>
            </param>
        </xml>
    </macros>
    <expand macro="requirements" />
    <stdio>
        <exit_code range="1:" level="fatal" description="Job Failed" />
        <regex match="^Error:.*$" source="both" level="fatal" />
    </stdio>
    <command>
<![CDATA[
        #set $input_name = $input.display_name
        #set $output_name = $input_name.split(".")[0] + ".tsv"
        ln -s '$input' '${input_name}' &&

        idpQuery $group_by.group_by_value $group_by.report_columns '${input_name}' &&
        mv '$output_name' output
]]>
    </command>
    <inputs>
        <param name="input" type="data" format="idpdb" label="Input idpDB" multiple="false" />
        <conditional name="group_by">
            <param name="group_by_value" type="select" label="What proteomic entity do you want to group by?" help="Only protein- and gene-centric entities are currently supported.">
                <option value="Protein" selected="true">Protein</option>
                <option value="ProteinGroup">Protein Group</option>
                <option value="Gene">Gene</option>
                <option value="GeneGroup">Gene Group</option>
            </param>
            <when value="Protein">
                <expand macro="proteinGroupByColumns" />
            </when>
            <when value="ProteinGroup">
                <expand macro="proteinGroupByColumns" />
            </when>
            <when value="Gene">
                <expand macro="proteinGroupByColumns" />
            </when>
            <when value="GeneGroup">
                <expand macro="proteinGroupByColumns" />
            </when>
        </conditional>
    </inputs>
    <outputs>
        <data format="tabular" name="output" from_work_dir="output" />
    </outputs>
    <tests>
        <test>
          <param name="input" value="201203-624176-12-mm-gui-test.idpDB" />
          <param name="group_by_value" value="Protein" />
          <param name="report_columns" value="Accession,FilteredSpectra,Description" />
          <output name="output" file="201203-624176-12-mm-gui-test-Protein-Accession,FilteredSpectra,Description.tsv" />
        </test>
        <test>
          <param name="input" value="201203-624176-12-mm-gui-test.idpDB" />
          <param name="group_by_value" value="ProteinGroup" />
          <param name="report_columns" value="ProteinGroup,Accession,PercentCoverage" />
          <output name="output" file="201203-624176-12-mm-gui-test-ProteinGroup-ProteinGroup,Accession,PercentCoverage.tsv" />
        </test>
        <test>
          <param name="input" value="201203-624176-12-mm-gui-test.idpDB" />
          <param name="group_by_value" value="Gene" />
          <param name="report_columns" value="GeneId,Accession,DistinctPeptides" />
          <output name="output" file="201203-624176-12-mm-gui-test-Gene-GeneId,Accession,DistinctPeptides.tsv" />
        </test>
        <test>
          <param name="input" value="201203-624176-12-mm-gui-test.idpDB" />
          <param name="group_by_value" value="GeneGroup" />
          <param name="report_columns" value="GeneGroup,GeneId,DistinctMatches" />
          <output name="output" file="201203-624176-12-mm-gui-test-GeneGroup-GeneGroup,GeneId,DistinctMatches.tsv" />
        </test>
    </tests>
    <help>
<![CDATA[
**What it does**

Creates user-configurable text reports from IDPicker 3 idpDB files. 
]]>
    </help>
    <citations>
        <citation type="doi">10.1021/pr900360j</citation>
        <citation type="bibtex">@misc{toolsGalaxyP, author = {Chilton, J, Chambers MC, et al.}, title = {Galaxy Proteomics Tools}, publisher = {GitHub}, journal = {GitHub repository},
                                      year = {2015}, url = {https://github.com/galaxyproteomics/tools-galaxyp}}</citation> <!-- TODO: fix substitution of commit ", commit = {$sha1$}" -->
    </citations>
</tool>