view extract_fasta_bins.xml @ 6:8b1b09fcd8b7 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/concoct commit 86e1afebec29c10ef1e31196b23c24fde2d086da
author iuc
date Sun, 12 Nov 2023 14:31:16 +0000
parents bcd8d64f82b7
children
line wrap: on
line source

<tool id="concoct_extract_fasta_bins" name="CONCOCT: Extract a fasta file" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
    <description>for each cluster</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="biotools"/>
    <expand macro="requirements"/>
    <command detect_errors="exit_code"><![CDATA[
## CONCOCT doesn't handle gzipped files.
#if $fasta_file.ext.endswith(".gz")
    gunzip -c '$fasta_file' > 'contigs.fa' &&
#else:
    ln -s '$fasta_file' 'contigs.fa' &&
#end if

mkdir outdir &&
extract_fasta_bins.py
    'contigs.fa'
    '$cluster_file'
    --output_path 'outdir'
    ]]></command>
    <inputs>
        <param name="fasta_file" type="data" format="fasta,fasta.gz" label="Original contig file"/>
        <param name="cluster_file" type="data" format="csv" label="CONCOCT clusters"/>
    </inputs>
    <outputs>
        <collection name="bins" type="list" label="${tool.name} on ${on_string} : Bins">
            <discover_datasets pattern="(?P&lt;designation&gt;.*)\.fa" format="fasta" directory="outdir"/>
        </collection>
    </outputs>
    <tests>
        <test expect_num_outputs="1">
            <param name="fasta_file" value="composition.fa.gz" ftype="fasta.gz"/>
            <param name="cluster_file" value="clusters.csv" ftype="csv"/>
            <output_collection name="bins" type="list" count="54">
                <element name="0" ftype="fasta">
                    <assert_contents>
                        <has_size value="1194"/>
                        <has_text text="contig-223000058 1140 nucleotides"/>
                        <has_n_lines n="20"/>
                    </assert_contents>
                </element>
                <element name="52" ftype="fasta">
                    <assert_contents>
                        <has_size value="5356"/>
                        <has_text text="contig-161000004 1031 nucleotides"/>
                        <has_n_lines n="90"/>
                    </assert_contents>
                </element>
            </output_collection>
        </test>
    </tests>
    <help><![CDATA[
**What it does**

Performs metagenomic binning of fasta contigs by extracting a fasta file for each cluster defined in a CONCOCT clustering file.

The tool accepts two inputs; the fasta contigs file and the CONCOCT clustering file that was produced using the same fasta contigs input.  A collection of fasta files is produced.

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