Generally NGS data (reads) require some sort of pre-processing, such as trimming of low quality bases, removal of short reads or low quality reads. Trimmomatic is a popular tool for read trimming as it provides a wide range of options. It also does a proper trimming of paired reads. Usually paired-end reads come in two FASTQ files. Reads from the same pair occupy the same position (lines) in these files. If one read is filtered out during trimming, the second read from the pair also must go out, to preserve the correct read oder. Trimmomatic does this by creating four output files, two with properly paired reads, and two files with non-paired forward and reverse reads.#
Users have to take care about order of the trimming options, as it affects the output. It seems Trimmomatic applies the trimming options sequentially. An example of this is available in ‘SPAdes and Prokka‘ history published on Galaxy-qld. In Trimmomatic job (datasets 10 – 13) Drop reads below a specified length (MINLEN) is used as 3rd operation, and it is followed by Sliding window trimming (SLIDINGWINDOW). The output files contain reads as short as 1 nt (see results of FastQC, datasets 14 and 15). When MINLEN is used as the last trimming option (Trimmomatic datasets 64-67), the reads are filtered by the specified length after the quality trimming, and the output files do not have short reads (FastQC datasets 68 and 69).
# The description is for the Trimmmomatic version currently available on Galaxy-qld.