Skip to content

Migrating from v0.6.x

Trim Galore v2 is a Rust rewrite of the Perl wrapper, built as a drop-in replacement for v0.6.x. Outputs match the Perl original for the core flag set, verified end-to-end via the nf-core/rnaseq integration matrix. The rewrite adds capabilities the Perl version did not have.

  • Command name. Still trim_galore.
  • Output filenames. *_trimmed.fq.gz, *_val_1.fq.gz / *_val_2.fq.gz, *_unpaired_*.fq.gz, *_trimming_report.txt. Drop-in for any pipeline that consumes these names.
  • Trimming-report text format. Cutadapt-compatible header is retained for MultiQC backwards compatibility.
  • CLI flags. --paired, --rrbs, --non_directional, --length, --clip_R1, --three_prime_clip_R2, and friends all behave the same way.
  • Per-flag output bytes. Verified byte-identical to Perl for the core feature set across the nf-core/rnaseq matrix.
FeaturePerl v0.6.xRust v2
ArchitectureWrapper around Cutadapt and pigzSingle process, single binary
DependenciesPerl, Python, Cutadapt, Java, igzip, pigz, external FastQCNone (FastQC bundled via fastqc-rust)
Paired-endTwo sequential Cutadapt runs + pair validationSingle pass
ThreadsUp to ~3N+3 (Cutadapt + pigz + pigz/igzip)Exactly N+4
Adapter auto-detectionOnce per invocationPer pair (handles mixed-library globs)
BGI/DNBSEQ adapter--bgiseq onlyAuto-detected too
Multi-adapter syntaxEmbedded-string onlyRepeatable -a / -a2, plus embedded and FASTA
Poly-G handlingNoneAuto-detected for 2-colour instruments
Poly-A trimmingNoneBuilt-in --poly_a
--implicon UMI lengthHardcoded 8 bpConfigurable (default 8)
JSON trimming reportNoneIncluded alongside text report
--version provenanceJust versionVersion + git hash + target + build timestamp
Reproducible buildsnot availableSOURCE_DATE_EPOCH produces a bit-identical binary

A small pre-parse hook recognises Perl-era flag spellings and rewrites them to the Clap-friendly long-alias forms, so existing scripts keep working without changes:

Perl formv2 alias
-r1 N--r1 N
-r2 N--r2 N
-a2 SEQ--a2 SEQ
-a " SEQ -a SEQ" (embedded)Recognised directly
-a A{N} brace expansionRecognised directly
  • Colorspace input. Rejected with a clear error message, matching v0.6.x behaviour. Colorspace data has not been generated in years.
  • The per-flag Cutadapt version and Python version lines in the parameter summary. Cutadapt and Python are not subprocesses in v2, so those lines are dropped. The MultiQC parser already handles their absence.

For poly-A trimming, prefer the dedicated --poly_a flag — it has proper paired-end semantics (3' end on R1, 5' end on R2) and is the supported v2 path. The -a 'A{N}' form (a v0.6.x workaround that pre-dates --poly_a) still works and the brace expansion still produces AAAA… byte-for-byte, but the alignment DP may produce slightly different matches than Perl v0.6.x on highly-repetitive adapter patterns: every position in a poly-A read has potential matches, so the choice of "where the adapter starts" reduces to a tie-break that Cutadapt and the Rust port resolve differently. Both are valid global-best alignments under their respective tie-break rules — neither is wrong by spec — but the byte-identity guarantee in the table above does not extend to single-base repeating adapters.

To move an existing pipeline from v0.6.x to v2:

  1. Replace the install. cargo install trim-galore or pull the Docker image. Drop the conda environment with Cutadapt and pigz.
  2. Threading. Drop the task.cpus - 4 Nextflow shim if you used it. Pass --cores task.cpus directly.
  3. Auto-detection scripts. If you parsed the auto-detect line, note that v2 may now report BGI/DNBSEQ for BGI data instead of falling back to Illumina.
  4. MultiQC. No changes needed. The report format is unchanged.
  5. JSON report. Optional new artifact. Consume it for cleaner programmatic parsing if your dashboard wants structured data.

If you hit a regression vs v0.6.x output, open an issue with the --version output and a minimal reproducer. Byte-identity for the core flag set is a hard guarantee in v2.