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