Sickle is a tool that uses sliding windows along with quality and length thresholds to determine when quality is sufficiently low to trim the 3'-end of reads and also determines when the quality is sufficiently high enough to trim the 5'-end of reads. It will also discard reads based upon the length threshold. It takes the quality values and slides a window across them whose length is 0.1 times the length of the read. If this length is less than 1, then the window is set to be equal to the length of the read. Otherwise, the window slides along the quality values until the average quality in the window rises above the threshold, at which point the algorithm determines where within the window the rise occurs and cuts the read and quality there for the 5'-end cut. Then when the average quality in the window drops below the threshold, the algorithm determines where in the window the drop occurs and cuts both the read and quality strings there for the 3'-end cut. However, if the length of the remaining sequence is less than the minimum length threshold, then the read is discarded entirely (or replaced with an "N" record). 5'-end trimming can be disabled.
sickle pe -t [solexa|illumina|sanger] -f forward_reads.fastq -r reverse_reads.fastq -o trimmed_output_file1.fastq -p trimmed_output_file2.fastq -s trimmed_singles_file.fastq
sickle pe
)sickle pe
can operate with two types of input. First, it can take two paired-end files as input and outputs two trimmed paired-end files as well as a "singles" file. The second form starts with a single combined input file of reads where you have already interleaved the reads from the sequencer. In this form, you also supply a single output file name as well as a "singles" file. The "singles" file contains reads that passed filter in either the forward or reverse direction, but not the other. Finally, there is an option (-M) to only produce one interleaved output file where any reads that did not pass filter will be output as a FastQ record with a single "N" (whose quality value is the lowest possible based upon the quality type), thus preserving the paired nature of the data. You can also change the length and quality thresholds for trimming, as well as disable 5'-trimming and enable truncation of sequences with Ns.
Examples
sickle pe -f input_file1.fastq -r input_file2.fastq -t sanger \
-o trimmed_output_file1.fastq -p trimmed_output_file2.fastq \
-s trimmed_singles_file.fastq