Source code

Download source archive ↓

upstream-extended/iuc/tools/seqtk/seqtk_subseq.xml

1<?xml version="1.0"?>
2<tool id="seqtk_subseq" name="seqtk_subseq" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="22.05">
3    <description>extract subsequences from FASTA/Q files</description>
4    <macros>
5        <import>macros.xml</import>
6    </macros>
7    <expand macro="bio_tools"/>
8    <expand macro="requirements">
9        <expand macro="awk_requirement"/>
10    </expand>
11    <expand macro="stdio"/>
12    <command><![CDATA[
13seqtk subseq
14$t
15-l $l
16'$in_file'
17#if $source.type == 'bed':
18    '$in_bed'
19#else
20    '$name_list'
21#end if
22#if $t == '-t':
23    | awk 'BEGIN{print "chr\tunknown\tseq"}1'
24#end if
25@CONDITIONAL_GZIP_OUT@
26    ]]></command>
27    <inputs>
28        <expand macro="in_faq"/>
29        <conditional name="source">
30            <param name="type" type="select" label="Select source of sequence choices">
31                <option value="bed">BED</option>
32                <option value="name">FASTA/Q ID list</option>
33            </param>
34            <when value="bed">
35                <param name="in_bed" type="data" format="bed" label="Input BED file"/>
36            </when>
37            <when value="name">
38                <param name="name_list" type="data" format="txt" label="Input ID list"/>
39            </when>
40        </conditional>
41        <param argument="-t" type="boolean" truevalue="-t" falsevalue="" label="TAB delimited output" />
42        <param argument="-l" type="integer" value="0" label="Sequence line length" />
43    </inputs>
44    <outputs>
45        <data name="default" format_source="in_file" label="${tool.name} on ${on_string}: Selected sequences">
46            <change_format>
47                <when input="t" value="-t" format="tabular"/>
48            </change_format>
49        </data>
50    </outputs>
51    <tests>
52        <test>
53            <param name="in_file" value="seqtk_subseq.fa"/>
54            <conditional name="source">
55                <param name="type" value="name"/>
56                <param name="name_list" value="seqtk_subseq_list.txt"/>
57            </conditional>
58            <param name="t" value="False" />
59            <output name="default" file="seqtk_subseq.out" ftype="fasta"/>
60        </test>
61        <test>
62            <param name="in_file" value="seqtk_subseq.fa.gz" ftype="fasta.gz"/>
63            <conditional name="source">
64                <param name="type" value="name"/>
65                <param name="name_list" value="seqtk_subseq_list.txt"/>
66            </conditional>
67            <param name="t" value="False" />
68            <output name="default" file="seqtk_subseq.out.gz" ftype="fasta.gz"/>
69        </test>
70    </tests>
71    <help><![CDATA[
72**What it does**
73
74Given a list of newline separated IDs from a fasta file, this will extract those named fasta sequences from the input file.
75
76::
77
78    # Input ID list
79    seq1
80
81    # Input fasta
82    >seq1
83    ACGTMRWSYK
84    >seq2
85    RWSYKACGTM
86
87results in
88
89::
90
91    # Output result
92    >seq1
93    ACGTMRWSYK
94
95@ATTRIBUTION@
96    ]]></help>
97    <expand macro="citation" />
98</tool>