view cat_bins.xml @ 3:18ece3d5bcde draft

planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cat commit 3febcc9ba3d3717877c36bf96742209012a13ac4-dirty
author jjohnson
date Tue, 26 Nov 2019 15:42:14 -0500
parents 9a01840eac52
children aaeb63501369
line wrap: on
line source

<tool id="cat_bins" name="CAT bins" version="@VERSION@.0">
    <description>annotate with taxonomic classification</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements" />
    <expand macro="version_command" />
    <command detect_errors="exit_code"><![CDATA[
    #set $bin_dir = None
    #if len($mags) > 1:
        #set $bin_dir = 'inputs'
        mkdir -p $bin_dir &&
        #for mag in $mags:
            ln -s '$mag' $bin_dir/ &&
        #end for
    #end if
    CAT 
    #if $bin_dir
        bins -s '.dat' -b $bin_dir
    #else
        bin -b '$mags'
    #end if 
    @CAT_DB@
    @USE_INTERMEDIATES@
    @CUSTOM_SETTINGS@
    && @TXT2TSV@ *.ORF2LCA.txt *.bin2classification.txt
    #if len($mags) > 1:
        #set pat = '$' + '{i/concatenated./}'
        && (for i in *.concatenated.*; do ln -s "\$i" "${pat}"; done)
    #end if
    @ADD_NAMES@
    @SUMMARISE@
    ]]></command>
    <inputs>
        <param name="mags" type="data" format="fasta" multiple="true" label="metagenome assembled genomes (MAGs/bins)"/>
        <expand macro="cat_db" />
        <expand macro="use_intermediates" />
        <expand macro="custom_settings" />
        <expand macro="add_names" />
        <expand macro="summarise" />
        <expand macro="select_bat_outputs" />
    </inputs>
    <outputs>
        <expand macro="outputs" />
    </outputs>
    <tests>
        <test>
            <param name="mags" ftype="fasta" value="genome2.fna"/>
            <expand macro="test_catdb"/>
            <param name="select_outputs" value="bin2classification"/>
            <output name="bin2classification">
                <assert_contents>
                    <has_text text="666" />
                </assert_contents>
            </output>
        </test>
        <test>
            <param name="mags" ftype="fasta" value="genome3.fna"/>
            <expand macro="test_catdb"/>
            <param name="select_outputs" value="bin2classification"/>
            <output name="bin2classification">
                <assert_contents>
                    <has_text text="1639" />
                </assert_contents>
            </output>
        </test>
        <test>
            <param name="mags" ftype="fasta" value="genome2.fna,genome3.fna"/>
            <expand macro="test_catdb"/>
            <param name="select_outputs" value="bin2classification"/>
            <output name="bin2classification">
                <assert_contents>
                    <has_text text="666" />
                    <has_text text="1639" />
                </assert_contents>
            </output>
        </test>
        <test>
            <param name="mags" ftype="fasta" value="genome2.fna,genome3.fna"/>
            <expand macro="test_catdb"/>
            <param name="select_outputs" value="bin2classification"/>
           <param name="select_outputs" value="predicted_proteins_faa"/>
            <conditional name="names">
                <param name="add_names" value="both"/>
            </conditional>
            <param name="summarise" value="classification"/>
            <output name="predicted_proteins_faa">
                <assert_contents>
                    <has_text text="contig_11394" />
                    <has_text text="contig_4403" />
                </assert_contents>
            </output>
            <output name="orf2lca_names">
                <assert_contents>
                    <has_text text="Listeria" />
                    <has_text text="Vibrio" />
                </assert_contents>
            </output>
            <output name="classification_summary">
                <assert_contents>
                    <has_text text="Listeria" />
                </assert_contents>
            </output>
        </test>

    </tests>
    <help><![CDATA[
**CAT bin or bins**
Classify metagenomics assembled genomes. 

@COMMON_HELP@
    ]]></help>
    <expand macro="citations" />
</tool>