annotate tools/filters/trimmer.xml @ 0:9071e359b9a3

Uploaded
author xuebing
date Fri, 09 Mar 2012 19:37:19 -0500
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
1 <tool id="trimmer" name="Trim" version="0.0.1">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
2 <description>leading or trailing characters</description>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
3 <command interpreter="python">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
4 trimmer.py -a -f $input1 -c $col -s $start -e $end -i $ignore $fastq > $out_file1
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
5 </command>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
6 <inputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
7 <param format="tabular,txt" name="input1" type="data" label="this dataset"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
8 <param name="col" type="integer" value="0" label="Trim this column only" help="0 = process entire line" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
9 <param name="start" type="integer" size="10" value="1" label="Trim from the beginning to this position" help="1 = do not trim the beginning"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
10 <param name="end" type="integer" size="10" value="0" label="Remove everything from this position to the end" help="0 = do not trim the end"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
11 <param name="fastq" type="select" label="Is input dataset in fastq format?" help="If set to YES, the tool will not trim evenly numbered lines (0, 2, 4, etc...)">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
12 <option selected="true" value="">No</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
13 <option value="-q">Yes</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
14 </param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
15 <param name="ignore" type="select" display="checkboxes" multiple="True" label="Ignore lines beginning with these characters" help="lines beginning with these are not trimmed">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
16 <option value="62">&gt;</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
17 <option value="64">@</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
18 <option value="43">+</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
19 <option value="60">&lt;</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
20 <option value="42">*</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
21 <option value="45">-</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
22 <option value="61">=</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
23 <option value="124">|</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
24 <option value="63">?</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
25 <option value="36">$</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
26 <option value="46">.</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
27 <option value="58">:</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
28 <option value="38">&amp;</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
29 <option value="37">%</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
30 <option value="94">^</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
31 <option value="35">&#35;</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
32 </param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
33 </inputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
34 <outputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
35 <data name="out_file1" format="input" metadata_source="input1"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
36 </outputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
37 <tests>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
38 <test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
39 <param name="input1" value="trimmer_tab_delimited.dat"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
40 <param name="col" value="0"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
41 <param name="start" value="1"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
42 <param name="end" value="13"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
43 <param name="ignore" value="62"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
44 <param name="fastq" value="No"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
45 <output name="out_file1" file="trimmer_a_f_c0_s1_e13_i62.dat"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
46 </test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
47 <test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
48 <param name="input1" value="trimmer_tab_delimited.dat"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
49 <param name="col" value="2"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
50 <param name="start" value="1"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
51 <param name="end" value="2"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
52 <param name="ignore" value="62"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
53 <param name="fastq" value="No"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
54 <output name="out_file1" file="trimmer_a_f_c2_s1_e2_i62.dat"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
55 </test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
56
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
57 </tests>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
58
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
59 <help>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
60
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
61
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
62 **What it does**
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
63
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
64 Trims specified number of characters from a dataset or its field (if dataset is tab-delimited).
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
65
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
66 -----
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
67
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
68 **Example 1**
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
69
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
70 Trimming this dataset::
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
71
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
72 1234567890
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
73 abcdefghijk
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
74
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
75 by setting **Trim from the beginning to this position** to *2* and **Remove everything from this position to the end** to *6* will produce::
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
76
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
77 23456
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
78 bcdef
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
79
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
80 -----
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
81
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
82 **Example 2**
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
83
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
84 Trimming column 2 of this dataset::
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
85
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
86 abcde 12345 fghij 67890
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
87 fghij 67890 abcde 12345
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
88
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
89 by setting **Trim content of this column only** to *2*, **Trim from the beginning to this position** to *2*, and **Remove everything from this position to the end** to *4* will produce::
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
90
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
91 abcde 234 fghij 67890
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
92 fghij 789 abcde 12345
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
93
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
94 -----
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
95
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
96 **Trimming FASTQ datasets**
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
97
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
98 This tool can be used to trim sequences and quality strings in fastq datasets. This is done by selected *Yes* from the **Is input dataset in fastq format?** dropdown. If set to *Yes*, the tool will skip all even numbered lines (see warning below). For example, trimming last 5 bases of this dataset::
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
99
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
100 @081017-and-081020:1:1:1715:1759
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
101 GGACTCAGATAGTAATCCACGCTCCTTTAAAATATC
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
102 +
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
103 II#IIIIIII$5+.(9IIIIIII$%*$G$A31I&amp;&amp;B
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
104
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
105 cab done by setting **Remove everything from this position to the end** to 31::
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
106
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
107 @081017-and-081020:1:1:1715:1759
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
108 GGACTCAGATAGTAATCCACGCTCCTTTAAA
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
109 +
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
110 II#IIIIIII$5+.(9IIIIIII$%*$G$A3
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
111
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
112 **Note** that headers are skipped.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
113
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
114 .. class:: warningmark
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
115
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
116 **WARNING:** This tool will only work on properly formatted fastq datasets where (1) each read and quality string occupy one line and (2) '@' (read header) and "+" (quality header) lines are evenly numbered like in the above example.
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>