view seqtk_subseq.xml @ 9:4b494533146a draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/seqtk commit 2f75805e2e6cfa2af15076e6f4929b87631360a6
author iuc
date Sat, 09 Dec 2023 11:14:21 +0000
parents 3da72230c066
children
line wrap: on
line source

<?xml version="1.0"?>
<tool id="seqtk_subseq" name="seqtk_subseq" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="22.05">
    <description>extract subsequences from FASTA/Q files</description>
    <macros>
        <import>macros.xml</import>
        <requirement type="package" version="@AWK_VERSION@">gawk</requirement>
    </macros>
    <expand macro="bio_tools"/>
    <expand macro="requirements"/>
    <expand macro="stdio"/>
    <command><![CDATA[
seqtk subseq
$t
-l $l
'$in_file'
#if $source.type == 'bed':
    '$in_bed'
#else
    '$name_list'
#end if
#if $t == '-t':
    | awk 'BEGIN{print "chr\tunknown\tseq"}1'
#end if
@CONDITIONAL_GZIP_OUT@
    ]]></command>
    <inputs>
        <expand macro="in_faq"/>
        <conditional name="source">
            <param name="type" type="select" label="Select source of sequence choices">
                <option value="bed">BED</option>
                <option value="name">FASTA/Q ID list</option>
            </param>
            <when value="bed">
                <param name="in_bed" type="data" format="bed" label="Input BED file"/>
            </when>
            <when value="name">
                <param name="name_list" type="data" format="txt" label="Input ID list"/>
            </when>
        </conditional>
        <param argument="-t" type="boolean" truevalue="-t" falsevalue="" label="TAB delimited output" />
        <param argument="-l" type="integer" value="0" label="Sequence line length" />
    </inputs>
    <outputs>
        <data name="default" format_source="in_file" label="${tool.name} on ${on_string}: Selected sequences">
            <change_format>
                <when input="t" value="-t" format="tabular"/>
            </change_format>
        </data>
    </outputs>
    <tests>
        <test>
            <param name="in_file" value="seqtk_subseq.fa"/>
            <param name="type" value="name"/>
            <param name="t" value="False" />
            <param name="name_list" value="seqtk_subseq_list.txt"/>
            <output name="default" file="seqtk_subseq.out" ftype="fasta"/>
        </test>
        <test>
            <param name="in_file" value="seqtk_subseq.fa.gz" ftype="fasta.gz"/>
            <param name="type" value="name"/>
            <param name="t" value="False" />
            <param name="name_list" value="seqtk_subseq_list.txt"/>
            <output name="default" file="seqtk_subseq.out.gz" ftype="fasta.gz"/>
        </test>
    </tests>
    <help><![CDATA[
**What it does**

Given a list of newline separated IDs from a fasta file, this will extract those named fasta sequences from the input file.

::

    # Input ID list
    seq1

    # Input fasta
    >seq1
    ACGTMRWSYK
    >seq2
    RWSYKACGTM

results in

::

    # Output result
    >seq1
    ACGTMRWSYK

@ATTRIBUTION@
    ]]></help>
    <expand macro="citation" />
</tool>