Mercurial > repos > artbio > sequence_format_converter
comparison sequence_format_converter.xml @ 0:a8aacccd79a3 draft
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sequence_format_converter commit d6ef80f9db43eae4f58b33f58b5ef6f8209907db
author | artbio |
---|---|
date | Mon, 04 Sep 2017 07:13:28 -0400 |
parents | |
children | 9ce7ccd468aa |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:a8aacccd79a3 |
---|---|
1 <tool id="sequence_format_converter" name="sequence_format_converter" version="2.0.0"> | |
2 <description></description> | |
3 <command><![CDATA[ | |
4 python '$__tool_directory__'/sequence_format_converter.py | |
5 --input '$input' | |
6 --output '$output' | |
7 --format '$output_format' | |
8 ]]></command> | |
9 | |
10 <inputs> | |
11 <param name="input" type="data" format="fasta, fastq, tabular" label="file to convert to tabular (input format is automatically detected)"/> | |
12 <param name="output_format" type="select" label="conversion options"> | |
13 <option value="tabular" selected="true">tabular</option> | |
14 <option value="fasta">Fasta</option> | |
15 <option value="fastaw">Weighted fasta</option> | |
16 </param> | |
17 </inputs> | |
18 | |
19 <outputs> | |
20 <data format="fasta" name="output" label="${output_format} conversion of ${input.name}"> | |
21 <change_format> | |
22 <when input="output_format" value="tabular" format="tabular"/> | |
23 </change_format> | |
24 </data> | |
25 </outputs> | |
26 | |
27 <tests> | |
28 <test> | |
29 <!-- convertion fasta to tabular --> | |
30 <param name="output_format" value="tabular" /> | |
31 <param ftype="fasta" name="input" value="input.fa" /> | |
32 <output file="output.tab" name="output" /> | |
33 </test> | |
34 <test> | |
35 <!-- convertion tabular to fasta --> | |
36 <param name="output_format" value="fasta" /> | |
37 <param ftype="tabular" name="input" value="output.tab" /> | |
38 <output file="input.sorted.fa" name="output" sort="True"/> | |
39 </test> | |
40 <test> | |
41 <!-- convertion fastaw to tabular --> | |
42 <param name="output_format" value="tabular" /> | |
43 <param ftype="fasta" name="input" value="output.faw" /> | |
44 <output file="output.sorted.tab" name="output" sort="True"/> | |
45 </test> | |
46 <test> | |
47 <!-- convertion tabular to fastaw --> | |
48 <param name="output_format" value="fastaw" /> | |
49 <param ftype="tabular" name="input" value="output.tab" /> | |
50 <output file="output.sorted.faw" name="output" sort="True" /> | |
51 </test> | |
52 <test> | |
53 <!-- convertion fasta to fastaw --> | |
54 <param name="output_format" value="fastaw" /> | |
55 <param ftype="fasta" name="input" value="input.fa" /> | |
56 <output file="output.sorted.faw" name="output" sort="True" /> | |
57 </test> | |
58 <test> | |
59 <!-- convertion fastaw to fasta --> | |
60 <param name="output_format" value="fasta" /> | |
61 <param ftype="fasta" name="input" value="output.faw" /> | |
62 <output file="input.sorted.fa" name="output" sort="True" /> | |
63 </test> | |
64 <test> | |
65 <!-- convertion fastq to tabular --> | |
66 <param name="output_format" value="tabular" /> | |
67 <param ftype="fastq" name="input" value="input.fastqsanger" /> | |
68 <output file="fastqTotabular.sorted.tab" name="output" sort="True" /> | |
69 </test> | |
70 <test> | |
71 <!-- convertion fastq to fasta --> | |
72 <param name="output_format" value="fasta" /> | |
73 <param ftype="fasta" name="input" value="input.fastqsanger" /> | |
74 <output file="fastqTofasta.sorted.fa" name="output" sort="True" /> | |
75 </test> | |
76 <test> | |
77 <!-- convertion fastq to fastaw --> | |
78 <param name="output_format" value="fastaw" /> | |
79 <param ftype="fasta" name="input" value="input.fastqsanger" /> | |
80 <output file="fastqTofastaw.sorted.faw" name="output" sort="True" /> | |
81 </test> | |
82 </tests> | |
83 | |
84 | |
85 <help> | |
86 | |
87 **What it does** | |
88 | |
89 The tool performs all pairwise conversions between sequence formats fasta, fastaw and tabular. | |
90 | |
91 The tool is also able to convert fastq format in any of the formats fasta, fastaw and tabular. | |
92 | |
93 The format of the input is automatically detected by the tool. | |
94 | |
95 **Formats** | |
96 | |
97 *Fasta* | |
98 | |
99 >id1 | |
100 | |
101 ATGCATGACCAGATAGGAC | |
102 | |
103 >id2 | |
104 | |
105 ATGCATGACCAGATAGGAC | |
106 | |
107 Note that the tool handles fasta sequences over multiple lines | |
108 | |
109 | |
110 ---------- | |
111 | |
112 *Fastaw* | |
113 | |
114 Allows to reduce the size of a fasta file of sequence reads: | |
115 | |
116 >id1_n1 | |
117 | |
118 ATGCATGACCAGATAGGAC | |
119 | |
120 >id2_n2 | |
121 | |
122 ATGCATGACCAGATAGGAC | |
123 | |
124 etc... | |
125 | |
126 Here n1 and n2 are integers that indicate the number of reads of the sequence found in the sequencing dataset | |
127 | |
128 Note that if 2 fastaw files are merged (e.g. by concatenation), the values of the number of reads are wrong. | |
129 | |
130 These values can simply be re-computed by submitting the merged file to a fastaw conversion with the *sequence_format_converter* tool ! | |
131 | |
132 | |
133 ---------- | |
134 | |
135 *Tabular* | |
136 | |
137 Is a tabular version of fastaw without fasta headers: | |
138 | |
139 column 1 column2 | |
140 | |
141 ATGCATGACCAGATAGGAC n1 | |
142 | |
143 ATGCATGACCAGATAGGAC n2 | |
144 | |
145 | |
146 ---------- | |
147 | |
148 *Fastq* | |
149 | |
150 @HWI-1 | |
151 | |
152 ATGCATGACCAGATAGGAC | |
153 | |
154 \+ | |
155 | |
156 BBBA;ACB9ABCBABB@@/ | |
157 | |
158 @HWI-2 | |
159 | |
160 ATGCATGACCAGATAGGAC | |
161 | |
162 \+ | |
163 | |
164 ?03@?82?B>C@B>@CC?0 | |
165 | |
166 | |
167 </help> | |
168 | |
169 </tool> |