Skip to content

Flag reference notes

Run trim_galore --help for the complete list of options with one-line descriptions and default values. This section focuses on flag interactions and scenarios that benefit from more context than the terse --help output.

A few combinations are worth knowing about:

  • --small_rna lowers the --length default to 18 bp (from 20) and auto-sets --adapter2 to the Illumina small RNA 5' adapter (GATCGTCGGACT) for paired-end data, unless the user provides their own --adapter2 value. The same holds for --bgiseq, which auto-sets the BGISEQ-500 Read 2 adapter.
  • --rrbs in paired-end directional mode auto-sets --clip_R2 2 to mask the 2 bp end-repair bias at the start of Read 2, unless the user provides their own --clip_R2 value. --non_directional intentionally skips this auto-clip.
  • --library <preset> expands into the four clip flags for that kit and nothing else (see Library presets). An explicit --clip_R1 / --clip_R2 / --three_prime_clip_R1 / --three_prime_clip_R2 wins over the preset value it displaces, and both numbers are logged. A preset that supplies --clip_R2 also suppresses the --rrbs auto-clip described above, since the value is already set. It is refused with --hardtrim5, --hardtrim3, --clock and --implicon, which do not honour the clip flags.
  • --clip_R1 / --clip_R2 / --three_prime_clip_R1 / --three_prime_clip_R2 warn and are ignored where the run cannot honour them: the two Read 2 flags on a single-end run, and all four under --hardtrim5, --hardtrim3, --clock and --implicon, which do their own fixed clipping. The text trimming report lists only the clipping that applied, so a single-end report names Read 1 alone; the JSON report records the values as requested, alongside a mode key saying which run type they were requested for.
  • -a2 / --adapter2 warns and is ignored in the same four shapes, for two different reasons: under --hardtrim5, --hardtrim3, --clock and --implicon, because those modes perform no adapter trimming at all, and on any single-end run, because there is no Read 2 to trim. The warning names which of the four applied: WARNING: -a2/--adapter2 was given but is not used in this mode (<reason>). Ignoring. Note that in those four shapes the value is not parsed either, so dropping --paired turns a malformed -a2 from a hard error into silence, and a valid one from applied into ignored.
  • --paired + --length discards the whole read pair unless both reads pass the length cutoff. To rescue the surviving read when only one becomes too short, add --retain_unpaired; the per-side cutoff is governed by --length_1/--length_2 (default 35 bp each).
  • --trim-n is suppressed under --rrbs (matches Perl v0.6.x; N-trimming interacts poorly with RRBS end-repair masking).
  • --discard_untrimmed keeps only reads where at least one adapter match was found. For paired-end, the pair is discarded only if neither read had an adapter.
  • --fastqc (and --fastqc_args, which implies it) is rejected on the four specialty modes and on --paired given a single interleaved uBAM with FASTQ output. Those paths write no report, so the flag fails loudly rather than being ignored; for the last one, adding --output-format ubam does produce a report. See FastQC.
  • --poly_g is auto-enabled when the data looks like it came from a 2-colour instrument (sequence-based detection on trailing G-runs). Use --no_poly_g to force-disable, or --poly_g to force-enable. It is independent of --nextseq (which is quality-score-based).

For library kits where --rrbs should not be used (Tecan Ovation RRBS Methyl-Seq, MseI-digested libraries), see When NOT to use --rrbs.

See Multiple adapter sequences for the three equivalent syntaxes (repeatable -a/-a2, embedded-string form, and file:adapters.fa). Supplementary notes:

  • Single-base expansion -a A{N} / -a2 A{N} repeats the base N times, matching Perl v0.6.x syntax.
  • Adapter auto-detection runs per pair in v2.x (Perl ran it once per invocation), so a shell glob trim_galore --paired *fastq.gz correctly handles multiple samples with different library types or 2-colour/4-colour chemistries.
  • --consider_already_trimmed <INT> suppresses adapter trimming entirely when no auto-detect probe exceeds that count (quality trimming still runs). Useful for feeding already-trimmed data through Trim Galore for QC reporting without over-trimming.

To keep v0.6.x scripts working unchanged, a small pre-parse hook recognises these Perl-era spellings and rewrites them to the Clap-friendly long-alias forms:

  • -r1 / -r2 rewrites to --r1 / --r2
  • -a2 rewrites to --a2
  • -a " SEQ1 -a SEQ2" (embedded-string form)

Plus A{N} brace expansion in -a / -a2. See the migration guide for the full picture.

You want to…Look here
Tune Phred quality trimmingQuality trimming
Specify or override adaptersAdapter trimming
Rescue under-length pairsPaired-end data
Set length and max-N cutoffsLength filtering
Read a trimming reportTrimming reports
Trim RRBS / bisulfite librariesRRBS mode and Bisulfite & RRBS
Use a specialty UMI modeMouse Epigenetic Clock and IMPLICON