Skip to the content.

Trimming with Trim Galore

This tutorial gives a very brief introduction to read trimming. Read trimming may be desirable to remove adapter sequence or poor quality sequence from reads prior to analysis.

There are a number of tools that can be used for read trimming e.g.:

They have a varying range of clipping and trimming features, but for simple removal of adapter sequences they all perform the same, but the usage is different for each.

In this example we will be using Trim Galore, a wrapper around Cutadapt and FastQC to consistenly apply adapter and quality trimming to FastQ files.

Fastq with adapter contamination

Here is a toy data set which features adapter contamination called Test_adapter_contamination.fq.gz. This data can be found in this location:

/gpfs1/cl/mmg3320/course_materials/trimmomatic_example

Step 1: Run fastqc on Test_adapter_contamination.fq.gz

Step 2: Open the FASTQC file, either in RStudio or transfer via FileZilla, and interpret the results.

Big take away: You should see that a number of the plots show problems with the data. In particular the “Per sequence GC content” plot and the “Adapter Content” plot:

This shows that there is significant contaiminaion with “Illumina Universal Adapter”.

Trimming with the Trim Galore

USAGE: trim_galore [options] <filename(s)>

Some general options:

More options can be found here

Step 3: Now that you have read over the usage, run Trim Galore on Test_adapter_contamination.fq.gz.

  1. You will need to load the trimgalore module
  2. You will also need to load the cutadapt and the fastqc module
  3. Use the --illumina option in your command
  4. Be sure to run FASTQC on the trimmed fastq file as well

After you are done, inspect the FASTQC output. You should now see that the Illumina Universal Adapter have been successfully removed:

If you look at the “Overrepresented sequences” table. You may observe that there are other contaminants that remain. You may with to modify the adapter fasta file to include these so that they are also removed.