annotate tools/fastq/fastq_trimmer_by_quality.xml @ 2:c2a356708570

Uploaded
author xuebing
date Fri, 09 Mar 2012 19:45:42 -0500
parents 9071e359b9a3
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
1 <tool id="fastq_quality_trimmer" name="FASTQ Quality Trimmer" version="1.0.0">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
2 <description>by sliding window</description>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
3 <command interpreter="python">fastq_trimmer_by_quality.py '$input_file' '$output_file' -f '${input_file.extension[len( 'fastq' ):]}' -s '$window_size'
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
4 -t '$step_size' -e '$trim_ends' -a '$aggregation_action' -x '$exclude_count' -c '$score_comparison' -q '$quality_score'
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
5 #if $keep_zero_length.value:
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
6 -k
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
7 #end if
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
8 </command>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
9 <inputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
10 <param name="input_file" type="data" format="fastqsanger,fastqcssanger" label="FASTQ File"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
11 <param name="keep_zero_length" label="Keep reads with zero length" type="boolean" truevalue="keep_zero_length" falsevalue="exclude_zero_length" selected="False"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
12 <param name="trim_ends" type="select" label="Trim ends">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
13 <option value="53" selected="True">5' and 3'</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
14 <option value="5">5' only</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
15 <option value="3">3' only</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
16 </param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
17 <param name="window_size" type="integer" value="1" label="Window size"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
18 <param name="step_size" type="integer" value="1" label="Step Size" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
19 <param name="exclude_count" label="Maximum number of bases to exclude from the window during aggregation" value="0" type="integer" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
20 <param name="aggregation_action" type="select" label="Aggregate action for window">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
21 <option value="min" selected="True">min score</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
22 <option value="max">max score</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
23 <option value="sum">sum of scores</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
24 <option value="mean">mean of scores</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
25 </param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
26 <param name="score_comparison" type="select" label="Trim until aggregate score is">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
27 <sanitizer>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
28 <valid initial="none">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
29 <add value="&lt;&gt;=!"/> <!-- only allow lt, gt, e, le, ge, ne for this parameter; will be single-quote escaped on commandline -->
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
30 </valid>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
31 </sanitizer>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
32 <option value="&gt;">&gt;</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
33 <option value="&gt;=" selected="true">&gt;=</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
34 <option value="==">==</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
35 <option value="!=">!=</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
36 <option value="&lt;">&lt;</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
37 <option value="&lt;=">&lt;=</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
38 </param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
39 <param name="quality_score" label="Quality Score" value="0" type="float" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
40 </inputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
41 <outputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
42 <data name="output_file" format="input" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
43 </outputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
44 <tests>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
45 <test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
46 <!-- Trim until window size 1 >= 20;both ends -->
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
47 <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
48 <param name="keep_zero_length" value="exclude_zero_length" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
49 <param name="trim_ends" value="53"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
50 <param name="window_size" value="1"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
51 <param name="step_size" value="1"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
52 <param name="exclude_count" value="0"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
53 <param name="aggregation_action" value="min"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
54 <param name="score_comparison" value="&gt;="/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
55 <param name="quality_score" value="20"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
56 <output name="output_file" file="sanger_full_range_quality_trimmed_out_1.fastqsanger" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
57 </test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
58 <test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
59 <!-- Trim until window size 1 >= 20; 5' end only -->
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
60 <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
61 <param name="keep_zero_length" value="exclude_zero_length" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
62 <param name="trim_ends" value="5"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
63 <param name="window_size" value="1"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
64 <param name="step_size" value="1"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
65 <param name="exclude_count" value="0"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
66 <param name="aggregation_action" value="min"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
67 <param name="score_comparison" value="&gt;="/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
68 <param name="quality_score" value="20"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
69 <output name="output_file" file="sanger_full_range_quality_trimmed_out_2.fastqsanger" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
70 </test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
71 <test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
72 <!-- Trim until window size 1 >= 20; 3' end only -->
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
73 <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
74 <param name="keep_zero_length" value="exclude_zero_length" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
75 <param name="trim_ends" value="3"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
76 <param name="window_size" value="1"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
77 <param name="step_size" value="1"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
78 <param name="exclude_count" value="0"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
79 <param name="aggregation_action" value="min"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
80 <param name="score_comparison" value="&gt;="/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
81 <param name="quality_score" value="20"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
82 <output name="output_file" file="sanger_full_range_quality_trimmed_out_3.fastqsanger" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
83 </test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
84 <test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
85 <!-- Trim until window size 2 >= 1;both ends, 1 deviant score -->
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
86 <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
87 <param name="keep_zero_length" value="exclude_zero_length" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
88 <param name="trim_ends" value="53"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
89 <param name="window_size" value="2"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
90 <param name="step_size" value="1"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
91 <param name="exclude_count" value="1"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
92 <param name="aggregation_action" value="min"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
93 <param name="score_comparison" value="&gt;="/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
94 <param name="quality_score" value="1"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
95 <output name="output_file" file="sanger_full_range_original_sanger.fastqsanger" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
96 </test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
97 <test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
98 <!-- Trim entire sequences; keep empty reads -->
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
99 <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
100 <param name="keep_zero_length" value="true" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
101 <param name="trim_ends" value="53"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
102 <param name="window_size" value="1"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
103 <param name="step_size" value="1"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
104 <param name="exclude_count" value="0"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
105 <param name="aggregation_action" value="min"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
106 <param name="score_comparison" value="&gt;="/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
107 <param name="quality_score" value="999"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
108 <output name="output_file" file="sanger_full_range_empty_reads.fastqsanger" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
109 </test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
110 <test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
111 <!-- Trim entire sequences; discard empty reads -->
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
112 <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
113 <param name="keep_zero_length"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
114 <param name="trim_ends" value="53"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
115 <param name="window_size" value="1"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
116 <param name="step_size" value="1"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
117 <param name="exclude_count" value="0"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
118 <param name="aggregation_action" value="min"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
119 <param name="score_comparison" value="&gt;="/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
120 <param name="quality_score" value="999"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
121 <output name="output_file" file="empty_file.dat" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
122 </test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
123 </tests>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
124 <help>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
125 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.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
126
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
127 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.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
128
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
129 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.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
130
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
131 -----
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
132
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
133 .. class:: warningmark
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
134
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
135 Trimming a color space read will cause any adapter base to be lost.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
136
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
137 ------
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
138
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
139 **Citation**
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
140
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
141 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;`_
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
142
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
143
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
144 </help>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
145 </tool>