0
|
1 <tool id="fastq_quality_trimmer" name="FASTQ Quality Trimmer" version="1.0.0">
|
|
2 <description>by sliding window</description>
|
|
3 <requirements>
|
|
4 <requirement type="package" version="1.0.0">galaxy_sequence_utils</requirement>
|
|
5 </requirements>
|
|
6 <command interpreter="python">fastq_trimmer_by_quality.py '$input_file' '$output_file' -f '${input_file.extension[len( 'fastq' ):]}' -s '$window_size'
|
|
7 -t '$step_size' -e '$trim_ends' -a '$aggregation_action' -x '$exclude_count' -c '$score_comparison' -q '$quality_score'
|
|
8 #if $keep_zero_length.value:
|
|
9 -k
|
|
10 #end if
|
|
11 </command>
|
|
12 <inputs>
|
|
13 <param name="input_file" type="data" format="fastqsanger,fastqcssanger" label="FASTQ File"/>
|
|
14 <param name="keep_zero_length" label="Keep reads with zero length" type="boolean" truevalue="keep_zero_length" falsevalue="exclude_zero_length" selected="False"/>
|
|
15 <param name="trim_ends" type="select" label="Trim ends">
|
|
16 <option value="53" selected="True">5' and 3'</option>
|
|
17 <option value="5">5' only</option>
|
|
18 <option value="3">3' only</option>
|
|
19 </param>
|
|
20 <param name="window_size" type="integer" value="1" label="Window size"/>
|
|
21 <param name="step_size" type="integer" value="1" label="Step Size" />
|
|
22 <param name="exclude_count" label="Maximum number of bases to exclude from the window during aggregation" value="0" type="integer" />
|
|
23 <param name="aggregation_action" type="select" label="Aggregate action for window">
|
|
24 <option value="min" selected="True">min score</option>
|
|
25 <option value="max">max score</option>
|
|
26 <option value="sum">sum of scores</option>
|
|
27 <option value="mean">mean of scores</option>
|
|
28 </param>
|
|
29 <param name="score_comparison" type="select" label="Trim until aggregate score is">
|
|
30 <sanitizer>
|
|
31 <valid initial="none">
|
|
32 <add value="<>=!"/> <!-- only allow lt, gt, e, le, ge, ne for this parameter; will be single-quote escaped on commandline -->
|
|
33 </valid>
|
|
34 </sanitizer>
|
|
35 <option value=">">></option>
|
|
36 <option value=">=" selected="true">>=</option>
|
|
37 <option value="==">==</option>
|
|
38 <option value="!=">!=</option>
|
|
39 <option value="<"><</option>
|
|
40 <option value="<="><=</option>
|
|
41 </param>
|
|
42 <param name="quality_score" label="Quality Score" value="0" type="float" />
|
|
43 </inputs>
|
|
44 <outputs>
|
|
45 <data name="output_file" format="input" />
|
|
46 </outputs>
|
|
47 <tests>
|
|
48 <test>
|
|
49 <!-- Trim until window size 1 >= 20;both ends -->
|
|
50 <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" />
|
|
51 <param name="keep_zero_length" value="exclude_zero_length" />
|
|
52 <param name="trim_ends" value="53"/>
|
|
53 <param name="window_size" value="1"/>
|
|
54 <param name="step_size" value="1"/>
|
|
55 <param name="exclude_count" value="0"/>
|
|
56 <param name="aggregation_action" value="min"/>
|
|
57 <param name="score_comparison" value=">="/>
|
|
58 <param name="quality_score" value="20"/>
|
|
59 <output name="output_file" file="sanger_full_range_quality_trimmed_out_1.fastqsanger" />
|
|
60 </test>
|
|
61 <test>
|
|
62 <!-- Trim until window size 1 >= 20; 5' end only -->
|
|
63 <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" />
|
|
64 <param name="keep_zero_length" value="exclude_zero_length" />
|
|
65 <param name="trim_ends" value="5"/>
|
|
66 <param name="window_size" value="1"/>
|
|
67 <param name="step_size" value="1"/>
|
|
68 <param name="exclude_count" value="0"/>
|
|
69 <param name="aggregation_action" value="min"/>
|
|
70 <param name="score_comparison" value=">="/>
|
|
71 <param name="quality_score" value="20"/>
|
|
72 <output name="output_file" file="sanger_full_range_quality_trimmed_out_2.fastqsanger" />
|
|
73 </test>
|
|
74 <test>
|
|
75 <!-- Trim until window size 1 >= 20; 3' end only -->
|
|
76 <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" />
|
|
77 <param name="keep_zero_length" value="exclude_zero_length" />
|
|
78 <param name="trim_ends" value="3"/>
|
|
79 <param name="window_size" value="1"/>
|
|
80 <param name="step_size" value="1"/>
|
|
81 <param name="exclude_count" value="0"/>
|
|
82 <param name="aggregation_action" value="min"/>
|
|
83 <param name="score_comparison" value=">="/>
|
|
84 <param name="quality_score" value="20"/>
|
|
85 <output name="output_file" file="sanger_full_range_quality_trimmed_out_3.fastqsanger" />
|
|
86 </test>
|
|
87 <test>
|
|
88 <!-- Trim until window size 2 >= 1;both ends, 1 deviant score -->
|
|
89 <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" />
|
|
90 <param name="keep_zero_length" value="exclude_zero_length" />
|
|
91 <param name="trim_ends" value="53"/>
|
|
92 <param name="window_size" value="2"/>
|
|
93 <param name="step_size" value="1"/>
|
|
94 <param name="exclude_count" value="1"/>
|
|
95 <param name="aggregation_action" value="min"/>
|
|
96 <param name="score_comparison" value=">="/>
|
|
97 <param name="quality_score" value="1"/>
|
|
98 <output name="output_file" file="sanger_full_range_original_sanger.fastqsanger" />
|
|
99 </test>
|
|
100 <test>
|
|
101 <!-- Trim entire sequences; keep empty reads -->
|
|
102 <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" />
|
|
103 <param name="keep_zero_length" value="true" />
|
|
104 <param name="trim_ends" value="53"/>
|
|
105 <param name="window_size" value="1"/>
|
|
106 <param name="step_size" value="1"/>
|
|
107 <param name="exclude_count" value="0"/>
|
|
108 <param name="aggregation_action" value="min"/>
|
|
109 <param name="score_comparison" value=">="/>
|
|
110 <param name="quality_score" value="999"/>
|
|
111 <output name="output_file" file="sanger_full_range_empty_reads.fastqsanger" />
|
|
112 </test>
|
|
113 <test>
|
|
114 <!-- Trim entire sequences; discard empty reads -->
|
|
115 <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" />
|
|
116 <param name="keep_zero_length"/>
|
|
117 <param name="trim_ends" value="53"/>
|
|
118 <param name="window_size" value="1"/>
|
|
119 <param name="step_size" value="1"/>
|
|
120 <param name="exclude_count" value="0"/>
|
|
121 <param name="aggregation_action" value="min"/>
|
|
122 <param name="score_comparison" value=">="/>
|
|
123 <param name="quality_score" value="999"/>
|
|
124 <output name="output_file" file="empty_file.dat" />
|
|
125 </test>
|
|
126 </tests>
|
|
127 <help>
|
|
128 This tool allows you to trim the ends of reads based upon the aggregate value of quality scores found within a sliding window; a sliding window of size 1 is equivalent to 'simple' trimming of the ends.
|
|
129
|
|
130 The user specifies the aggregating action (min, max, sum, mean) to perform on the quality score values found within the sliding window to be used with the user defined comparison operation and comparison value.
|
|
131
|
|
132 The user can provide a maximum count of bases that can be excluded from the aggregation within the window. When set, this tool will first check the aggregation of the entire window, then after removing 1 value, then after removing 2 values, up to the number declared. Setting this value to be equal to or greater than the window size will cause no trimming to occur.
|
|
133
|
|
134 -----
|
|
135
|
|
136 .. class:: warningmark
|
|
137
|
|
138 Trimming a color space read will cause any adapter base to be lost.
|
|
139
|
|
140 ------
|
|
141
|
|
142 **Citation**
|
|
143
|
|
144 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. <http://www.ncbi.nlm.nih.gov/pubmed/20562416>`_
|
|
145
|
|
146
|
|
147 </help>
|
|
148 </tool>
|