view metabat2.xml @ 1:01f02c5ddff8 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/metabat2/ commit f239f2bb562330c955c19c328935793d6f1f2aa7
author iuc
date Fri, 29 Jul 2022 12:38:24 +0000
parents 76bc4efa1aeb
children 708abf08a626
line wrap: on
line source

<tool id="metabat2" name="MetaBAT2" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
    <description>metagenome binning</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <command detect_errors="exit_code"><![CDATA[
mkdir bins &&
metabat2
--inFile '$inFile'
--outFile 'bins/bin'
#if str($advanced.base_coverage_depth_cond.base_coverage_depth) == 'yes':
    #if $advanced.base_coverage_depth_cond.abdFile:
        --abdFile '$advanced.base_coverage_depth_cond.abdFile'
    #else if $advanced.base_coverage_depth_cond.cvExt:
        --cvExt '$advanced.base_coverage_depth_cond.cvExt'
    #end if
#end if
--minContig $advanced.minContig
--maxP $advanced.maxP
--minS $advanced.minS
--maxEdges $advanced.maxEdges
--pTNF $advanced.pTNF
$advanced.noAdd
--minCV $advanced.minCV
--minCVSum $advanced.minCVSum
--minClsSize $advanced.minClsSize
--numThreads \${GALAXY_SLOTS:-4}
$advanced.onlyLabel
#if $advanced.saveCls:
    $advanced.saveCls
    --noBinOut
#end if
$advanced.unbinned
--seed $advanced.seed
> process_log.txt
#if str($advanced.output_process_log) == 'yes':
    && mv process_log.txt '$process_log'
#end if
    ]]></command>
    <inputs>
        <param argument="--inFile" type="data" format="fasta,fasta.gz" label="Fasta file containing contigs"/>
        <section name="advanced" title="Advanced options">
            <conditional name="base_coverage_depth_cond">
                <param name="base_coverage_depth" type="select" label="Use a base coverage depth file?">
                    <option value="no" selected="true">No</option>
                    <option value="yes">Yes</option>
                </param>
                <when value="no"/>
                <when value="yes">
                    <param argument="--abdFile" type="data" format="tabular" optional="True" label="Tabular depth matrix file having mean and variance of base coverage depth" help="Generated by the Calculate contig depths for MetaBAT2 tool"/>
                    <param argument="--cvExt" type="data" format="tabular" optional="True" label="Base coverage depth file without variance" help="Generated by a tool - not the Calculate contig depths for MetaBAT2 tool"/>
                </when>
            </conditional>
            <param argument="--minContig" type="integer" min="1500" value="1500" label="Minimum size of a contig for binning"/>
            <param argument="--maxP" type="integer" min="1" max="100" value="95" label="Percentage of good contigs considered for binning decided by connection among contigs" help="The greater, the more sensitive"/>
            <param argument="--minS" type="integer" min="1" max="99" value="60" label="Minimum score of an edge for binning" help="The greater, the more specific"/>
            <param argument="--maxEdges" type="integer" value="200" label="Maximum number of edges per node" help="The greater, the more sensitive"/>
            <param argument="--pTNF" type="integer" value="0" label="TNF probability cutoff for building TNF graph" help="Use it to skip the preparation step (0:auto)"/>
            <param argument="--noAdd" type="boolean" truevalue="--noAdd" falsevalue="" checked="false" label="Turn off additional binning for lost or small contigs?"/>
            <param argument="--minCV" type="float" value="1.0" label="Minimum mean coverage of a contig in each library for binning"/>
            <param argument="--minCVSum" type="float" value="1.0" label="Minimum total effective mean coverage of a contig for binning" help="Sum of depth over minCV"/>
            <param argument="--minClsSize" type="integer" value="200000" label="Minimum size of a bin as the output"/>
            <param argument="--onlyLabel" type="boolean" truevalue="--onlyLabel" falsevalue="" checked="false" label="Output only sequence labels as a list in a column without sequences?"/>
            <param argument="--saveCls" type="boolean" truevalue="--saveCls" falsevalue="" checked="false" label="Save cluster memberships as a matrix format?"/>
            <param argument="--unbinned" type="boolean" truevalue="--unbinned" falsevalue="" checked="false" label="Output fasta file containing unbinned contigs?"/>
            <param argument="--seed" type="integer" value="0" label="For exact reproducibility." help="Zero value will use random seed"/>
            <param name="output_process_log" type="select" label="Output process log file?">
                <option value="no" selected="true">No</option>
                <option value="yes">Yes</option>
            </param>
        </section>
    </inputs>
    <outputs>
        <collection name="bin_files" type="list" label="${tool.name} on ${on_string}: (bins)">
            <discover_datasets pattern="(?P&lt;designation&gt;.*)\.fa" format="fasta" directory="bins"/>
        </collection>
        <data name="process_log" format="txt" label="${tool.name} on ${on_string} (process log)">
            <filter>advanced['output_process_log'] == 'yes'</filter>
        </data>
    </outputs>
    <tests>
        <test expect_num_outputs="1">
            <param name="inFile" value="input0.fasta.gz" ftype="fasta.gz"/>
            <param name="seed" value="345678"/>
            <output_collection name="bin_files" type="list" count="2">
                <element name="bin.1" ftype="fasta">
                    <assert_contents>
                        <has_size value="334554"/>
                    </assert_contents>
                </element>
                <element name="bin.2" ftype="fasta">
                    <assert_contents>
                        <has_size value="577866"/>
                    </assert_contents>
                </element>
            </output_collection>
        </test>
        <test expect_num_outputs="2">
            <param name="inFile" value="input0.fasta.gz" ftype="fasta.gz"/>
            <param name="base_coverage_depth" value="yes"/>
            <param name="abdFile" value="input_depth1.tabular" ftype="tabular"/>
            <param name="seed" value="345678"/>
            <param name="output_process_log" value="yes"/>
            <output_collection name="bin_files" type="list" count="0"/>
            <output name="process_log" file="process_log.txt" ftype="txt"/>
        </test>
    </tests>
    <help><![CDATA[
**What it does**

MetaBAT2 (Metagenome Binning based on Abundance and Tetranucleotide frequency) is an automated metagenome binning
software that integrates empirical probabilistic distances of genome abundance and tetranucleotide frequency.  The
tool accepts a fast file containing contigs and produces a collection (i.e., bins) of fasta files.
        
MetaBAT2 includes optionizations to MetaBAT.  It requires virtually no parameter optimization. Default parameter
values are more reliable to use in most cases since MetaBAT2 adapts to the given data to find the best parameter.
Some parameter settings are still available for advanced users, helping to manage some exceptional cases by changing
the amount of data used for the analysis.

**More information**

https://bitbucket.org/berkeleylab/metabat/src/master/

**Options**

 * **Use base coverage depth file** - optionally select a base coverage depth file that was either generated by the Calculate contig depths for MetaBAT2 tool or another 3rd party tool.
 
    ]]></help>
    <expand macro="citations"/>
</tool>