Quick start
Trim Galore reads FASTQ files (plain or gzip-compressed) or unaligned BAM (auto-detected by content), trims adapters and low-quality bases, and writes trimmed FASTQ — or uBAM with --output-format ubam — plus a per-file trimming report. The defaults work for most Illumina libraries.
Single-end
Section titled “Single-end”trim_galore input.fastq.gzOutputs:
input_trimmed.fq.gz(trimmed reads)input.fastq.gz_trimming_report.txt(text report)input.fastq.gz_trimming_report.json(structured report for MultiQC)
Paired-end
Section titled “Paired-end”trim_galore --paired sample_R1.fastq.gz sample_R2.fastq.gzOutputs:
sample_R1_val_1.fq.gzandsample_R2_val_2.fq.gz(validated paired reads)- A trimming report per input file
Parallel processing
Section titled “Parallel processing”Speedup is near-linear up to about 8 cores on v2.1.0-beta.7; beyond that, gzip-output I/O on the storage layer typically becomes binding and adding cores helps less. For nf-core / Snakemake / CWL workflows, --cores 8 is also the saturation point.
trim_galore --cores 8 --paired sample_R1.fastq.gz sample_R2.fastq.gzRRBS libraries
Section titled “RRBS libraries”trim_galore --rrbs --paired sample_R1.fastq.gz sample_R2.fastq.gzFor non-directional libraries, add --non_directional. See the Bisulfite & RRBS guide for the biology behind these modes.
Run FastQC alongside
Section titled “Run FastQC alongside”trim_galore --fastqc input.fastq.gzFastQC is built in via the bundled fastqc-rust library: no Java or external fastqc install needed. Outputs are FastQC 0.12.1-compatible HTML + ZIP files. Works on both FASTQ and uBAM output paths.
Unaligned BAM (uBAM)
Section titled “Unaligned BAM (uBAM)”uBAM input is auto-detected — no flag needed. Paired reads must arrive as a single interleaved BAM with mates adjacent (samtools sort -n / collate / Picard / fgbio all produce this order). Two separate BAM files are not supported and are rejected before any output is written:
# uBAM in → FASTQ out (default)trim_galore sample.bamtrim_galore --paired interleaved.bam
# uBAM in → uBAM out, preserving CB/UB aux tags (10X single-cell shape)trim_galore --output-format ubam --preserve-tags CB,UB sample.bamPaired uBAM output is a single interleaved BAM (<stem>_val.bam), matching samtools/Picard/fgbio convention. See Output files for the full contract.
Common combinations
Section titled “Common combinations”# Small RNA: auto-lowers --length to 18 bptrim_galore --small_rna input.fastq.gz
# 2-colour aware quality trimming (NextSeq, NovaSeq): replaces -qtrim_galore --2colour 20 input.fastq.gz
# Force-disable poly-G trimming (it is auto-enabled on 2-colour data)trim_galore --no_poly_g input.fastq.gz
# Trim a poly-A tail (mRNA-seq libraries)trim_galore --poly_a input.fastq.gz
# Multiple adapters, up to 3 occurrences per readtrim_galore -a AGCTCCCG -a TTTCATTAT -a TTTATTCGGAT -n 3 input.fastq.gz
# Adapters from a FASTA filetrim_galore -a "file:./adapters.fa" input.fastq.gzGet the full flag list
Section titled “Get the full flag list”trim_galore --helpFor context on individual flags and how they interact, see the user guide.