view seqkit_sort.xml @ 2:61eb4cfc7313 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/seqkit commit 99c10c3df0424268179b3f54f89e01a34b9e120e
author iuc
date Sat, 18 May 2024 23:12:01 +0000
parents 1f08834f987e
children
line wrap: on
line source

<tool id="seqkit_sort" name="SeqKit sort" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
    <description>FASTA or FASTQ files</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="bio_tools"/>
    <expand macro="requirements"/>
    <command detect_errors="exit_code"><![CDATA[
        #set $input_fn='input.' + str($input.ext)
        #set $output_fn='seqkitsort_output.' + str($output.ext)

        ln -s '$input' '$input_fn'
        &&
        seqkit sort
        '$input_fn'
        $reverse
        $sort_by
        -o '$output_fn'
        --threads \${GALAXY_SLOTS:-4}

]]></command>
    <inputs>
        <param name="input" type="data" format="fasta,fasta.gz,fastqsanger,fastqsanger.gz" label="Input file"/>
        <param name="sort_by" type="select" label="Sort by:">
            <option value="" selected="true">Sequence ID</option>
            <option value="--by-bases">Non-gap bases</option>
            <option value="--by-length">Sequence length</option>
            <option value="--by-name">Full name (instead of just ID)</option>
            <option value="--by-seq">Sequence</option>
        </param>
        <param argument="--reverse" type="boolean" truevalue="--reverse" falsevalue="" checked="false" label="Reverse the result?"/>
    </inputs>
    <outputs>
        <data name="output" format_source="input" from_work_dir="seqkitsort_output.*" label="${input.name} sorted (${tool.name})"/>
    </outputs>
    <tests>
        <!-- 1. fastq.gz -->
        <test expect_num_outputs="1">
            <param name="input" value="input1.fastq.gz" ftype="fastqsanger.gz"/>
            <output name="output" file="sort_output1.fastq.gz" ftype="fastqsanger.gz"/>
        </test>
        <!-- 2. fasta.gz -->
        <test expect_num_outputs="1">
            <param name="input" value="input1.fasta.gz" ftype="fasta.gz"/>
            <output name="output" file="sort_output2.fasta.gz" ftype="fasta.gz"/>
        </test>
        <!-- 3. by-bases, forward, fasta -->
        <test expect_num_outputs="1">
            <param name="input" value="input1.fasta.gz" ftype="fasta.gz"/>
            <param name="sort_by" value="--by-bases"/>
            <output name="output" file="sort_output3.fasta.gz" ftype="fasta.gz"/>
        </test>
        <!-- 4. by-length, rev, fasta -->
        <test expect_num_outputs="1">
            <param name="input" value="input1.fasta.gz" ftype="fasta.gz"/>
            <param name="reverse" value="true"/>
            <param name="sort_by" value="--by-length"/>
            <output name="output" file="sort_output4.fasta.gz" ftype="fasta.gz"/>
        </test>
        <!-- 5. by-name, forward, fastq -->
        <test expect_num_outputs="1">
            <param name="input" value="input1.fastq.gz" ftype="fastqsanger.gz"/>
            <param name="sort_by" value="--by-name"/>
            <output name="output" file="sort_output5.fastq.gz" ftype="fastqsanger.gz"/>
        </test>
        <!-- 6. by-seq, rev, fastq -->
        <test expect_num_outputs="1">
            <param name="input" value="input1.fastq.gz" ftype="fastqsanger.gz"/>
            <param name="reverse" value="true"/>
            <param name="sort_by" value="--by-seq"/>
            <output name="output" file="sort_output6.fastq.gz" ftype="fastqsanger.gz"/>
        </test>
    </tests>
    <help>
**What it does**

Sort sequences (FASTA, FASTQ) by id, name, sequence, or length.

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