view bin.xml @ 2:dbf5571a8140 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/semibin commit 13abac83068b126399ec415141007a48c2efaa84
author iuc
date Fri, 10 Nov 2023 20:49:03 +0000
parents 4d561bdc2c31
children
line wrap: on
line source

<tool id="semibin_bin" name="SemiBin: Group the contigs" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
    <description>
        into bins
    </description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="biotools"/>
    <expand macro="requirements"/>
    <expand macro="version"/>
    <command detect_errors="exit_code"><![CDATA[
#import re
@FASTA_FILES@
SemiBin2 bin
    --input-fasta 'contigs.fasta'
    --data '$data'
#if $mod.select == 'history'
    --model '$mod.model'
#else
    --environment '$mod.environment'
#end if
    --output 'output'
    --threads \${GALAXY_SLOTS:-1}
    --minfasta-kbs $minfasta_kbs
#if $mode.select == 'single' or $mode_fasta.mode_select == 'co'
    $write_pre_reclustering_bins
#end if
    --max-node $max_node
    --max-edges $max_edges
    --random-seed $random_seed
    --compression none
    @MIN_LEN@
    --orf-finder '$orf_finder'
    ]]></command>
    <inputs>
        <expand macro="mode_fasta"/>
        <expand macro="data"/>
        <conditional name="mod">
            <param name="select" type="select" label="Model to use">
                <option value="built-in" selected="true">Built-in model</option>
                <option value="history">From history</option>
            </param>
            <when value="built-in">
                <expand macro="environment"/>
            </when>
            <when value="history">
                <param argument="--model" type="data" format="h5" label="Trained semi-supervised deep learning model"/>
            </when>
        </conditional>
        <expand macro="min_len"/>
        <expand macro="orf-finder"/>
        <expand macro="random-seed"/>
        <expand macro="max-node"/>
        <expand macro="max-edges"/>
        <expand macro="minfasta-kbs"/>
        <expand macro="write_pre_reclustering_bins"/>
    </inputs>
    <outputs>
        <collection name="output_bins" type="list" label="${tool.name} on ${on_string}: Reconstructed bins after reclustering">
            <filter>not write_pre_reclustering_bins</filter>
            <discover_datasets pattern="(?P&lt;designation&gt;.*).fa" format="fasta" directory="output/output_bins" />
        </collection>
        <collection name="output_recluster_bins" type="list" label="${tool.name} on ${on_string}: Reclustered bins?">
            <filter>write_pre_reclustering_bins</filter>
            <discover_datasets pattern="(?P&lt;designation&gt;.*).fa" format="fasta" directory="output/output_recluster_bins" />
        </collection>
        <collection name="output_prerecluster_bins" type="list" label="${tool.name} on ${on_string}: Pre reclustered bins">
            <filter>write_pre_reclustering_bins</filter>
            <discover_datasets pattern="(?P&lt;designation&gt;.*).fa" format="fasta" directory="output/output_prerecluster_bins" />
        </collection>
    </outputs>
    <tests>
        <test expect_num_outputs="2">
            <conditional name="mode">
                <param name="select" value="single"/>
                <param name="input_fasta" ftype="fasta" value="input_single.fasta"/>
            </conditional>
            <param name="data" ftype="csv" value="data.csv"/>
            <conditional name="mod">
                <param name="select" value="history"/>
                <param name="model" ftype="h5" value="model.h5"/>
            </conditional>
            <conditional name="min_len">
                <param name="method" value="min-len"/>
                <param name="min_len" value="0" />
            </conditional>
            <param name="orf_finder" value="prodigal"/>
            <param name="random-seed" value="0"/>
            <param name="max_node" value="1"/>
            <param name="max_edges" value="200"/>
            <param name="minfasta_kbs" value="200"/>
            <param name="write_pre_reclustering_bins" value="true"/>
            <output_collection name="output_prerecluster_bins" count="3">
                <element name="SemiBin_0" ftype="fasta">
                    <assert_contents>
                        <has_text text=">g1k_0"/>
                        <has_text text=">g4k_9"/>
                    </assert_contents>
                </element>
                <element name="SemiBin_1" ftype="fasta">
                    <assert_contents>
                        <has_text text=">g2k_0"/>
                        <has_text text=">g2k_9"/>
                    </assert_contents>
                </element>
                <element name="SemiBin_2" ftype="fasta">
                    <assert_contents>
                        <has_text text=">g3k_0"/>
                        <has_text text=">g3k_9"/>
                    </assert_contents>
                </element>
            </output_collection>
        </test>
        <test expect_num_outputs="1">
            <conditional name="mode">
                <param name="select" value="single"/>
                <param name="input_fasta" ftype="fasta" value="input_single.fasta"/>
            </conditional>
            <param name="data" ftype="csv" value="data.csv"/>
            <conditional name="mod">
                <param name="select" value="built-in"/>
                <param name="environment" value="human_gut"/>
            </conditional>
            <conditional name="min_len">
                <param name="method" value="min-len"/>
                <param name="min_len" value="0" />
            </conditional>
            <param name="orf_finder" value="prodigal"/>
            <param name="random-seed" value="0"/>
            <param name="max_node" value="1"/>
            <param name="max_edges" value="200"/>
            <param name="minfasta_kbs" value="200"/>
            <param name="write_pre_reclustering_bins" value="false"/>
            <output_collection name="output_bins" count="0"/>
        </test>
        <test expect_num_outputs="2">
            <conditional name="mode">
                <param name="select" value="single"/>
                <param name="input_fasta" ftype="fasta" value="input_single.fasta"/>
            </conditional>
            <param name="data" ftype="csv" value="data.csv"/>
            <conditional name="mod">
                <param name="select" value="history"/>
                <param name="model" ftype="h5" value="model.h5"/>
            </conditional>
            <conditional name="min_len">
                <param name="method" value="min-len"/>
                <param name="min_len" value="0" />
            </conditional>
            <param name="orf_finder" value="prodigal"/>
            <param name="random-seed" value="0"/>
            <param name="max_node" value="1"/>
            <param name="max_edges" value="200"/>
            <param name="minfasta_kbs" value="200"/>
            <param name="write_pre_reclustering_bins" value="true"/>
            <output_collection name="output_prerecluster_bins" count="3"/>
        </test>
    </tests>
    <help><![CDATA[
@HELP_HEADER@

Inputs
======

@HELP_INPUT_FASTA@
@HELP_INPUT_BAM@

Outputs
=======

@HELP_BINS@

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