view generate_cannot_links.xml @ 2:a6f004bc73bf 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:51:27 +0000
parents 078414a1226b
children
line wrap: on
line source

<tool id="semibin_generate_cannot_links" name="SemiBin: Contig annotations"  version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
    <description>

    </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
    generate_cannot_links
    --input-fasta 'contigs.fasta'
    --output 'output'
    --cannot-name 'cannot'
#if $mode.ref.select == "cached"
    --reference-db-data-dir '$mode.ref.cached_db.fields.path'
#else
    --taxonomy-annotation-table '$mode.ref.taxonomy_annotation_table'
#end if
    @MIN_LEN@
#if str($ml_threshold) != ''
    --ml-threshold $ml_threshold
#end if
    --cannot-name 'cannot'
    --threads \${GALAXY_SLOTS:-1}
    --processes \${GALAXY_SLOTS:-1}
    ]]></command>
    <inputs>
        <conditional name="mode">
            <expand macro="mode_select"/>
            <when value="single">
                <expand macro="input-fasta-single"/>
                <expand macro="ref-single"/>
            </when>
            <when value="co">
                <expand macro="input-fasta-single"/>
                <expand macro="ref-single"/>
            </when>
            <when value="multi">
                <expand macro="input-fasta-multi"/>
                <expand macro="ref-multi"/>
            </when>
        </conditional>
        <expand macro="min_len"/>
        <expand macro="ml-threshold"/>
    </inputs>
    <outputs>
        <expand macro="cannot_link_output"/>
    </outputs>
    <tests>
        <test expect_num_outputs="1">
            <conditional name="mode">
                <param name="select" value="single"/>
                <param name="input_fasta" ftype="fasta" value="input_single.fasta"/>
                <conditional name="ref">
                    <param name="select" value="taxonomy"/>
                    <param name="taxonomy_annotation_table" value="taxonomy.tsv"/>
                </conditional>
            </conditional>
            <conditional name="min_len">
                <param name="method" value="min-len"/>
                <param name="min_len" value="0" />
            </conditional>
            <param name="ml_threshold" value=""/>
            <output name="cannot" ftype="txt">
                <assert_contents>
                    <has_text text="g1k_0,g4k_0"/>
                    <has_text text="g2k_3,g4k_5"/>
                    <has_text text="g4k_6,g4k_5"/>
                </assert_contents>
            </output>
        </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 name="ref">
                    <param name="select" value="taxonomy"/>
                    <param name="taxonomy_annotation_table" value="taxonomy.tsv"/>
                </conditional>
            </conditional>
            <conditional name="min_len">
                <param name="method" value="min-len"/>
                <param name="min_len" value="0" />
            </conditional>
            <param name="ml_threshold" value=""/>
            <output name="cannot" ftype="txt">
                <assert_contents>
                    <has_text text="g1k_0,g4k_0"/>
                    <has_text text="g2k_3,g4k_5"/>
                    <has_text text="g4k_6,g4k_5"/>
                </assert_contents>
            </output>
        </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 name="ref">
                    <param name="db_selector" value="cached"/>
                    <param name="cached_db" value="test-db"/>
                </conditional>
            </conditional>
            <conditional name="min_len">
                <param name="method" value="min-len"/>
                <param name="min_len" value="0" />
            </conditional>
            <param name="ml_threshold" value=""/>
            <output name="cannot" ftype="txt">
                <assert_contents>
                    <has_text text="g1k_0,g2k_0"/>
                    <has_text text="g2k_9,g4k_1"/>
                </assert_contents>
            </output>
        </test>
    </tests>
    <help><![CDATA[
@HELP_HEADER@

This tool runs the contig annotations using mmseqs with GTDB and generate cannot-link file used in the semi-supervised deep learning model training.

Inputs
======

@HELP_INPUT_FASTA@

Outputs
=======

@HELP_CANNOT@

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