Trimmomatic

©2014-2026
Trimmomatic team
Jülich Research Center (FZJ)

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.

Optional parameters
  • -threads <threads>
    specifies the number of CPU threads to use for multi-threading
  • -phred33 | -phred64
    specifies the quality score encoding. phred33 is the standard for modern Illumina data
  • -trimlog <log file>
    writes a detailed log file
  • -summary <summary file>
    writes a summary of trimming results to a file
  • -basein <template input file>
    sets path to one of the paired-end input files (its mate is auto-detected)
  • -baseout <template output file>
    sets template path used to generate the four paired-end output files
  • -validatePairs
    performs an extra validation step on paired-end reads before trimming to ensure read pairs are consistent
  • -compressLevel <compression level>
    sets the compression level for BZIP2/GZ output files (1=fastest, 9=best compression)
  • -compressStream | -compressBlock
    specifies the compression mode. Block compression is the default
  • -quiet
    suppresses the display of progress on the console
  • -verbose
    outputs a breakdown of the number of reads removed by each adapter sequence, sorted by frequency from highest to lowest
  • -version
    outputs the version tag

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+).

Default trimming step From version 0.41 onwards, default parameter values can be used when configuring the trimming step without having to specify them explicitly. The number of input files is used to automatically determine whether the sequencing data to be trimmed is paired-end (PE) or single-end (SE) data.
    trimmomatic.jar running in paired-end (PE) / single-end (SE) mode with default parameters
  • java -jar <path to trimmomatic.jar>  <input_forward> <input_reverse> 
  • java -jar <path to trimmomatic.jar>  <input>
    ILLUMINACLIP
  • seedMismatches: 2
  • palindromeClipThreshold: 30
  • simpleClipThreshold: 10
    SLIDINGWINDOW
  • windowSize: 4
  • quality: 20
    MINLEN
  • length: 36
 
 
 

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/.