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
- Head to the course section on Session 2 on EVA and download the adapters
- Head to the environment / instalation path of
trimmomaticand start out consulting the help page
trimmomatic --help- Is this documentation fulfilling for proper usage?
- 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.logNOTE: 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.
- How big an effect would you think it would have to set MINLEN: to roughly the maximum read length (ie. 200)?
- *In unix terms
2>means direct standard error to file (in this case trimmomatic/Ec003_trim_out.log), what sort of information doestrimmomaticprovide in their standard error output in this instance?
- After
trimmomatichas finished, prepare theFastQCenvironment / path once again and rerun fastq on the trimmed reads:
fastqc --outdir fastqc_reports --threads 2 trimmomatic/Ec003_trimmed_R*.gz- In your browser, open the old fastqc html (located in the
fastqc_reportsdirectory) reports for each reads in separate taps: Ec003.illumina_R1.trimmed_fastqc.html & Ec003.illumina_R2.trimmed_fastqc.html
- Load up and compare the latest reports in separate taps: trimmomatic/Ec003_trimmed_R1.fastq.gz & trimmomatic/Ec003_trimmed_R2.fastq.gz
- How big an impact did your parameters have on the basic statistics and Per base quality scores?