Trimmomatic

Goal

Learn to trim out adaptors and low quality bases and sub-sequences from raw read files.

Background

One of the more used trimming tools are trimmomatic, while having a quite complex syntax to use, it has historically been used.

Practical

In this exercise we are using trimmomatic to trim out unwanted bases as well as adaptors.

We will run the analysis on Ec003 today.

Instructions

We assume that you have installed NanoPlot prior to the course but if not, you can find installation instructions and usage help on Github:

http://www.usadellab.org/cms/?page=trimmomatic

  1. Head to the course section on Session 2 on EVA and download the adapters
  1. Head to the environment / instalation path of trimmomatic and start out consulting the help page
trimmomatic --help
  1. Locate both illumina Read mate files for Ec003 which you downloaded yesterday and attempt to write the following command line (Please read the notes below the code window before pressing ENTER!)
mkdir trimmomatic
trimmomatic PE -threads [X] -phred33 -summary trimmomatic/Ec003_summary.txt -validatePairs Ec003.illumina_R1.fastq.gz Ec003.illumina_R2.fastq.gz trimmomatic/Ec003_trimmed_R1.fastq.gz trimmomatic/Ec003_unpaired_R1.fastq.gz trimmomatic/Ec003_trimmed_R2.fastq.gz trimmomatic/Ec003_unpaired_R2.fastq.gz ILLUMINACLIP:NexteraPE-PE.fa:2:30:10 LEADING:[Y] TRAILING:[Z] MINLEN:[Æ] 2> trimmomatic/Ec003_trim_out.log

NOTE: Replace [x] with number of threads, e.g. [x]3. Replace [Y] and [Z] with your desired minimum Q score threshold. Replace [Æ] with your desire minimum length.

  1. After trimmomatic has finished, prepare the FastQC environment / path once again and rerun fastq on the trimmed reads:
fastqc --outdir fastqc_reports --threads 2 trimmomatic/Ec003_trimmed_R*.gz
  1. In your browser, open the old fastqc html (located in the fastqc_reports directory) reports for each reads in separate taps: Ec003.illumina_R1.trimmed_fastqc.html & Ec003.illumina_R2.trimmed_fastqc.html
  1. Load up and compare the latest reports in separate taps: trimmomatic/Ec003_trimmed_R1.fastq.gz & trimmomatic/Ec003_trimmed_R2.fastq.gz