comparison tools/fastq/fastq_groomer.xml @ 0:9071e359b9a3

Uploaded
author xuebing
date Fri, 09 Mar 2012 19:37:19 -0500
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:9071e359b9a3
1 <tool id="fastq_groomer" name="FASTQ Groomer" version="1.0.4">
2 <description>convert between various FASTQ quality formats</description>
3 <command interpreter="python">fastq_groomer.py '$input_file' '$input_type' '$output_file'
4 #if str( $options_type['options_type_selector'] ) == 'basic':
5 #if str( $input_type ) == 'cssanger':
6 'cssanger'
7 #else:
8 'sanger'
9 #end if
10 'ascii' 'summarize_input'
11 #else:
12 '${options_type.output_type}' '${options_type.force_quality_encoding}' '${options_type.summarize_input}'
13 #end if
14 </command>
15 <inputs>
16 <param name="input_file" type="data" format="fastq" label="File to groom" />
17 <param name="input_type" type="select" label="Input FASTQ quality scores type">
18 <option value="solexa">Solexa</option>
19 <option value="illumina">Illumina 1.3+</option>
20 <option value="sanger" selected="True">Sanger</option>
21 <option value="cssanger">Color Space Sanger</option>
22 </param>
23 <conditional name="options_type">
24 <param name="options_type_selector" type="select" label="Advanced Options">
25 <option value="basic" selected="True">Hide Advanced Options</option>
26 <option value="advanced">Show Advanced Options</option>
27 </param>
28 <when value="basic">
29 <!-- no options -->
30 </when>
31 <when value="advanced">
32 <param name="output_type" type="select" label="Output FASTQ quality scores type" help="Galaxy tools are designed to work with the Sanger Quality score format.">
33 <option value="solexa">Solexa</option>
34 <option value="illumina">Illumina 1.3+</option>
35 <option value="sanger" selected="True">Sanger (recommended)</option>
36 <option value="cssanger">Color Space Sanger</option>
37 </param>
38 <param name="force_quality_encoding" type="select" label="Force Quality Score encoding">
39 <option value="None">Use Source Encoding</option>
40 <option value="ascii" selected="True">ASCII</option>
41 <option value="decimal">Decimal</option>
42 </param>
43 <param name="summarize_input" type="select" label="Summarize input data">
44 <option value="summarize_input" selected="True">Summarize Input</option>
45 <option value="dont_summarize_input">Do not Summarize Input (faster)</option>
46 </param>
47 </when>
48 </conditional>
49 </inputs>
50 <outputs>
51 <data name="output_file" format="fastqsanger">
52 <change_format>
53 <when input="input_type" value="cssanger" format="fastqcssanger" />
54 <when input="options_type.output_type" value="solexa" format="fastqsolexa" />
55 <when input="options_type.output_type" value="illumina" format="fastqillumina" />
56 <when input="options_type.output_type" value="sanger" format="fastqsanger" />
57 <when input="options_type.output_type" value="cssanger" format="fastqcssanger" />
58 </change_format>
59 </data>
60 </outputs>
61 <tests>
62 <!-- These tests include test files adapted from supplemental material in Cock PJ, Fields CJ, Goto N, Heuer ML, Rice PM. The Sanger FASTQ file format for sequences with quality scores, and the Solexa/Illumina FASTQ variants. Nucleic Acids Res. 2009 Dec 16. -->
63 <!-- Unfortunately, cannot test for expected failures -->
64 <!-- Test basic options -->
65 <test>
66 <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastq" />
67 <param name="input_type" value="sanger" />
68 <param name="options_type_selector" value="basic" />
69 <output name="output_file" file="sanger_full_range_original_sanger.fastqsanger" />
70 </test>
71 <test>
72 <param name="input_file" value="sanger_full_range_as_cssanger.fastqcssanger" ftype="fastq" />
73 <param name="input_type" value="cssanger" />
74 <param name="options_type_selector" value="basic" />
75 <output name="output_file" file="sanger_full_range_as_cssanger.fastqcssanger" />
76 </test>
77 <test>
78 <param name="input_file" value="illumina_full_range_original_illumina.fastqillumina" ftype="fastq" />
79 <param name="input_type" value="illumina" />
80 <param name="options_type_selector" value="basic" />
81 <output name="output_file" file="illumina_full_range_as_sanger.fastqsanger" />
82 </test>
83 <test>
84 <param name="input_file" value="solexa_full_range_original_solexa.fastqsolexa" ftype="fastq" />
85 <param name="input_type" value="solexa" />
86 <param name="options_type_selector" value="basic" />
87 <output name="output_file" file="solexa_full_range_as_sanger.fastqsanger" />
88 </test>
89 <test>
90 <param name="input_file" value="sanger_full_range_as_illumina.fastqillumina" ftype="fastq" />
91 <param name="input_type" value="sanger" />
92 <param name="options_type_selector" value="basic" />
93 <output name="output_file" file="sanger_full_range_as_illumina.fastqillumina" />
94 </test>
95 <!-- Test grooming from illumina -->
96 <test>
97 <param name="input_file" value="illumina_full_range_original_illumina.fastqillumina" ftype="fastq" />
98 <param name="input_type" value="illumina" />
99 <param name="options_type_selector" value="advanced" />
100 <param name="output_type" value="illumina" />
101 <param name="force_quality_encoding" value="None" />
102 <param name="summarize_input" value="summarize_input" />
103 <output name="output_file" file="illumina_full_range_original_illumina.fastqillumina" />
104 </test>
105 <test>
106 <param name="input_file" value="illumina_full_range_original_illumina.fastqillumina" ftype="fastq" />
107 <param name="input_type" value="illumina" />
108 <param name="options_type_selector" value="advanced" />
109 <param name="output_type" value="sanger" />
110 <param name="force_quality_encoding" value="None" />
111 <param name="summarize_input" value="summarize_input" />
112 <output name="output_file" file="illumina_full_range_as_sanger.fastqsanger" />
113 </test>
114 <test>
115 <param name="input_file" value="illumina_full_range_original_illumina.fastqillumina" ftype="fastq" />
116 <param name="input_type" value="illumina" />
117 <param name="options_type_selector" value="advanced" />
118 <param name="output_type" value="solexa" />
119 <param name="force_quality_encoding" value="None" />
120 <param name="summarize_input" value="summarize_input" />
121 <output name="output_file" file="illumina_full_range_as_solexa.fastqsolexa" />
122 </test>
123 <test>
124 <param name="input_file" value="illumina_full_range_original_illumina.fastqillumina" ftype="fastq" />
125 <param name="input_type" value="illumina" />
126 <param name="options_type_selector" value="advanced" />
127 <param name="output_type" value="cssanger" />
128 <param name="force_quality_encoding" value="None" />
129 <param name="summarize_input" value="summarize_input" />
130 <output name="output_file" file="illumina_full_range_as_cssanger.fastqcssanger" />
131 </test>
132 <!-- Test grooming from sanger -->
133 <test>
134 <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastq" />
135 <param name="input_type" value="sanger" />
136 <param name="options_type_selector" value="advanced" />
137 <param name="output_type" value="sanger" />
138 <param name="force_quality_encoding" value="None" />
139 <param name="summarize_input" value="summarize_input" />
140 <output name="output_file" file="sanger_full_range_original_sanger.fastqsanger" />
141 </test>
142 <test>
143 <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastq" />
144 <param name="input_type" value="sanger" />
145 <param name="options_type_selector" value="advanced" />
146 <param name="output_type" value="illumina" />
147 <param name="force_quality_encoding" value="None" />
148 <param name="summarize_input" value="summarize_input" />
149 <output name="output_file" file="sanger_full_range_as_illumina.fastqillumina" />
150 </test>
151 <test>
152 <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastq" />
153 <param name="input_type" value="sanger" />
154 <param name="options_type_selector" value="advanced" />
155 <param name="output_type" value="solexa" />
156 <param name="force_quality_encoding" value="None" />
157 <param name="summarize_input" value="summarize_input" />
158 <output name="output_file" file="sanger_full_range_as_solexa.fastqsolexa" />
159 </test>
160 <test>
161 <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastq" />
162 <param name="input_type" value="sanger" />
163 <param name="options_type_selector" value="advanced" />
164 <param name="output_type" value="cssanger" />
165 <param name="force_quality_encoding" value="None" />
166 <param name="summarize_input" value="summarize_input" />
167 <output name="output_file" file="sanger_full_range_as_cssanger.fastqcssanger" />
168 </test>
169 <!-- Test grooming from solexa -->
170 <test>
171 <param name="input_file" value="solexa_full_range_original_solexa.fastqsolexa" ftype="fastq" />
172 <param name="input_type" value="solexa" />
173 <param name="options_type_selector" value="advanced" />
174 <param name="output_type" value="solexa" />
175 <param name="force_quality_encoding" value="None" />
176 <param name="summarize_input" value="summarize_input" />
177 <output name="output_file" file="solexa_full_range_original_solexa.fastqsolexa" />
178 </test>
179 <test>
180 <param name="input_file" value="solexa_full_range_original_solexa.fastqsolexa" ftype="fastq" />
181 <param name="input_type" value="solexa" />
182 <param name="options_type_selector" value="advanced" />
183 <param name="output_type" value="illumina" />
184 <param name="force_quality_encoding" value="None" />
185 <param name="summarize_input" value="summarize_input" />
186 <output name="output_file" file="solexa_full_range_as_illumina.fastqillumina" />
187 </test>
188 <test>
189 <param name="input_file" value="solexa_full_range_original_solexa.fastqsolexa" ftype="fastq" />
190 <param name="input_type" value="solexa" />
191 <param name="options_type_selector" value="advanced" />
192 <param name="output_type" value="sanger" />
193 <param name="force_quality_encoding" value="None" />
194 <param name="summarize_input" value="summarize_input" />
195 <output name="output_file" file="solexa_full_range_as_sanger.fastqsanger" />
196 </test>
197 <test>
198 <param name="input_file" value="solexa_full_range_original_solexa.fastqsolexa" ftype="fastq" />
199 <param name="input_type" value="solexa" />
200 <param name="options_type_selector" value="advanced" />
201 <param name="output_type" value="cssanger" />
202 <param name="force_quality_encoding" value="None" />
203 <param name="summarize_input" value="summarize_input" />
204 <output name="output_file" file="solexa_full_range_as_cssanger.fastqcssanger" />
205 </test>
206 <!-- Test grooming from cssanger -->
207 <test>
208 <param name="input_file" value="sanger_full_range_as_cssanger.fastqcssanger" ftype="fastq" />
209 <param name="input_type" value="cssanger" />
210 <param name="options_type_selector" value="advanced" />
211 <param name="output_type" value="cssanger" />
212 <param name="force_quality_encoding" value="None" />
213 <param name="summarize_input" value="summarize_input" />
214 <output name="output_file" file="sanger_full_range_as_cssanger.fastqcssanger" />
215 </test>
216 <test>
217 <param name="input_file" value="sanger_full_range_as_cssanger.fastqcssanger" ftype="fastq" />
218 <param name="input_type" value="cssanger" />
219 <param name="options_type_selector" value="advanced" />
220 <param name="output_type" value="sanger" />
221 <param name="force_quality_encoding" value="None" />
222 <param name="summarize_input" value="summarize_input" />
223 <output name="output_file" file="sanger_full_range_original_sanger.fastqsanger" />
224 </test>
225 <test>
226 <param name="input_file" value="sanger_full_range_as_cssanger.fastqcssanger" ftype="fastq" />
227 <param name="input_type" value="cssanger" />
228 <param name="options_type_selector" value="advanced" />
229 <param name="output_type" value="illumina" />
230 <param name="force_quality_encoding" value="None" />
231 <param name="summarize_input" value="summarize_input" />
232 <output name="output_file" file="sanger_full_range_as_illumina.fastqillumina" />
233 </test>
234 <test>
235 <param name="input_file" value="sanger_full_range_as_cssanger.fastqcssanger" ftype="fastq" />
236 <param name="input_type" value="cssanger" />
237 <param name="options_type_selector" value="advanced" />
238 <param name="output_type" value="solexa" />
239 <param name="force_quality_encoding" value="None" />
240 <param name="summarize_input" value="summarize_input" />
241 <output name="output_file" file="sanger_full_range_as_solexa.fastqsolexa" />
242 </test>
243 <test>
244 <param name="input_file" value="sanger_full_range_as_cssanger_adapter_base_with_quality_score.fastqcssanger_fake_score" ftype="fastq" />
245 <param name="input_type" value="cssanger" />
246 <param name="options_type_selector" value="advanced" />
247 <param name="output_type" value="cssanger" />
248 <param name="force_quality_encoding" value="None" />
249 <param name="summarize_input" value="summarize_input" />
250 <output name="output_file" file="sanger_full_range_as_cssanger.fastqcssanger" />
251 </test>
252 <!-- Test fastq with line wrapping -->
253 <test>
254 <param name="input_file" value="wrapping_original_sanger.fastqsanger" ftype="fastq" />
255 <param name="input_type" value="sanger" />
256 <param name="options_type_selector" value="advanced" />
257 <param name="output_type" value="sanger" />
258 <param name="force_quality_encoding" value="None" />
259 <param name="summarize_input" value="summarize_input" />
260 <output name="output_file" file="wrapping_as_sanger.fastqsanger" />
261 </test>
262 <test>
263 <param name="input_file" value="wrapping_original_sanger.fastqsanger" ftype="fastq" />
264 <param name="input_type" value="sanger" />
265 <param name="options_type_selector" value="advanced" />
266 <param name="output_type" value="illumina" />
267 <param name="force_quality_encoding" value="None" />
268 <param name="summarize_input" value="summarize_input" />
269 <output name="output_file" file="wrapping_as_illumina.fastqillumina" />
270 </test>
271 <test>
272 <param name="input_file" value="wrapping_original_sanger.fastqsanger" ftype="fastq" />
273 <param name="input_type" value="sanger" />
274 <param name="options_type_selector" value="advanced" />
275 <param name="output_type" value="solexa" />
276 <param name="force_quality_encoding" value="None" />
277 <param name="summarize_input" value="summarize_input" />
278 <output name="output_file" file="wrapping_as_solexa.fastqsolexa" />
279 </test>
280 <!-- Test forcing quality score encoding -->
281 <!-- Sanger, range 0 - 93 -->
282 <test>
283 <param name="input_file" value="sanger_full_range_as_decimal_sanger.fastqsanger" ftype="fastq" />
284 <param name="input_type" value="sanger" />
285 <param name="options_type_selector" value="advanced" />
286 <param name="output_type" value="sanger" />
287 <param name="force_quality_encoding" value="ascii" />
288 <param name="summarize_input" value="summarize_input" />
289 <output name="output_file" file="sanger_full_range_original_sanger.fastqsanger" />
290 </test>
291 <test>
292 <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastq" />
293 <param name="input_type" value="sanger" />
294 <param name="options_type_selector" value="advanced" />
295 <param name="output_type" value="sanger" />
296 <param name="force_quality_encoding" value="decimal" />
297 <param name="summarize_input" value="summarize_input" />
298 <output name="output_file" file="sanger_full_range_as_decimal_sanger.fastqsanger" />
299 </test>
300 <test>
301 <param name="input_file" value="sanger_full_range_as_tab_decimal_sanger.fastqsanger" ftype="fastq" />
302 <param name="input_type" value="sanger" />
303 <param name="options_type_selector" value="advanced" />
304 <param name="output_type" value="sanger" />
305 <param name="force_quality_encoding" value="ascii" />
306 <param name="summarize_input" value="summarize_input" />
307 <output name="output_file" file="sanger_full_range_original_sanger.fastqsanger" />
308 </test>
309 <!-- Solexa, range -5 - 62 -->
310 <test>
311 <param name="input_file" value="solexa_full_range_as_decimal_solexa.fastqsolexa" ftype="fastq" />
312 <param name="input_type" value="solexa" />
313 <param name="options_type_selector" value="advanced" />
314 <param name="output_type" value="solexa" />
315 <param name="force_quality_encoding" value="ascii" />
316 <param name="summarize_input" value="summarize_input" />
317 <output name="output_file" file="solexa_full_range_original_solexa.fastqsolexa" />
318 </test>
319 <test>
320 <param name="input_file" value="solexa_full_range_original_solexa.fastqsolexa" ftype="fastq" />
321 <param name="input_type" value="solexa" />
322 <param name="options_type_selector" value="advanced" />
323 <param name="output_type" value="solexa" />
324 <param name="force_quality_encoding" value="decimal" />
325 <param name="summarize_input" value="summarize_input" />
326 <output name="output_file" file="solexa_full_range_as_decimal_solexa.fastqsolexa" />
327 </test>
328 </tests>
329 <help>
330 **What it does**
331
332 This tool offers several conversions options relating to the FASTQ format.
333
334 When using *Basic* options, the output will be *sanger* formatted or *cssanger* formatted (when the input is Color Space Sanger).
335
336 When converting, if a quality score falls outside of the target score range, it will be coerced to the closest available value (i.e. the minimum or maximum).
337
338 When converting between Solexa and the other formats, quality scores are mapped between Solexa and PHRED scales using the equations found in `Cock PJ, Fields CJ, Goto N, Heuer ML, Rice PM. The Sanger FASTQ file format for sequences with quality scores, and the Solexa/Illumina FASTQ variants. Nucleic Acids Res. 2009 Dec 16.`_
339
340 When converting between color space (csSanger) and base/sequence space (Sanger, Illumina, Solexa) formats, adapter bases are lost or gained; if gained, the base 'G' is used as the adapter. You cannot convert a color space read to base space if there is no adapter present in the color space sequence. Any masked or ambiguous nucleotides in base space will be converted to 'N's when determining color space encoding.
341
342 -----
343
344 **Quality Score Comparison**
345
346 ::
347
348 SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
349 ...............................IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
350 ..........................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
351 !"#$%&amp;'()*+,-./0123456789:;&lt;=&gt;?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
352 | | | | | |
353 33 59 64 73 104 126
354
355 S - Sanger Phred+33, 93 values (0, 93) (0 to 60 expected in raw reads)
356 I - Illumina 1.3 Phred+64, 62 values (0, 62) (0 to 40 expected in raw reads)
357 X - Solexa Solexa+64, 67 values (-5, 62) (-5 to 40 expected in raw reads)
358
359 Diagram adapted from http://en.wikipedia.org/wiki/FASTQ_format
360
361 ------
362
363 **Citation**
364
365 If you use this tool, please cite `Blankenberg D, Gordon A, Von Kuster G, Coraor N, Taylor J, Nekrutenko A; Galaxy Team. Manipulation of FASTQ data with Galaxy. Bioinformatics. 2010 Jul 15;26(14):1783-5. &lt;http://www.ncbi.nlm.nih.gov/pubmed/20562416&gt;`_
366
367
368 .. _Cock PJ, Fields CJ, Goto N, Heuer ML, Rice PM. The Sanger FASTQ file format for sequences with quality scores, and the Solexa/Illumina FASTQ variants. Nucleic Acids Res. 2009 Dec 16.: http://www.ncbi.nlm.nih.gov/pubmed/20015970
369
370 </help>
371 </tool>