Trim Galore Tutorial

Overview of Trim Galore

Trim Galore is a bioinformatics tool designed to simplify the process of quality control and adapter trimming of raw sequencing data. It is essentially a wrapper script that combines the functionalities of Cutadapt and FastQC to provide a streamlined experience for preprocessing FastQ files. This tool is particularly useful for researchers and bioinformaticians who are dealing with next-generation sequencing (NGS) data, as it automates the tedious task of cleaning up sequence reads before analysis.

The main features of Trim Galore include:

  • Acceptance of standard or gzip compressed FastQ files.
  • Integration with FastQC for quality control analysis post-trimming.
  • Default adapter trimming using the first 13 base pairs of Illumina standard adapters, with the flexibility to specify other sequences.
  • Specialized processing for MspI-digested RRBS (Reduced Representation Bisulfite-Seq) libraries, including the removal of biased methylation positions.
  • Customizable Phred quality score thresholds and adapter removal stringency.
  • Capability to discard sequences that become too short after trimming, with special considerations for paired-end files to maintain read pair information.
  • Optional additional trimming of 1 base pair from the 3' end of reads to prevent alignment issues with certain tools like Bowtie 1.

Trim Galore is written in Perl and is released under the GNU GPL v3 or later license. It is a stable and mature tool that has been widely adopted in the bioinformatics community for its ease of use and efficiency.


To install Trim Galore, you will need to have a functional version of Cutadapt installed on your system, as Trim Galore relies on it for adapter trimming. Optionally, FastQC can also be installed if you wish to perform quality control checks on your trimmed files.

The installation process typically involves the following steps:

  1. Download the latest version of Trim Galore from the official Babraham Bioinformatics website or from its GitHub repository.
  2. Extract the downloaded archive to a directory of your choice.
  3. Ensure that the Trim Galore script is executable. You can do this by running the command chmod +x trim_galore in the terminal within the directory where the script is located.
  4. Add the directory containing the Trim Galore script to your system's PATH environment variable for easy access from any location in the terminal.

Quick Start

Once Trim Galore is installed, you can start using it with a simple command in the terminal. Here's a quick example of how to run Trim Galore on a single FastQ file:

trim_galore my_sequences.fastq

This command will perform quality and adapter trimming on the file my_sequences.fastq using the default settings. The output will be a new FastQ file with the suffix _trimmed indicating that the file has been processed by Trim Galore.

Code Examples Of Popular Commands

Here are five popular commands that you can use with Trim Galore to customize the trimming process according to your needs:

  1. Trimming paired-end files:
trim_galore --paired read1.fastq read2.fastq

This command will process both files of a paired-end dataset and ensure that the resulting output files remain synchronized.

  1. Specifying a custom adapter sequence:
trim_galore --adapter AGATCGGAAGAGCACACGTCT my_sequences.fastq

With this command, you can specify a custom adapter sequence that Trim Galore will use for trimming instead of the default Illumina adapter.

  1. Changing the quality threshold:
trim_galore --quality 20 my_sequences.fastq

This command sets the Phred quality score threshold to 20. Only bases with a quality score higher than this threshold will be retained after trimming.

  1. Trimming and retaining unpaired reads:
trim_galore --paired --retain_unpaired read1.fastq read2.fastq

When working with paired-end files, this command will retain reads that do not have a corresponding pair after trimming.

  1. Specifying the length of trimmed reads:
trim_galore --length 36 my_sequences.fastq

This command ensures that no trimmed read is shorter than 36 base pairs. Reads that become shorter than this threshold during the trimming process will be discarded.

Trim Galore is a versatile tool that can be customized with a variety of options to fit the specific needs of your sequencing project. Whether you are working with single-end or paired-end reads, standard or specialized libraries, Trim Galore provides a user-friendly interface to ensure that your data is clean and ready for downstream analysis.