#bioinformatics #fastq #ngs #adapter-trimming #quality-trimming

bin+lib trim-galore

Fast adapter and quality trimming for NGS data — Oxidized Edition

2 releases (1 stable)

Uses new Rust 2024

new 2.1.0-beta.1 Apr 18, 2026
2.0.0 Apr 13, 2026

#166 in Biology

GPL-3.0-only

250KB
5K SLoC

Trim Galore

Consistent quality and adapter trimming for next-generation sequencing data, with special handling for RRBS and bisulfite-seq libraries.

CI Crates.io install with bioconda

[!NOTE] Trim Galore v2.0 is a complete rewrite in Rust — a single binary with zero external dependencies, producing byte-identical output to v0.6.x. Same CLI, same output filenames, same report format. For details on what changed, benchmarks, and migration notes, see the v2.0 writeup.

Features

  • Adapter auto-detection — automatically identifies Illumina, Nextera, Small RNA, Stranded, and BGI adapters
  • Multi-adapter support — specify multiple adapters via -a " SEQ1 -a SEQ2" or -a "file:adapters.fa", with optional multi-round trimming (-n)
  • Quality trimming — Phred-based trimming from the 3' end (BWA algorithm)
  • Paired-end — single-pass processing of both reads with automatic pair validation
  • RRBS / bisulfite-seq — MspI end-repair artifact removal, directional and non-directional libraries
  • NextSeq / 2-colour trimming — poly-G removal for NovaSeq, NextSeq, and NovaSeq X
  • Poly-A / poly-G trimming — built-in tail trimming without external tools
  • Parallel compression--cores N for faster gzip I/O on multi-core systems
  • FastQC integration — optional post-trimming quality reports
  • MultiQC compatible — trimming reports parse cleanly in MultiQC dashboards (text + JSON)
  • Demultiplexing — 3' inline barcode demultiplexing

Installation

[!IMPORTANT] Beta testing v2.1.0-beta.1. The current stable release on crates.io is v2.0.0; v2.1.0 is in beta testing. Running cargo install trim-galore without --version installs v2.0.0 (the stable). To install the beta:

cargo install trim-galore --version 2.1.0-beta.1
docker pull ghcr.io/felixkrueger/trimgalore:beta

Feedback on the beta is welcome — open an issue with the beta-feedback label. This section will be removed at v2.1.0 GA.

From crates.io

Requires the Rust toolchain (1.85+):

cargo install trim-galore

From bioconda

conda install -c bioconda trim-galore

Build from source

git clone https://github.com/FelixKrueger/TrimGalore.git
cd TrimGalore
cargo build --release
# Binary is at target/release/trim_galore

Latest development version

To install the latest unreleased changes directly from the development branch:

cargo install --git https://github.com/FelixKrueger/TrimGalore --branch optimus_prime trim-galore --force

The --force flag overwrites any existing trim_galore binary (e.g. a v2.0.0 install from crates.io).

Docker

Multi-arch images (amd64 + arm64) are available from GitHub Container Registry:

docker run --rm -v "$PWD":/data -w /data ghcr.io/felixkrueger/trimgalore trim_galore input.fastq.gz

The dev tag tracks the latest development branch; versioned tags (e.g. v2.1.0) are published on release.

Prebuilt binaries

Prebuilt binaries for Linux (x86_64, aarch64) and macOS (Apple Silicon) are available on the Releases page. Intel Mac users: install via cargo install trim-galore (local build) or use the Docker amd64 image.

Usage

# Single-end
trim_galore input.fastq.gz

# Paired-end
trim_galore --paired file_R1.fastq.gz file_R2.fastq.gz

# With parallel compression (recommended for large files)
trim_galore --cores 8 --paired file_R1.fastq.gz file_R2.fastq.gz

# RRBS mode
trim_galore --rrbs --paired file_R1.fastq.gz file_R2.fastq.gz

# Run FastQC on trimmed output
trim_galore --fastqc input.fastq.gz

For the complete list of options:

trim_galore --help

Output files

Mode Trimmed output Reports
Single-end *_trimmed.fq.gz *_trimming_report.txt + *_trimming_report.json
Paired-end *_val_1.fq.gz / *_val_2.fq.gz per-read text + JSON reports
Unpaired (with --retain_unpaired) *_unpaired_1.fq.gz / *_unpaired_2.fq.gz

The JSON report contains the same statistics as the text report in a structured format (schema v1), designed for native parsing by MultiQC.

Documentation

  • User Guide — full reference for all options and modes
  • RRBS Guide — bisulfite sequencing and RRBS-specific guidance
  • v2.0 Writeup — benchmarks, architecture, and what changed in v2.0

Credits

Trim Galore was developed at The Babraham Institute by @FelixKrueger, now part of Altos Labs.

License

GPL-3.0

Dependencies

~6MB
~72K SLoC