Trimmomatic stand-alone command-line application
Trimmomatic is a fast, multithreaded command-line tool for preprocessing illumina sequencing data. It has been specially developed for the purification of raw sequence reads by removing low quality bases and adapter sequences prior to further downstream analyses such as mapping or assembly. Trimming your data correctly is an important first step that can significantly improve the accuracy and reliability of your results.
The tool performs a series of user-defined trimming steps on FASTQ files. It can process both single-end (SE) and paired-end (PE) data and generate clean reads for analysis.
Trimmomatic is available at the official Github page https://github.com/usadellab/Trimmomatic/.
Understanding the Trimmomatic trimming modes
With simple trimming, each adapter sequence is tested against the reads, and if a sufficiently accurate match is detected, the read is clipped appropriately.
In paired-end data Trimmomatic uses a highly accurate method for adapter removal called palindrome trimming. This mode is specifically designed to handle a common scenario in library preparation where the DNA insert is shorter than the read length.
When the DNA fragment being sequenced is shorter than the actual sequencing read length, the sequencing machinery reads through the entire fragment and continues into the adapter sequence ligated to the other end.
The palindrome mode utilises the properties of paired-end reads. The forward and reverse reads are essentially reverse complements of the same original DNA fragment.
This method is far more sensitive than the simple search for adapter sequences, as it uses the information from the read's partner to confirm the presence of adapter contamination.
Terms of use
Usage of this site and download of the Trimmomatic command-line tool follows the GDPR Privacy Notice of Plant Biotechnology Information (plantBI), IBG-4, Jülich Research Centre (FZJ). The detailed GDPR Privacy Notice is available at .
While the Trimmomatic software is licensed under the GPL (General Public License), the adapter sequences are not included in the GPL part, but owned by and used with permission of Illumina. (Oligonucleotide sequences © 2023 Illumina, Inc. All rights reserved.) Suggested adapter sequences are provided for TruSeq2 (as used in GAII machines) and TruSeq3 (as used by HiSeq and MiSeq machines), for both single-end and paired-end mode. These sequences have not been extensively tested, and depending on specific issues which may occur in library preparation, other sequences may work better for a given dataset.
Publications & Contact
For any questions, please feel free to contact us (plabipd@fz-juelich.de). To report a problem, you can also go to the official Github page https://github.com/usadellab/Trimmomatic/.
Download Trimmomatic
Download the Trimmomatic command-line tool from the official Github page https://github.com/usadellab/Trimmomatic/. The simplest option is to download the JAR file (trimmomatic.jar), but it is also possible to download the source code and create the JAR file. Trimmomatic v0.41 and newer requires Java 25 or above.
How to run Trimmomatic
When you call up the trimmomatic.jar programme on the command line, use the first parameter to specify whether the sequencing data to be trimmed is of the Paired-End (PE) or Single-End (SE) type.
In addition, there are several optional parameters available, for example to specify the number of CPU threads to use for multi-threading and the type of quality score encoding. See the box below for all optional parameters. The parameter newly added in version 0.41 is highlighted.
Finally, the processing pipeline is set up by selecting and parameterising at least one trimming step. All further trimming steps and their order are optional. The available trimming steps are executed in the order in which they are added to the command line. It is recommended that the trimming step ILLUMINACLIP, if required, is done as early as possible. The trimming works with FASTQ formatted files, either uncompressed or compressed (the gzip format is determined based on the .gz extension). Concatenated compressed bzip2 files are also supported (Trimmomatic v0.41+).
Trimmomatic trimming steps
The FASTQ format uses phred+33 or phred+64 quality scores (depending on the Illumina pipeline used). For example, a score of 20 means 99% and a score of 40 means 99.99% accuracy for the base call (for further details see the Wikipedia site about Phred quality scores). The <quality> parameter in several trimming steps is expected to be a numeric value that refers to phred+33/phred+64 quality scores.
Running Trimmomatic on an High-Performance Computing (HPC) cluster
Many HPC schedulers do not completely isolate a job from the rest of the computer's CPU cores (via cgroups). Even if a Trimmomatic job is allocated only a portion of the available CPU cores via an HPC scheduler, all CPUs on the node are recognised by the system. This can lead to an excessive amount of memory being reserved, as the system assumes that more visible CPUs mean more parallel work and therefore a higher memory requirement. As a result, jobs may immediately reach their memory limit - even if there is ample physical RAM available on the node. This is not caused by the volume of data to be processed or by insufficient memory on the node, but by the fact that Java plans to utilise more CPU cores than are actually available to the job. To avoid this, explicitly cap the threads Trimmomatic uses with the -threads option to match your actual job allocation (e.g. -threads 4 for four requested cores). Further information on this can be found on the official Github page https://github.com/usadellab/Trimmomatic/.
Why did so many of my reads get discarded by MINLEN ?
This usually means that the initial quality of your reads was low or there was significant adapter contamination. The SLIDINGWINDOW or ILLUMINACLIP steps may be trimming a large portion of your reads, causing them to fall below the minimum length threshold. Check your raw data quality with a tool like FastQC.
What is the difference between the paired and unpaired output files in Paired-End (PE) mode ?
After trimming, some reads may remain while their partners are discarded (e.g., for being too short).
Which adapter file should I use for ILLUMINACLIP ?
Trimmomatic comes with standard adapter files (e.g., TruSeq3-PE.fa). You should select the one that corresponds to the library preparation kit used to generate your data. If you are unsure, contact the sequencing facility that performed the run.
My job failed with an error. What can I do ?
The most common cause of errors is an incorrectly formatted FASTQ file. Make sure that your file strictly complies with the FASTQ format and that each data record consists of exactly four lines. File damage or truncation during transfer can also lead to problems.
I want to report an issue. What can I do ?
You can visit the official Github page https://github.com/usadellab/Trimmomatic/ and report a problem. We or the community can respond there and help you solve your problem.