view concatenate_fasta.xml @ 2:298542e0e136 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:50:29 +0000
parents e6bc3455940e
children
line wrap: on
line source

<tool id="semibin_concatenate_fasta" name="SemiBin: Concatenate fasta files" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
    <description>
        for multi-sample binning
    </description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="biotools"/>
    <expand macro="requirements"/>
    <expand macro="version"/>
    <command detect_errors="exit_code"><![CDATA[
#import re
#for $e in $input_fasta
    #set $identifier = re.sub('[^\s\w\-\\.]', '_', str($e.element_identifier))
    #if $e.ext.endswith(".gz")
gunzip -c '$e' > '${identifier}.fasta' &&
    #else
ln -s '$e' '${identifier}.fasta' &&
    #end if
#end for

SemiBin2 concatenate_fasta
    --input-fasta *.fasta
    --output 'output'
    --separator '$separator'
    --compression none
    -m $min_len
    ]]></command>
    <inputs>
        <param argument="--input-fasta" type="data" multiple="true" format="fasta,fasta.gz" label="Contig sequences"/>
        <expand macro="separator"/>
        <expand macro="concat_min_len"/>
    </inputs>
    <outputs>
        <data name="fasta" format="fasta" from_work_dir="output/concatenated.fa" />
    </outputs>
    <tests>
        <test expect_num_outputs="1">
            <param name="input_fasta" ftype="fasta" value="input_single.fasta,input_single_2.fasta,input_single_3.fasta"/>
            <param name="separator" value=":"/>
            <param name="min_len" value="0"/>
            <output name="fasta" ftype="fasta">
                <assert_contents>
                    <has_text text=">input_single:g1k_0"/>
                    <has_text text=">input_single_3:g4k_7"/>
                    <has_text text=">input_single_2:g1k_0"/>
                </assert_contents>
            </output>
        </test>
    </tests>
    <help><![CDATA[
@HELP_HEADER@

Inputs
======

@HELP_INPUT_FASTA@

Outputs
=======

- One fasta with all contigs

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