annotate tools/fastq/fastq_trimmer.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_trimmer" name="FASTQ Trimmer" version="1.0.0">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
2 <description>by column</description>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
3 <command interpreter="python">fastq_trimmer.py '$input_file' '$output_file' '${offset_type['left_column_offset']}' '${offset_type['right_column_offset']}' '${offset_type['base_offset_type']}' '${input_file.extension[len( 'fastq' ):]}' '$keep_zero_length'</command>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
4 <inputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
5 <param name="input_file" type="data" format="fastqsanger,fastqcssanger" label="FASTQ File"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
6 <conditional name="offset_type">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
7 <param name="base_offset_type" type="select" label="Define Base Offsets as" help="Use Absolute for fixed length reads (Illumina, SOLiD)&lt;br&gt;Use Percentage for variable length reads (Roche/454)">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
8 <option value="offsets_absolute" selected="true">Absolute Values</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
9 <option value="offsets_percent">Percentage of Read Length</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
10 </param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
11 <when value="offsets_absolute">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
12 <param name="left_column_offset" label="Offset from 5' end" value="0" type="integer" help="Values start at 0, increasing from the left">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
13 <validator type="in_range" message="Base Offsets must be positive" min="0" max="inf"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
14 <validator type="expression" message="An integer is required.">int( float( value ) ) == float( value )</validator>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
15 </param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
16 <param name="right_column_offset" label="Offset from 3' end" value="0" type="integer" help="Values start at 0, increasing from the right">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
17 <validator type="in_range" message="Base Offsets must be positive" min="0" max="inf"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
18 <validator type="expression" message="An integer is required.">int( float( value ) ) == float( value )</validator>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
19 </param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
20 </when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
21 <when value="offsets_percent">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
22 <param name="left_column_offset" label="Offset from 5' end" value="0" type="float">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
23 <validator type="in_range" message="Base Offsets must be between 0 and 100" min="0" max="100"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
24 </param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
25 <param name="right_column_offset" label="Offset from 3' end" value="0" type="float">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
26 <validator type="in_range" message="Base Offsets must be between 0 and 100" min="0" max="100"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
27 </param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
28 </when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
29 </conditional>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
30 <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
31 </inputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
32 <outputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
33 <data name="output_file" format="input" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
34 </outputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
35 <tests>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
36 <test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
37 <!-- Do nothing trim -->
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
38 <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
39 <param name="base_offset_type" value="offsets_absolute"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
40 <param name="left_column_offset" value="0"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
41 <param name="right_column_offset" value="0"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
42 <param name="keep_zero_length" value="keep_zero_length" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
43 <output name="output_file" file="sanger_full_range_original_sanger.fastqsanger" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
44 </test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
45 <!-- Trim to empty File -->
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
46 <test>
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="base_offset_type" value="offsets_absolute"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
49 <param name="left_column_offset" value="30"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
50 <param name="right_column_offset" value="64"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
51 <param name="keep_zero_length" value="exclude_zero_length" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
52 <output name="output_file" file="empty_file.dat" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
53 </test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
54 <test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
55 <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
56 <param name="base_offset_type" value="offsets_percent"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
57 <param name="left_column_offset" value="50"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
58 <param name="right_column_offset" value="50"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
59 <param name="keep_zero_length" value="exclude_zero_length" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
60 <output name="output_file" file="empty_file.dat" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
61 </test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
62 <!-- Trim to 4 inner-most bases -->
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
63 <test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
64 <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
65 <param name="base_offset_type" value="offsets_absolute"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
66 <param name="left_column_offset" value="45"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
67 <param name="right_column_offset" value="45"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
68 <param name="keep_zero_length" value="exclude_zero_length" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
69 <output name="output_file" file="fastq_trimmer_out1.fastqsanger" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
70 </test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
71 <test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
72 <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
73 <param name="base_offset_type" value="offsets_percent"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
74 <param name="left_column_offset" value="47.87"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
75 <param name="right_column_offset" value="47.87"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
76 <param name="keep_zero_length" value="exclude_zero_length" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
77 <output name="output_file" file="fastq_trimmer_out1.fastqsanger" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
78 </test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
79 </tests>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
80 <help>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
81 This tool allows you to trim the ends of reads.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
82
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
83 You can specify either absolute or percent-based offsets. Offsets are calculated, starting at 0, from the respective end to be trimmed. When using the percent-based method, offsets are rounded to the nearest integer.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
84
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
85 For example, if you have a read of length 36::
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
86
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
87 @Some FASTQ Sanger Read
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
88 CAATATGTNCTCACTGATAAGTGGATATNAGCNCCA
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
89 +
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
90 =@@.@;B-%?8&gt;CBA@&gt;7@7BBCA4-48%&lt;;;%&lt;B@
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
91
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
92 And you set absolute offsets of 2 and 9::
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
93
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
94 @Some FASTQ Sanger Read
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
95 ATATGTNCTCACTGATAAGTGGATA
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
96 +
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
97 @.@;B-%?8&gt;CBA@&gt;7@7BBCA4-4
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
98
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
99 Or you set percent offsets of 6% and 20% (corresponds to absolute offsets of 2,7 for a read length of 36)::
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
100
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
101 @Some FASTQ Sanger Read
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
102 ATATGTNCTCACTGATAAGTGGATATN
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
103 +
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
104 @.@;B-%?8&gt;CBA@&gt;7@7BBCA4-48%
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
105
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
106 -----
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
107
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
108 .. class:: warningmark
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
109
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
110 Trimming a color space read will cause any adapter base to be lost.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
111
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
112 ------
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
113
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
114 **Citation**
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
115
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
116 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
117
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
118
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
119 </help>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
120 </tool>