0
|
1 <tool id="cshl_fastq_quality_trimmer" name="Trim By Quality">
|
|
2 <description></description>
|
|
3 <command>
|
|
4 cat '$input' |
|
|
5 fastq_quality_trimmer
|
|
6 #if $input.ext == "fastqsanger":
|
|
7 -Q 33
|
|
8 #elif $input.ext == "fastq":
|
|
9 -Q 64
|
|
10 #end if
|
|
11 -v -t $cutoff -l $minlen -o '$output'
|
|
12 </command>
|
|
13
|
|
14 <inputs>
|
|
15 <param format="fastq,fastqsanger" name="input" type="data" label="Library to clip" />
|
|
16
|
|
17 <param name="cutoff" size="4" type="integer" value="20">
|
|
18 <label>Minimum quality score</label>
|
|
19 <help>Nucleotides below this quality will be trimmed</help>
|
|
20 </param>
|
|
21
|
|
22 <param name="minlen" size="4" type="integer" value="1">
|
|
23 <label>Minimum sequence length</label>
|
|
24 <help>Sequences shorter than this length will be discard. Leave at zero to keep all sequences</help>
|
|
25 </param>
|
|
26 </inputs>
|
|
27
|
|
28 <tests>
|
|
29 <test>
|
|
30 <param name="input" value="fastq_quality_trimmer.fastq" ftype="fastq" />
|
|
31 <param name="cutoff" value="30"/>
|
|
32 <param name="minlen" value="16"/>
|
|
33 <output name="output" file="fastq_quality_trimmer.out" />
|
|
34 </test>
|
|
35 </tests>
|
|
36
|
|
37 <outputs>
|
|
38 <data format="input" name="output" metadata_source="input"
|
|
39 />
|
|
40 </outputs>
|
|
41 <help>
|
|
42 **What it does**
|
|
43
|
|
44 This tool scans the sequence from the end for the first nucleotide to possess the specified minimum quality score. It will then trim (remove nucleotides from) the sequence after this position. After trimming, sequences that are shorter than the minimum length are discarded.
|
|
45
|
|
46 --------
|
|
47
|
|
48 **Example**
|
|
49
|
|
50 Input Fasta file (with 20 bases in each sequences)::
|
|
51
|
|
52 @1
|
|
53 TATGGTCAGAAACCATATGC
|
|
54 +1
|
|
55 40 40 40 40 40 40 40 40 40 40 40 20 19 19 19 19 19 19 19 19
|
|
56 @2
|
|
57 CAGCGAGGCTTTAATGCCAT
|
|
58 +2
|
|
59 40 40 40 40 40 40 40 40 30 20 19 20 19 19 19 19 19 19 19 19
|
|
60 @3
|
|
61 CAGCGAGGCTTTAATGCCAT
|
|
62 +3
|
|
63 40 40 40 40 40 40 40 40 20 19 19 19 19 19 19 19 19 19 19 19
|
|
64
|
|
65
|
|
66 Trimming with a cutoff of 20, we get the following FASTQ file::
|
|
67
|
|
68 @1
|
|
69 TATGGTCAGAAA
|
|
70 +1
|
|
71 40 40 40 40 40 40 40 40 40 40 40 20
|
|
72 @2
|
|
73 CAGCGAGGCTTT
|
|
74 +2
|
|
75 40 40 40 40 40 40 40 40 30 20 19 20
|
|
76 @3
|
|
77 CAGCGAGGC
|
|
78 +3
|
|
79 40 40 40 40 40 40 40 40 20
|
|
80
|
|
81 Trimming with a cutoff of 20 and a minimum length of 12, we get the following FASTQ file::
|
|
82
|
|
83 @1
|
|
84 TATGGTCAGAAA
|
|
85 +1
|
|
86 40 40 40 40 40 40 40 40 40 40 40 20
|
|
87 @2
|
|
88 CAGCGAGGCTTT
|
|
89 +2
|
|
90 40 40 40 40 40 40 40 40 30 20 19 20
|
|
91
|
|
92 ------
|
|
93
|
|
94 This tool is based on `FASTX-toolkit`__ by Assaf Gordon.
|
|
95
|
|
96 .. __: http://hannonlab.cshl.edu/fastx_toolkit/
|
|
97
|
|
98 </help>
|
|
99 </tool>
|
|
100 <!-- FASTX-Quality-Trimmer is part of the FASTX-toolkit, by A.Gordon (gordon@cshl.edu) -->
|