Read quality control · Software
Trimmomatic
A Java tool for trimming sequencing adapters and low-quality bases from single-end and paired-end Illumina NGS reads.
What Trimmomatic is
Trimmomatic is a Java-based command-line tool developed by the Usadel lab to handle read quality control for Illumina next-generation sequencing data. It supports both single-end and paired-end sequencing reads, offering a range of trimming, cropping, and filtering operations.
During high-throughput sequencing, technical artefacts such as adapter read-through, low-quality base calls towards read termini, and base-calling errors can introduce noise into downstream bioinformatics analyses. Trimmomatic addresses this by filtering out defective reads, trimming low-quality bases, and clipping adapter or primer sequences before alignment, assembly, or expression quantification.
The software is integrated into European research infrastructure as a service provided by the German Network for Bioinformatics Infrastructure (de.NBI) and ELIXIR.
How it works
Trimmomatic accepts FASTQ files with Phred-33 or Phred-64 quality score encodings, handling plain text or compressed files. Users supply one or more sequential trimming operations on the command line, which are executed strictly in the order specified. For paired-end data, Trimmomatic tracks both forward and reverse reads simultaneously; read pairs that survive trimming together are saved into paired output files, while reads whose mates were dropped are separated into unpaired files.
Adapter clipping via ILLUMINACLIP employs two complementary algorithms: simple trimming and palindrome trimming. Simple trimming directly aligns candidate adapter sequences against reads using a log-likelihood scoring approach where matching bases add just over 0.6 and mismatches deduct score points proportional to quality (Q/10). Palindrome trimming specifically addresses short insert libraries where sequencing reads through into the opposite adapter; it performs an in silico ligation of adapters onto read starts and aligns the combined forward and reverse sequences to detect read-through overlaps, clipping redundant sequences or preserving both reads as configured. Additional steps handle leading and trailing base quality, sliding-window average quality cuts, length filtering, fixed-base cropping, and quality score conversions.
Key facts
- Language
- Java
- Supported inputs
- FASTQ (plain, gzip-compressed)
- Supported outputs
- FASTQ (plain, gzip, bzip2, zip)
- Quality score encodings
- Phred-33, Phred-64
- Build requirement
- JDK 25 or higher, Apache Maven
What you can use it for
- Illumina adapter removal
- Removing TruSeq2, TruSeq3, or custom adapter sequences from single-end or paired-end FASTQ datasets using simple or palindromic read-through alignment.
- Quality-based read trimming
- Scanning reads with a sliding window to trim termini when average base quality drops below an acceptable Phred threshold, or cutting off low-quality terminal bases.
- Read length and composition filtering
- Discarding reads that fail minimum length thresholds, exceed maximum lengths, fall below an average quality threshold, or contain out-of-range counts of specific bases such as Ns.
- Quality score conversion
- Converting historical Phred-64 FASTQ quality score encodings to standard Phred-33 format or vice versa during preprocessing.
Run it here
Trimmomatic is preinstalled on the machine behind every research conversation. Ask the agent in plain language, or give it the exact command — it runs it, reads the output and explains it.
Strengths and limits
Good at
- Maintains synchronization between forward and reverse reads in paired-end mode by routing surviving singletons into dedicated unpaired output files.
- Features a dedicated palindrome trimming strategy optimised for identifying and removing read-through adapter contamination in short insert libraries.
- Provides multi-threading support and parallel compression for processing large sequencing datasets.
- Allows custom step sequences and parameter combinations directly from the command line.
Watch out for
- Building from source requires a modern Java Development Kit (JDK 25 or higher).
- On HPC clusters where schedulers do not restrict CPU visibility, automated processor detection can oversubscribe threads and exhaust virtual memory unless explicitly capped using JVM parameters or manual thread settings.
- Trimming operations strictly follow command-line declaration order, requiring manual sequencing of adapter clipping prior to quality trimming to avoid suboptimal alignments.
Questions
Can I run Trimmomatic online without installing it?
Trimmomatic is preinstalled on the machine behind every research conversation. Ask the agent in plain language, or give it the exact command — it runs it, reads the output and explains it.
What licence is Trimmomatic under?
Trimmomatic is published under its authors' own licence; the project page at https://github.com/usadellab/Trimmomatic states it.
What is the difference between simple and palindrome adapter clipping?
Simple clipping searches for adapter sequences directly within each read. Palindrome clipping is specifically designed for paired-end sequencing where the insert is shorter than the read length; it models in silico adapter ligation and aligns the forward and reverse reads together to identify read-through adapter contamination.
Why does Trimmomatic output four files for paired-end data?
Trimmomatic generates two paired output files for forward and reverse reads that both passed all filtering steps, alongside two unpaired files for reads that survived while their corresponding mate was discarded.
How should thread counts and memory be managed on an HPC cluster?
When using automated thread detection on HPC systems without strict cgroup restrictions, set the environment variable MALLOC_ARENA_MAX=2 and pass -XX:ActiveProcessorCount set to the allocated slot count, or specify -threads manually in explicit PE/SE mode.
What order should trimming operations follow?
Trimmomatic executes operations strictly in the order they appear on the command line. Adapter clipping (ILLUMINACLIP) should generally be declared before quality trimming steps like SLIDINGWINDOW or LEADING.
How to cite it
Anthony M. Bolger, Marc Lohse, Bjoern Usadel. Trimmomatic: a flexible trimmer for Illumina sequence data, Bioinformatics, Volume 30, Issue 15, August 2014, Pages 2114–2120, https://doi.org/10.1093/bioinformatics/btu170
Written from Trimmomatic's own README and project page. Statements citing a figure that does not appear there are removed before publication. Licence and running details come from our registry.