view mztab2tsv.xml @ 0:84e4b5d4b7ad draft

"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/pyteomics commit 49b21b01937067ffc7cf088e615d68177644640b"
author galaxyp
date Fri, 15 Jan 2021 15:58:54 +0000
parents
children a475c1906e0b
line wrap: on
line source

<tool id="mztab2tsv" name="pyteomics" version="@TOOL_VERSION@" profile="20.01" license="MIT">
    <description>convert mztab to tabular</description>
    <macros>
        <token name="@TOOL_VERSION@">4.4.1</token>
        <xml name="output" token_type="" token_label="">
            <data name="out_@TYPE@" format="tabular" from_work_dir="@TYPE@.tsv" label="${tool.name} on ${on_string}: @LABEL@">
                <filter>"@TYPE@" in out_select</filter>
            </data>
        </xml>
    </macros>
    <xrefs>
        <xref type="bio.tools">pyteomics</xref>
    </xrefs>
    <edam_topics>
        <edam_topic>topic_0121</edam_topic><!-- proteomics -->
        <edam_topic>topic_3520</edam_topic><!-- proteomics experiment-->
    </edam_topics>
    <edam_operations>
        <edam_operation>operation_3434</edam_operation><!--	Convert a data set from one form to another -->
    </edam_operations>
    <requirements>
        <requirement type="package" version="@TOOL_VERSION@">pyteomics</requirement>
    </requirements>
    <command detect_errors="exit_code"><![CDATA[
    ## make sure that selected outputs exist even if the tool does not generate them
    #for o in $out_select
        touch '$o'.tsv &&
    #end for
    '$__tool_directory__/mztab_reader.py' --path_in '$path_in'
    ]]></command>
    <inputs>
        <param argument="--path_in" type="data" format="mztab,mztab2" label="mztab or mztab2 data set" help="" />
        <param name="out_select" type="select" label="Select desired tables" multiple="true" help="">
            <option value="mtd" selected="true">Metadata (v1,v2)</option>
            <option value="prt">Protein table (v1)</option>
            <option value="pep">Peptide table (v1)</option>
            <option value="psm">Peptide spectrum match table (v1)</option>
            <option value="sml">Small molecule table (v1,v2)</option>
            <option value="smf">Small molecule feature table (v2)</option>
            <option value="sme">Small molecule evidence table (v2)</option>
        </param>
    </inputs>
    <outputs>
        <expand macro="output" type="mtd" label="Metadata"/>
        <expand macro="output" type="prt" label="Proteins"/>
        <expand macro="output" type="pep" label="Peptides"/>
        <expand macro="output" type="psm" label="Peptide spectrum matches"/>
        <expand macro="output" type="sml" label="Small molecules"/>
        <expand macro="output" type="smf" label="Small molecule feature"/>
        <expand macro="output" type="sme" label="Small molecule evidence"/>
    </outputs>
    <tests>
        <test expect_num_outputs="5">
            <param name="path_in" ftype="mztab" value="1.mztab"/>
            <param name="out_select" value="mtd,prt,pep,psm,sml"/>
            <output name="out_mtd" ftype="tabular">
                <assert_contents><has_text text="mzTab-version"/></assert_contents>
            </output>
            <output name="out_prt" ftype="tabular">
                <assert_contents><has_text text="accession"/></assert_contents>
            </output>
            <output name="out_pep" ftype="tabular">
                <assert_contents><has_text text="&quot;&quot;"/></assert_contents>
            </output>
            <output name="out_psm" ftype="tabular">
                <assert_contents><has_text text="PSM_ID"/></assert_contents>
            </output>
            <output name="out_sml" ftype="tabular">
                <assert_contents><has_text text="&quot;&quot;"/></assert_contents>
            </output>
        </test>
        <test expect_num_outputs="4">
            <param name="path_in" ftype="mztab" value="2.mztab"/>
            <param name="out_select" value="mtd,sml,smf,sme"/>
            <output name="out_mtd" ftype="tabular">
                <assert_contents><has_text text="mzTab-version"/></assert_contents>
            </output>
            <output name="out_sml" ftype="tabular">
                <assert_contents><has_text text="SML_ID"/></assert_contents>
            </output>
            <output name="out_smf" ftype="tabular">
                <assert_contents><has_text text="SMF_ID"/></assert_contents>
            </output>
            <output name="out_sme" ftype="tabular">
                <assert_contents><has_text text="SME_ID"/></assert_contents>
            </output>
        </test>
    </tests>
    <help><![CDATA[
        Convert a mztab or mztab2 file to tabular files using the pyteomics library https://pyteomics.readthedocs.io/en/latest/.

        The specifications of the mztab and mztab2 formats can be found here https://github.com/HUPO-PSI/mzTab/.
    ]]></help>
    <citations>
        <citation type="doi">10.1007/s13361-012-0516-6</citation>
        <citation type="doi">10.1021/acs.jproteome.8b00717</citation>
    </citations>
</tool>