view biobox_add_taxid.xml @ 4:2e0af1e2d487 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/amber/ commit 09a7f1234811e6104671c0fbb51a515e13815041
author iuc
date Sat, 08 Feb 2025 11:33:03 +0000
parents 450a61fc097f
children
line wrap: on
line source

<tool id="biobox_add_taxid" name="Biobox add taxid" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
    <description>Add taxid output from BAT or GTDB to biobox binning data</description>
    <macros>
        <token name="@TOOL_VERSION@">1.2</token>
        <token name="@VERSION_SUFFIX@">0</token>
        <token name="@PROFILE@">24.1</token>
    </macros>
    <requirements>
        <requirement type="package" version="@TOOL_VERSION@">biobox_add_taxid</requirement>
    </requirements>
    <command detect_errors="exit_code">
    <![CDATA[

    ln -s '$biobox_file' 'biobox.tsv' &&

    #if $input.is_select == 'contig':
        ln -s '$contig2taxid' 'contig.tsv' &&
    #else:
        ln -s '$binid2taxid' 'bin.tsv' &&
    #end if

    biobox_add_taxid.py
    'biobox.tsv'
    #if $input.is_select == 'contig':
        -c 'contig.tsv'
    #else:
        -b 'bin.tsv'
    #end if
    -k_c ${key_col}
    -t_c ${taxid_col}

    &&

    cp 'modified_biobox_file.tsv' '$output'

    ]]>
    </command>
    <inputs>
        <param name="biobox_file" type="data" format="tabular" label="Input biobox file"
            help="This file can be generated with the utility tool from CAMI AMBER named convert to biobox"/>
        <conditional name="input">
            <param name="is_select" type="select" label="Select typ of input">
                <option value="contig">ContigID2TaxID</option>
                <option value="bin">BinID2TaxID</option>
            </param>
            <when value="contig">
                <param argument="--contig2taxid" type="data" format="tabular" label="Input ConitgID2TaxID file"
                    help="This input comes from Kraken2"/>
                <param argument="--key_col" type="data_column" data_ref="contig2taxid" label="Select the column where the ContigID are stated"/>
                <param argument="--taxid_col" type="data_column" data_ref="contig2taxid" label="Select the column where the TaxID are stated"/>
            </when>
            <when value="bin">
                <param argument="--binid2taxid" type="data" format="tabular" label="Input BinID2TaxID file"
                    help="This input comes from Kraken2"/>
                <param argument="--key_col" type="data_column" data_ref="binid2taxid" label="Select the column where the BinID are stated"/>
                <param argument="--taxid_col" type="data_column" data_ref="binid2taxid" label="Select the column where the TaxID are stated"/>
            </when>
        </conditional>
    </inputs>
    <outputs>
        <data name="output" format="tabular" label="${tool.name}: BIOBOX ADD TAXID COLUMN"/>
    </outputs>
    <tests>
        <test>
            <param name="biobox_file" value="biobox_file.tsv" ftype="tabular"/>
            <conditional name="input">
                <param name="is_select" value="bin"/>
                <param name="binid2taxid" value="binid2taxid.tsv" ftype="tabular"/>
                <param name="key_col" value="1"/>
                <param name="taxid_col" value="2"/>
            </conditional>
            <output name="output" file="modified_biobox_file_bin.tsv"/>
        </test>
        <test>
            <param name="biobox_file" value="biobox_file.tsv" ftype="tabular"/>
            <conditional name="input">
                <param name="is_select" value="contig"/>
                <param name="contig2taxid" value="kraken2.tsv" ftype="tabular"/>
                <param name="key_col" value="2"/>
                <param name="taxid_col" value="3"/>
            </conditional>
            <output name="output" file="modified_biobox_file_contig.tsv"/>
        </test>
    </tests>
    <help>
    <![CDATA[
        
        **USAGE OF THIS TOOL**
        
        This tool can be used to add the TaxID column to a biobox file.

        **INPUTS**
        
        - A biobox file. This file can be generated with the CAMI AMBER utility Tool named 'convert to biobox'
        - Either a Contig2TaxID file which is generated from Kraken2 (the classification file from Kraken2) or a BinID2TaxID which has to be done manualy

        Example for a BinID2TaxID file 

        ::
        
            #BinID   TaxID
            test1   11056
            test2   444944
            ABC 888

        **OUTPUT**

        - A CAMI AMBER biobox file with a taxid column

    ]]> 
    </help>
    <citations>
        <citation type="bibtex">@misc{BibEntry2024Aug,
            title = {{biobox{$\_$}add{$\_$}taxid}},
            author = {Santino Faack (SantaMcCloud)},
            journal = {GitHub},
            year = {2024},
            month = aug,
            url = {https://github.com/SantaMcCloud/biobox_add_taxid/tree/release-1.0}
        }</citation>
    </citations>
</tool>