comparison prinseq.xml @ 0:ba78b984a9eb draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/prinseq/ commit dd85747b08272b72c7161de9b18d19598bb49de1
author iuc
date Tue, 31 May 2016 07:43:42 -0400
parents
children 6b865dde1baa
comparison
equal deleted inserted replaced
-1:000000000000 0:ba78b984a9eb
1 <tool id="prinseq" name="PRINSEQ" version="0.1.0">
2 <description>to process quality of sequences</description>
3
4 <requirements>
5 <requirement type="package" version="5.18.1">perl</requirement>
6 <!--<requirement type="package" version="2.90">perl-json</requirement>
7 <requirement type="package" version="1.106">perl-cairo</requirement>-->
8 <requirement type="package" version="0.20.4">prinseq</requirement>
9 </requirements>
10
11 <stdio>
12 <exit_code range="1:" level="fatal" description="" />
13 <regex match="ERROR"
14 source="stderr"
15 level="fatal"
16 description="" />
17 <regex match="WARNING"
18 source="stderr"
19 level="warning"
20 description="" />
21 </stdio>
22
23 <version_command>
24 <![CDATA[
25 prinseq-lite.pl --version
26 ]]>
27 </version_command>
28
29 <command>
30 <![CDATA[
31 mkdir tmp/
32
33 &&
34
35 prinseq-lite.pl
36 #if $seq_type.seq_type_opt == "single":
37 -fastq "$seq_type.input_singles"
38 #if $seq_type.input_singles.ext == "fastqillumina":
39 -phred64
40 #end if
41 #else:
42 -fastq "$seq_type.input_mate1"
43 -fastq2 "$seq_type.input_mate2"
44 #if $seq_type.input_mate1.ext != $seq_type.input_mate2.ext:
45 #import sys
46 #silent sys.stderr.write( 'Both pairs from your paired-end library need to be from the same filetype.' )
47 #end if
48 #if $seq_type.input_mate1.ext == "fastqillumina":
49 -phred64
50 #end if
51 #end if
52
53 -out_good "tmp/good_sequences"
54 -out_bad "tmp/rejected_sequences"
55
56 #if $filter_treatments.apply_filter_treatments == "true":
57 #set length_filter_treatments=$filter_treatments.length_filter_treatments
58 #if $length_filter_treatments.apply_length_filter_treatments == "true":
59 #set min_length_filter_treatments=$length_filter_treatments.min_length_filter_treatments
60 #if $min_length_filter_treatments.apply_min_length_filter_treatments == "true":
61 -min_len $min_length_filter_treatments.min_length_filter_treatment_value
62 #end if
63
64 #set max_length_filter_treatments=$length_filter_treatments.max_length_filter_treatments
65 #if $max_length_filter_treatments.apply_max_length_filter_treatments == "true":
66 -max_len $max_length_filter_treatments.max_length_filter_treatment_value
67 #end if
68 #end if
69
70 #set quality_filter_treatments=$filter_treatments.quality_filter_treatments
71 #if $quality_filter_treatments.apply_quality_filter_treatments == "true":
72 #set min_quality_filter_treatments=$quality_filter_treatments.min_quality_filter_treatments
73 #if $min_quality_filter_treatments.apply_min_quality_filter_treatments == "true":
74 -min_qual_score $min_quality_filter_treatments.min_quality_filter_treatment_value
75 #end if
76
77 #set max_quality_filter_treatments=$quality_filter_treatments.max_quality_filter_treatments
78 #if $max_quality_filter_treatments.apply_max_quality_filter_treatments == "true":
79 -max_qual_score $max_quality_filter_treatments.max_quality_filter_treatment_value
80 #end if
81
82 #set mean_quality_filter_treatments=$quality_filter_treatments.mean_quality_filter_treatments
83 #if $mean_quality_filter_treatments.apply_mean_quality_filter_treatments == "true":
84 #set min_mean_quality_filter_treatments=$mean_quality_filter_treatments.min_mean_quality_filter_treatments
85 #if $min_mean_quality_filter_treatments.apply_min_mean_quality_filter_treatments == "true":
86 -min_qual_mean $min_mean_quality_filter_treatments.min_mean_quality_filter_treatment_value
87 #end if
88
89 #set max_mean_quality_filter_treatments=$mean_quality_filter_treatments.max_mean_quality_filter_treatments
90 #if $max_mean_quality_filter_treatments.apply_max_mean_quality_filter_treatments == "true":
91 -max_qual_mean $max_mean_quality_filter_treatments.max_mean_quality_filter_treatment_value
92 #end if
93 #end if
94 #end if
95
96 #set base_content_filter_treatments=$filter_treatments.base_content_filter_treatments
97 #if $base_content_filter_treatments.apply_base_content_filter_treatments == "true":
98 #set GC_perc_content_filter_treatments=$base_content_filter_treatments.GC_perc_content_filter_treatments
99 #if $GC_perc_content_filter_treatments.apply_GC_perc_content_filter_treatments == "true":
100 #set min_GC_perc_content_filter_treatments=$GC_perc_content_filter_treatments.min_GC_perc_content_filter_treatments
101 #if $min_GC_perc_content_filter_treatments.apply_min_GC_perc_content_filter_treatments == "true":
102 -min_gc $min_GC_perc_content_filter_treatments.min_GC_perc_content_filter_treatment_value
103 #end if
104
105 #set max_GC_perc_content_filter_treatments=$GC_perc_content_filter_treatments.max_GC_perc_content_filter_treatments
106 #if $max_GC_perc_content_filter_treatments.apply_max_GC_perc_content_filter_treatments == "true":
107 -max_gc $max_GC_perc_content_filter_treatments.max_GC_perc_content_filter_treatment_value
108 #end if
109 #end if
110
111 #set N_number_content_filter_treatments=$base_content_filter_treatments.N_number_content_filter_treatments
112 #if $N_number_content_filter_treatments.apply_N_number_content_filter_treatments == "true":
113 -ns_max_n $N_number_content_filter_treatments.N_number_content_filter_treatment_value
114 #end if
115
116 #set N_percentage_content_filter_treatments=$base_content_filter_treatments.N_percentage_content_filter_treatments
117 #if $N_percentage_content_filter_treatments.apply_N_percentage_content_filter_treatments == "true":
118 -ns_max_p $N_percentage_content_filter_treatments.N_percentage_content_filter_treatment_value
119 #end if
120
121 $base_content_filter_treatments.apply_other_base_content_filter_treatments
122 #end if
123
124 #set complexity_filter_treatments=$filter_treatments.complexity_filter_treatments
125 #if $complexity_filter_treatments.apply_complexity_filter_treatments == "true":
126 -lc_method $complexity_filter_treatments.method_complexity_filter_treatments
127 -lc_threshold $complexity_filter_treatments.threshold_complexity_filter_treatments
128 #end if
129
130 #end if
131
132 #if $trimming_treatments.apply_trimming_treatments == "true":
133 #set length_trimming_treatments=$trimming_treatments.length_trimming_treatments
134 #if $length_trimming_treatments.apply_length_trimming_treatments == "true":
135 -trim_to_len $length_trimming_treatments.length_trimming_treatment_value
136 #end if
137
138 #set position_trimming_treatments=$trimming_treatments.position_trimming_treatments
139 #if $position_trimming_treatments.apply_position_trimming_treatments == "true":
140 #set nb_position_trimming_treatments=$position_trimming_treatments.nb_position_trimming_treatments
141 #if $nb_position_trimming_treatments.apply_nb_position_trimming_treatments == "true":
142 #set left_position_trimming_treatments=$nb_position_trimming_treatments.left_position_trimming_treatments
143 #if $left_position_trimming_treatments.apply_left_position_trimming_treatments == "true":
144 -trim_left $left_position_trimming_treatments.left_position_trimming_treatment_value
145 #end if
146
147 #set right_position_trimming_treatments=$nb_position_trimming_treatments.right_position_trimming_treatments
148 #if $right_position_trimming_treatments.apply_right_position_trimming_treatments == "true":
149 -trim_right $right_position_trimming_treatments.right_position_trimming_treatment_value
150 #end if
151 #end if
152
153 #set percentage_position_trimming_treatments=$position_trimming_treatments.percentage_position_trimming_treatments
154 #if $percentage_position_trimming_treatments.apply_percentage_position_trimming_treatments == "true":
155 #set left_percentage_position_trimming_treatments=$percentage_position_trimming_treatments.left_percentage_position_trimming_treatments
156 #if $left_percentage_position_trimming_treatments.apply_left_percentage_position_trimming_treatments == "true":
157 -trim_left_p $left_percentage_position_trimming_treatments.left_percentage_position_trimming_treatment_value
158 #end if
159
160 #set right_percentage_position_trimming_treatments=$percentage_position_trimming_treatments.right_percentage_position_trimming_treatments
161 #if $right_percentage_position_trimming_treatments.apply_right_percentage_position_trimming_treatments == "true":
162 -trim_right_p $right_percentage_position_trimming_treatments.right_percentage_position_trimming_treatment_value
163 #end if
164 #end if
165 #end if
166
167 #set tail_trimming_treatments=$trimming_treatments.tail_trimming_treatments
168 #if $tail_trimming_treatments.apply_tail_trimming_treatments == "true":
169 #set a_t_tail_trimming_treatments=$tail_trimming_treatments.a_t_tail_trimming_treatments
170 #if $a_t_tail_trimming_treatments.apply_a_t_tail_trimming_treatments == "true":
171 #set left_a_t_tail_trimming_treatments=$a_t_tail_trimming_treatments.left_a_t_tail_trimming_treatments
172 #if $left_a_t_tail_trimming_treatments.apply_left_a_t_tail_trimming_treatments == "true":
173 -trim_tail_left $left_a_t_tail_trimming_treatments.left_a_t_tail_trimming_treatment_value
174 #end if
175
176 #set right_a_t_tail_trimming_treatments=$a_t_tail_trimming_treatments.right_a_t_tail_trimming_treatments
177 #if $right_a_t_tail_trimming_treatments.apply_right_a_t_tail_trimming_treatments == "true":
178 -trim_tail_right $right_a_t_tail_trimming_treatments.right_a_t_tail_trimming_treatment_value
179 #end if
180 #end if
181
182 #set ns_tail_trimming_treatments=$tail_trimming_treatments.ns_tail_trimming_treatments
183 #if $ns_tail_trimming_treatments.apply_ns_tail_trimming_treatments == "true":
184 #set left_ns_tail_trimming_treatments=$ns_tail_trimming_treatments.left_ns_tail_trimming_treatments
185 #if $left_ns_tail_trimming_treatments.apply_left_ns_tail_trimming_treatments == "true":
186 -trim_ns_left $left_ns_tail_trimming_treatments.left_ns_tail_trimming_treatment_value
187 #end if
188
189 #set right_ns_tail_trimming_treatments=$ns_tail_trimming_treatments.right_ns_tail_trimming_treatments
190 #if $right_ns_tail_trimming_treatments.apply_right_ns_tail_trimming_treatments == "true":
191 -trim_ns_right $right_ns_tail_trimming_treatments.right_ns_tail_trimming_treatment_value
192 #end if
193 #end if
194 #end if
195
196 #set quality_trimming_treatments=$trimming_treatments.quality_trimming_treatments
197 #if $quality_trimming_treatments.apply_quality_trimming_treatments == "true":
198 #set left_quality_trimming_treatments=$quality_trimming_treatments.left_quality_trimming_treatments
199 #if $left_quality_trimming_treatments.apply_left_quality_trimming_treatments == "true":
200 -trim_qual_left $left_quality_trimming_treatments.left_quality_trimming_treatment_value
201 #end if
202
203 #set right_quality_trimming_treatments=$quality_trimming_treatments.right_quality_trimming_treatments
204 #if $right_quality_trimming_treatments.apply_right_quality_trimming_treatments == "true":
205 -trim_qual_right $right_quality_trimming_treatments.right_quality_trimming_treatment_value
206 #end if
207
208 -trim_qual_type $quality_trimming_treatments.type_quality_trimming_treatments
209 -trim_qual_rule $quality_trimming_treatments.rule_quality_trimming_treatments
210 -trim_qual_window $quality_trimming_treatments.window_quality_trimming_treatments
211 -trim_qual_step $quality_trimming_treatments.step_quality_trimming_treatments
212 #end if
213
214 #end if
215
216 #*
217 -graph_stats "$graph_stats"
218 -graph_data tmp/stats.gd
219
220
221 &&
222
223 prinseq-graphs-noPCA.pl -i "tmp/stats.gd" -html_all -o stats_html
224 *#
225 ]]>
226 </command>
227
228 <inputs>
229 <conditional name="seq_type">
230 <param name="seq_type_opt" type="select" label="Is this library paired- or single-end?">
231 <option value="single" selected="true">Single-end</option>
232 <option value="paired">Paired-end</option>
233 </param>
234 <when value="single">
235 <param name="input_singles" type="data" format="fastqsanger,fastqillumina,fastq" label="FASTQ file" help="FASTQ files." />
236 </when>
237 <when value="paired">
238 <param name="input_mate1" type="data" format="fastqsanger,fastqillumina,fastq" label="FASTQ file" help="FASTQ files." />
239 <param name="input_mate2" type="data" format="fastqsanger,fastqillumina,fastq" label="FASTQ file" help="FASTQ files." />
240 </when>
241 </conditional>
242
243 <conditional name="filter_treatments">
244 <param name="apply_filter_treatments" type="select" label="Apply filter treatments?">
245 <option value="true" selected="true">Yes</option>
246 <option value="false">No</option>
247 </param>
248 <when value="true">
249 <conditional name="length_filter_treatments">
250 <param name="apply_length_filter_treatments" type="select" label="Filter sequence based on their length?" help="By default, sequences smaller than 60 bp are removed. No top threshold is defined">
251 <option value="true" selected="true">Yes</option>
252 <option value="false">No</option>
253 </param>
254 <when value="true">
255 <conditional name="min_length_filter_treatments">
256 <param name="apply_min_length_filter_treatments" type="select" label="Filter too small sequences?" help="By default, sequences smaller than 60 bp are removed.">
257 <option value="true" selected="true">Yes</option>
258 <option value="false">No</option>
259 </param>
260 <when value="true">
261 <param name="min_length_filter_treatment_value" type="integer" min="0" max="3000" value="60" label="Minimum length threshold to conserve sequences" help="(-min_len)"/>
262 </when>
263 <when value="false" />
264 </conditional>
265 <conditional name="max_length_filter_treatments">
266 <param name="apply_max_length_filter_treatments" type="select" label="Filter too big sequences?" help="By default, no treatment based on a maximal length is made.">
267 <option value="true">Yes</option>
268 <option value="false" selected="true">No</option>
269 </param>
270 <when value="true">
271 <param name="max_length_filter_treatment_value" type="integer" min="0" max="3000" value="1000" label="Maximal length threshold to conserve sequences" help="(-max_len)"/>
272 </when>
273 <when value="false" />
274 </conditional>
275 </when>
276 <when value="false" />
277 </conditional>
278 <conditional name="quality_filter_treatments">
279 <param name="apply_quality_filter_treatments" type="select" label="Filter sequences based on quality score?" help="By default, sequences with a mean score below 15 are removed.">
280 <option value="true" selected="true">Yes</option>
281 <option value="false">No</option>
282 </param>
283 <when value="true">
284 <conditional name="min_quality_filter_treatments">
285 <param name="apply_min_quality_filter_treatments" type="select" label="Filter sequences based on their minimum score?" help="By default, no treatment based on a minimum score is made.">
286 <option value="true">Yes</option>
287 <option value="false" selected="true">No</option>
288 </param>
289 <when value="true">
290 <param name="min_quality_filter_treatment_value" type="integer" min="0" max="40" value="2" label="Minimum score threshold to conserve sequences" help="(-min_qual_score)"/>
291 </when>
292 <when value="false" />
293 </conditional>
294 <conditional name="max_quality_filter_treatments">
295 <param name="apply_max_quality_filter_treatments" type="select" label="Filter sequences based on their maximum score?" help="By default, no treatment based on a minimum score is made.">
296 <option value="true">Yes</option>
297 <option value="false" selected="true">No</option>
298 </param>
299 <when value="true">
300 <param name="max_quality_filter_treatment_value" type="integer" min="0" max="40" value="38" label="Maximum score threshold to conserve sequences" help="(-max_qual_score)"/>
301 </when>
302 <when value="false" />
303 </conditional>
304 <conditional name="mean_quality_filter_treatments">
305 <param name="apply_mean_quality_filter_treatments" type="select" label="Filter sequences based on their mean score?" help="By default, sequences with a mean score below 15 are removed.">
306 <option value="true" selected="true">Yes</option>
307 <option value="false">No</option>
308 </param>
309 <when value="true">
310 <conditional name="min_mean_quality_filter_treatments">
311 <param name="apply_min_mean_quality_filter_treatments" type="select" label="Filter sequences based with too small mean score?" help="By default, sequences with a mean score below 15 are removed.">
312 <option value="true" selected="true">Yes</option>
313 <option value="false">No</option>
314 </param>
315 <when value="true">
316 <param name="min_mean_quality_filter_treatment_value" type="integer" min="0" max="40" value="15" label="Minimum mean score threshold to conserve sequences" help="(-min_qual_mean)"/>
317 </when>
318 <when value="false" />
319 </conditional>
320 <conditional name="max_mean_quality_filter_treatments">
321 <param name="apply_max_mean_quality_filter_treatments" type="select" label="Filter sequences based with too high mean score?" help="By default, no treatment based on a maximum mean score is made.">
322 <option value="true">Yes</option>
323 <option value="false" selected="true">No</option>
324 </param>
325 <when value="true">
326 <param name="max_mean_quality_filter_treatment_value" type="integer" min="0" max="40" value="40" label="Maximum mean score threshold to conserve sequences" help="(-max_qual_mean)"/>
327 </when>
328 <when value="false" />
329 </conditional>
330 </when>
331 <when value="false" />
332 </conditional>
333 </when>
334 <when value="false" />
335 </conditional>
336 <conditional name="base_content_filter_treatments">
337 <param name="apply_base_content_filter_treatments" type="select" label="Filter sequences based on their base content?" help="By default, sequences with more than 2% of N bases are removed.">
338 <option value="true" selected="true">Yes</option>
339 <option value="false">No</option>
340 </param>
341 <when value="true">
342 <conditional name="GC_perc_content_filter_treatments">
343 <param name="apply_GC_perc_content_filter_treatments" type="select" label="Filter sequences based on their GC percentage?" help="By default, no treatment based on GC percentage is made.">
344 <option value="true">Yes</option>
345 <option value="false" selected="true">No</option>
346 </param>
347 <when value="true">
348 <conditional name="min_GC_perc_content_filter_treatments">
349 <param name="apply_min_GC_perc_content_filter_treatments" type="select" label="Filter sequences with too small GC percentage?" help="By default, no treatment based on GC percentage is made.">
350 <option value="true">Yes</option>
351 <option value="false" selected="true">No</option>
352 </param>
353 <when value="true">
354 <param name="min_GC_perc_content_filter_treatment_value" type="integer" min="0" max="100" value="10" label="Minimal GC percentage threshold to conserve sequences" help="(-min_gc)"/>
355 </when>
356 <when value="false" />
357 </conditional>
358 <conditional name="max_GC_perc_content_filter_treatments">
359 <param name="apply_max_GC_perc_content_filter_treatments" type="select" label="Filter sequences with too high GC percentage?" help="By default, no treatment based on GC percentage is made.">
360 <option value="true">Yes</option>
361 <option value="false" selected="true">No</option>
362 </param>
363 <when value="true">
364 <param name="max_GC_perc_content_filter_treatment_value" type="integer" min="0" max="100" value="90" label="Maximal GC percentage threshold to conserve sequences" help="(-max_gc)"/>
365 </when>
366 <when value="false" />
367 </conditional>
368 </when>
369 <when value="false" />
370 </conditional>
371 <conditional name="N_number_content_filter_treatments">
372 <param name="apply_N_number_content_filter_treatments" type="select" label="Filter sequences based on their number of N bases?" help="By default, no treatment based on N number is made.">
373 <option value="true">Yes</option>
374 <option value="false" selected="true">No</option>
375 </param>
376 <when value="true">
377 <param name="N_number_content_filter_treatment_value" type="integer" min="0" max="3000" value="10" label="Maximal N number threshold to conserve sequences" help="(-ns_max_n)"/>
378 </when>
379 <when value="false" />
380 </conditional>
381 <conditional name="N_percentage_content_filter_treatments">
382 <param name="apply_N_percentage_content_filter_treatments" type="select" label="Filter sequences based on their percentage of N bases?" help="By default, sequences with more than 2% of N bases are removed.">
383 <option value="true" selected="true">Yes</option>
384 <option value="false">No</option>
385 </param>
386 <when value="true">
387 <param name="N_percentage_content_filter_treatment_value" type="integer" min="0" max="100" value="2" label="Maximal N percentage threshold to conserve sequences" help="(-ns_max_p)"/>
388 </when>
389 <when value="false" />
390 </conditional>
391 <param name='apply_other_base_content_filter_treatments' type='boolean' truevalue="-noniupac" falsevalue="" checked="false" label="Filter sequences with characters other than A, T, C, G and N?" help="By default, this treatment is not made. (-noniupac)"/>
392 </when>
393 <when value="false" />
394 </conditional>
395 <conditional name="complexity_filter_treatments">
396 <param name="apply_complexity_filter_treatments" type="select" label="Filter sequences based on their complexity?" help="By default, no complexity filter is applied.">
397 <option value="true">Yes</option>
398 <option value="false" selected="true">No</option>
399 </param>
400 <when value="true">
401 <param name="method_complexity_filter_treatments" type="select" display="radio" label="Method to filter low complexity sequences" help="(-lc_method)">
402 <option value="dust">Dust</option>
403 <option value="entropy" >Entropy</option>
404 </param>
405 <param name="threshold_complexity_filter_treatments" type="integer" min="0" max="100" value="2" label="Threshold value used to filter sequences by sequence complexity" help="The dust method uses the threshold as maximum allowed score and the entropy method as minimum allowed value.(-lc_threshold)"/>
406 </when>
407 <when value="false" />
408 </conditional>
409 </when>
410 <when value="false" />
411 </conditional>
412
413 <conditional name="trimming_treatments">
414 <param name="apply_trimming_treatments" type="select" label="Apply trimming treatments?" help="">
415 <option value="true" selected="true">Yes</option>
416 <option value="false">No</option>
417 </param>
418 <when value="true">
419 <conditional name="length_trimming_treatments">
420 <param name="apply_length_trimming_treatments" type="select" label="Trim all sequences from the 3'-end to a defined length?" help="By default, no length trimming is made">
421 <option value="true">Yes</option>
422 <option value="false" selected="true">No</option>
423 </param>
424 <when value="true">
425 <param name="length_trimming_treatment_value" type="integer" min="0" max="3000" value="100" label="Length of sequences after trimming" help="(-trim_to_len)"/>
426 </when>
427 <when value="false" />
428 </conditional>
429 <conditional name="position_trimming_treatments">
430 <param name="apply_position_trimming_treatments" type="select" label="Trim all sequences from the ends?" help="By default, no position trimming is made">
431 <option value="true">Yes</option>
432 <option value="false" selected="true">No</option>
433 </param>
434 <when value="true">
435 <conditional name="nb_position_trimming_treatments">
436 <param name="apply_nb_position_trimming_treatments" type="select" label="Trim sequences by a defined number of positions?" help="By default, no position trimming is made">
437 <option value="true">Yes</option>
438 <option value="false" selected="true">No</option>
439 </param>
440 <when value="true">
441 <conditional name="left_position_trimming_treatments">
442 <param name="apply_left_position_trimming_treatments" type="select" label="Trim sequences at the 5'-end by a defined number of positions?" help="By default, no position trimming is made">
443 <option value="true">Yes</option>
444 <option value="false" selected="true">No</option>
445 </param>
446 <when value="true">
447 <param name="left_position_trimming_treatment_value" type="integer" min="0" max="3000" value="100" label="Number of positions to trim on 5'-end" help="(-trim_left)"/>
448 </when>
449 <when value="false" />
450 </conditional>
451 <conditional name="right_position_trimming_treatments">
452 <param name="apply_right_position_trimming_treatments" type="select" label="Trim sequences at the 3'-end by a defined number of positions?" help="By default, no position trimming is made">
453 <option value="true">Yes</option>
454 <option value="false" selected="true">No</option>
455 </param>
456 <when value="true">
457 <param name="right_position_trimming_treatment_value" type="integer" min="0" max="3000" value="100" label="Number of positions to trim on 3'-end" help="(-trim_right)"/>
458 </when>
459 <when value="false" />
460 </conditional>
461 </when>
462 <when value="false" />
463 </conditional>
464 <conditional name="percentage_position_trimming_treatments">
465 <param name="apply_percentage_position_trimming_treatments" type="select" label="Trim sequences by a defined percentage of read length?" help="The trim length is rounded towards the lower integer. By default, no position trimming is made">
466 <option value="true">Yes</option>
467 <option value="false" selected="true">No</option>
468 </param>
469 <when value="true">
470 <conditional name="left_percentage_position_trimming_treatments">
471 <param name="apply_left_percentage_position_trimming_treatments" type="select" label="Trim sequences at the 5'-end by a defined percentage of read length?" help="The trim length is rounded towards the lower integer. By default, no position trimming is made">
472 <option value="true">Yes</option>
473 <option value="false" selected="true">No</option>
474 </param>
475 <when value="true">
476 <param name="left_percentage_position_trimming_treatment_value" type="integer" min="0" max="100" value="2" label="Percentage of positions to trim on 5'-end" help="(-trim_left_p)"/>
477 </when>
478 <when value="false" />
479 </conditional>
480 <conditional name="right_percentage_position_trimming_treatments">
481 <param name="apply_right_percentage_position_trimming_treatments" type="select" label="Trim sequences at the 3'-end by a defined percentage of read length?" help="The trim length is rounded towards the lower integer. By default, no position trimming is made">
482 <option value="true">Yes</option>
483 <option value="false" selected="true">No</option>
484 </param>
485 <when value="true">
486 <param name="right_percentage_position_trimming_treatment_value" type="integer" min="0" max="100" value="2" label="Percentage of positions to trim on 3'-end" help="(-trim_right_p)"/>
487 </when>
488 <when value="false" />
489 </conditional>
490 </when>
491 <when value="false" />
492 </conditional>
493 </when>
494 <when value="false" />
495 </conditional>
496 <conditional name="tail_trimming_treatments">
497 <param name="apply_tail_trimming_treatments" type="select" label="Trim tails?" help="By default, no tail trimming is made">
498 <option value="true">Yes</option>
499 <option value="false" selected="true">No</option>
500 </param>
501 <when value="true">
502 <conditional name="a_t_tail_trimming_treatments">
503 <param name="apply_a_t_tail_trimming_treatments" type="select" label="Trim poly-A/T tail?" help="By default, no poly-A/T tail trimming is made">
504 <option value="true">Yes</option>
505 <option value="false" selected="true">No</option>
506 </param>
507 <when value="true">
508 <conditional name="left_a_t_tail_trimming_treatments">
509 <param name="apply_left_a_t_tail_trimming_treatments" type="select" label="Trim poly-A/T tail at the 5'-end?" help="By default, no 5'-end poly-A/T tail trimming is made">
510 <option value="true">Yes</option>
511 <option value="false" selected="true">No</option>
512 </param>
513 <when value="true">
514 <param name="left_a_t_tail_trimming_treatment_value" type="integer" min="0" max="3000" value="100" label="Minimum length of poly-A/T to trim at the 5'-end" help="(-trim_tail_left)"/>
515 </when>
516 <when value="false" />
517 </conditional>
518 <conditional name="right_a_t_tail_trimming_treatments">
519 <param name="apply_right_a_t_tail_trimming_treatments" type="select" label="Trim poly-A/T tail at the 3'-end?" help="By default, no 3'-end poly-A/T tail trimming is made">
520 <option value="true">Yes</option>
521 <option value="false" selected="true">No</option>
522 </param>
523 <when value="true">
524 <param name="right_a_t_tail_trimming_treatment_value" type="integer" min="0" max="3000" value="100" label="Minimum length of poly-A/T to trim at the 5'-end" help="(-trim_tail_right)"/>
525 </when>
526 <when value="false" />
527 </conditional>
528 </when>
529 <when value="false" />
530 </conditional>
531 <conditional name="ns_tail_trimming_treatments">
532 <param name="apply_ns_tail_trimming_treatments" type="select" label="Trim poly-N tail?" help="By default, no poly-N tail trimming is made">
533 <option value="true">Yes</option>
534 <option value="false" selected="true">No</option>
535 </param>
536 <when value="true">
537 <conditional name="left_ns_tail_trimming_treatments">
538 <param name="apply_left_ns_tail_trimming_treatments" type="select" label="Trim poly-N tail at the 5'-end?" help="By default, no 5'-end poly-N tail trimming is made">
539 <option value="true">Yes</option>
540 <option value="false" selected="true">No</option>
541 </param>
542 <when value="true">
543 <param name="left_ns_tail_trimming_treatment_value" type="integer" min="0" max="3000" value="100" label="Minimum length of poly-N to trim at the 5'-end" help="(-trim_ns_left)"/>
544 </when>
545 <when value="false" />
546 </conditional>
547 <conditional name="right_ns_tail_trimming_treatments">
548 <param name="apply_right_ns_tail_trimming_treatments" type="select" label="Trim poly-N tail at the 3'-end?" help="By default, no 3'-end poly-N tail trimming is made">
549 <option value="true">Yes</option>
550 <option value="false" selected="true">No</option>
551 </param>
552 <when value="true">
553 <param name="right_ns_tail_trimming_treatment_value" type="integer" min="0" max="3000" value="100" label="Minimum length of poly-N to trim at the 5'-end" help="(-trim_ns_right)"/>
554 </when>
555 <when value="false" />
556 </conditional>
557 </when>
558 <when value="false" />
559 </conditional>
560 </when>
561 <when value="false" />
562 </conditional>
563 <conditional name="quality_trimming_treatments">
564 <param name="apply_quality_trimming_treatments" type="select" label="Trim sequence by quality score?" help="By default, a 3'-end trimming is made to remove ends with a minimum quality score over 5 bp below 20">
565 <option value="true" selected="true">Yes</option>
566 <option value="false">No</option>
567 </param>
568 <when value="true">
569 <conditional name="left_quality_trimming_treatments">
570 <param name="apply_left_quality_trimming_treatments" type="select" label="Trim sequence by quality score from the 5'-end?" help="By default, no 5'-end quality trimming is made">
571 <option value="true">Yes</option>
572 <option value="false" selected="true">No</option>
573 </param>
574 <when value="true">
575 <param name="left_quality_trimming_treatment_value" type="integer" min="0" max="40" value="20" label="Quality score threshold to trim positions" help="(-trim_qual_left)"/>
576 </when>
577 <when value="false" />
578 </conditional>
579 <conditional name="right_quality_trimming_treatments">
580 <param name="apply_right_quality_trimming_treatments" type="select" label="Trim sequence by quality score from the 3'-end?" help="By default, 3'-end trimming is made based on a score of 20">
581 <option value="true" selected="true">Yes</option>
582 <option value="false">No</option>
583 </param>
584 <when value="true">
585 <param name="right_quality_trimming_treatment_value" type="integer" min="0" max="40" value="20" label="Quality score threshold to trim positions" help="(-trim_qual_right)"/>
586 </when>
587 <when value="false" />
588 </conditional>
589 <param name="type_quality_trimming_treatments" type="select" display="radio" label="Type of quality score calculation to use" help="By default, min is used. (-trim_qual_type)">
590 <option value="min" selected="true">Mininum</option>
591 <option value="mean" >Mean</option>
592 <option value="max" >Max</option>
593 <option value="sum" >Sum</option>
594 </param>
595 <param name="rule_quality_trimming_treatments" type="select" display="radio" label="Rule tu use to compare quality score to calculated value" help="By default, 'less than' is used. (-trim_qual_rule)">
596 <option value="lt" selected="true">Less than</option>
597 <option value="gt" >Greater than</option>
598 <option value="et" >Equal to</option>
599 </param>
600 <param name="window_quality_trimming_treatments" type="integer" min="0" max="300" value="1" label="Size of the sliding window used to calculated quality score by type" help="To stop at the first base that fails the rule defined, use a window size of 1 (default value). (-trim_qual_window)"/>
601 <param name="step_quality_trimming_treatments" type="integer" min="0" max="300" value="1" label="Step size used to move the sliding window" help="To move the window over all quality scores without missing any, the step size sould be less or equal to the window size. The default value is 1. (-trim_qual_step)"/>
602 </when>
603 <when value="false" />
604 </conditional>
605 </when>
606 <when value="false" />
607 </conditional>
608
609 <!--<param name="graph_stats" type="select" multiple="True" label="Which statistics should be calculated included in the graph_data file" help="(-graph_stats)">
610 <option value="ld" selected="True">Length distribution</option>
611 <option value="gc" selected="True">GC content distribution</option>
612 <option value="qd" selected="True">Base quality distribution</option>
613 <option value="ns" selected="True">Occurence of N</option>
614 <option value="pt" selected="True">Poly-A/T tails</option>
615 <option value="ts" selected="True">Tag sequence check</option>
616 <option value="aq" selected="True">Assembly quality measure</option>
617 <option value="de" selected="True">Sequence duplication - exact only</option>
618 <option value="da" selected="True">Sequence duplication - exact + 5'/3'</option>
619 <option value="sc" selected="True">Sequence complexity</option>
620 <option value="dn" selected="True">Dinucleotide odds ratios, includes the PCA plots</option>
621 </param>-->
622 </inputs>
623
624 <outputs>
625 <data format="fastq" name="good_sequence_file"
626 from_work_dir="tmp/good_sequences.fastq"
627 label="${tool.name} on ${on_string}: Good sequences" >
628 <filter>seq_type['seq_type_opt'] == "single"</filter>
629 </data>
630 <data format="fastq" name="rejected_sequence_file"
631 from_work_dir="tmp/rejected_sequences.fastq"
632 label="${tool.name} on ${on_string}: Rejected sequences" >
633 <filter>seq_type['seq_type_opt'] == "single"</filter>
634 </data>
635
636 <data format="fastq" name="good_sequences_1_file"
637 from_work_dir="tmp/good_sequences_1.fastq"
638 label="${tool.name} on ${on_string}: Good sequences for R1" >
639 <filter>seq_type['seq_type_opt'] == "paired"</filter>
640 </data>
641 <data format="fastq" name="good_sequences_1_singletons_file"
642 from_work_dir="tmp/good_sequences_1_singletons.fastq"
643 label="${tool.name} on ${on_string}: Good singleton sequences for R1" >
644 <filter>seq_type['seq_type_opt'] == "paired"</filter>
645 </data>
646 <data format="fastq" name="rejected_sequence_1_file"
647 from_work_dir="tmp/rejected_sequences_1.fastq"
648 label="${tool.name} on ${on_string}: Rejected sequences for R1" >
649 <filter>seq_type['seq_type_opt'] == "paired"</filter>
650 </data>
651 <data format="fastq" name="good_sequences_2_file"
652 from_work_dir="tmp/good_sequences_2.fastq"
653 label="${tool.name} on ${on_string}: Good sequences for R2" >
654 <filter>seq_type['seq_type_opt'] == "paired"</filter>
655 </data>
656 <data format="fastq" name="good_sequences_2_singletons_file"
657 from_work_dir="tmp/good_sequences_2_singletons.fastq"
658 label="${tool.name} on ${on_string}: Good singleton sequences for R2" >
659 <filter>seq_type['seq_type_opt'] == "paired"</filter>
660 </data>
661 <data format="fastq" name="rejected_sequence_2_file"
662 from_work_dir="tmp/rejected_sequences_2.fastq"
663 label="${tool.name} on ${on_string}: Rejected sequences for R2" >
664 <filter>seq_type['seq_type_opt'] == "paired"</filter>
665 </data>
666
667 <!--<data format="html" name="html_file"
668 from_work_dir="stats_html.html"
669 label="${tool.name} on ${on_string}: Summary" />-->
670 </outputs>
671
672 <tests>
673 <test>
674 <param name='seq_type_opt' value="single"/>
675 <param name="input_singles" value="prinseq_input_sequences.fastq"/>
676 <param name='apply_filter_treatments' value="true"/>
677 <param name='apply_length_filter_treatments' value="true"/>
678 <param name='apply_min_length_filter_treatments' value="true"/>
679 <param name="min_length_filter_treatment_value" value="60"/>
680 <param name='apply_max_length_filter_treatments' value="false" />
681 <param name='apply_quality_filter_treatments' value="true"/>
682 <param name='apply_min_quality_filter_treatments' value="false" />
683 <param name='apply_max_quality_filter_treatments' value="false"/>
684 <param name='apply_mean_quality_filter_treatments' value="true"/>
685 <param name='apply_min_mean_quality_filter_treatments' value="true"/>
686 <param name="min_mean_quality_filter_treatment_value" value="15"/>
687 <param name='apply_max_mean_quality_filter_treatments' value="false"/>
688 <param name='apply_base_content_filter_treatments' value="true"/>
689 <param name='apply_GC_perc_content_filter_treatments' value="false"/>
690 <param name='apply_N_number_content_filter_treatments' value="false"/>
691 <param name='apply_N_percentage_content_filter_treatments' value="true"/>
692 <param name="N_percentage_content_filter_treatment_value" value="2"/>
693 <param name='apply_other_base_content_filter_treatments' value="false"/>
694 <param name='apply_complexity_filter_treatments' value="false"/>
695 <param name='apply_trimming_treatments' value="true" />
696 <param name='apply_length_trimming_treatments' value="false"/>
697 <param name='apply_position_trimming_treatments' value="false"/>
698 <param name='apply_tail_trimming_treatments' value="false"/>
699 <param name='apply_quality_trimming_treatments' value="true"/>
700 <param name='apply_left_quality_trimming_treatments' value="false"/>
701 <param name='apply_right_quality_trimming_treatments' value="true" />
702 <param name="right_quality_trimming_treatment_value" value="20"/>
703 <param name="type_quality_trimming_treatments" value="min"/>
704 <param name="rule_quality_trimming_treatments" value="lt" />
705 <param name="window_quality_trimming_treatments" value="1"/>
706 <param name="step_quality_trimming_treatments" value="1"/>
707
708 <output name="good_sequence_file" file="prinseq_good_sequences.fastq"/>
709 </test>
710 </tests>
711
712 <help><![CDATA[
713
714 **What it does**
715
716 PRINSEQ is a tool for easy and rapid quality control and data processing of metagenomic and metatranscriptomic datasets.
717 This tool allow to process the sequences with filtering and trimming.
718 More information on `PRINSEQ manual <http://prinseq.sourceforge.net/manual.html>`_.
719
720 -----
721
722 **Input**
723
724 The input file is sequence file in fastq format (sequences and quality)::
725
726 @HWI-M00234:263:000000000-ADM55:1:1101:7508:4067 1:N:0:ATCACG
727 GGTGCACTAGGATCGTAGTTGGCTACTTTCCCGTTTTCAATGTATACGCAAGGTACACGGTCAGCGGT
728 +
729 CCCCCGFGED8DDCAFDAEE9DFGGGG9CFAFFCC@@CFGFGGCGFGG>GGGFFGDGEFFEFG8>4GF
730
731 -----
732
733 **Parameters**
734
735 The parameters are numerous in PRINSEQ given the wanted treatments.
736
737 Several filter treatments are proposed:
738
739 - Filters based on sequence length
740 - Filters based on quality score
741 - Filters based on base content
742
743 And several trimming treatments eliminate sequence parts:
744
745 - Trim of ends
746 - Trim of tails
747 - Trim based quality score
748
749 All these treaments can be customed using proposed parameters.
750
751 -----
752
753 **Output**
754
755 The output file is a sequence file with sequences and quality from input file
756 which have undergone filter and trimming.
757
758 ]]>
759 </help>
760
761 <citations>
762 <citation type="doi">10.1093/bioinformatics/btr026</citation>
763 </citations>
764 </tool>