How to trim adapters using Trimmomatic

Hi sir,
How are you?

Today, I introduce how to trim adapters using Trimmomatic.

Citation info: Bolger, A. M., Lohse, M., & Usadel, B. (2014). Trimmomatic: A flexible trimmer for Illumina Sequence Data. Bioinformatics, btu170.

Honestly, I cannot force you to do it because we can map NGS data without trimming adapters.

But, this article and discussion in Biosters are interesting. Let see it.

Anyway, I will put a simple example of trimming adapters using Trimmomatic and the published amplicon sequencing data.

STEP1: Creating a visual environment

1
2
3
4
5
6
conda create --name trimmomatic_env;
source activate trimmomatic_env;

conda config --add channels bioconda;
conda install --channel bioconda sra-tools trimmomatic;
conda config --remove channels bioconda;

STEP2: Downloading the example data.

*In this example, I use published amplicon sequence data. If you have your FASTQ files, skip this section.

1
fastq-dump DRR147084 --split-files --gzip --outdir /Volumes/databank1/ngs; # Download from SRR(DRR)

STEP3: Preparing the adapter sequences

You have to get FASTA sequences of adapters to use Trimmomatic. Please check the Authors Page.
According to that, TruSeq3-PE.fa is used in the MiSeq machine which performed sequencing the example data.

Download the Trimmomatic data from GitHub.

1
git clone https://github.com/timflutre/trimmomatic /Volumes/databank1/ngs/trimmomatic;

“TruSeq3-PE.fa” exists in /Volumes/databank1/ngs/trimmomatic/adapters/.

STEP4: Executing Trimmomatic to trim the adapters

1
2
3
4
5
6
trimmomatic PE -phred33 \
-trimlog log.txt /Volumes/databank1/ngs/DRR147084_1.fastq.gz /Volumes/databank1/ngs/DRR147084_2.fastq.gz \
/Volumes/databank1/ngs/paired_DRR147084_1.fq /Volumes/databank1/ngs/unpaired_DRR147084_1.fq \
/Volumes/databank1/ngs/paired_DRR147084_2.fq /Volumes/databank1/ngs/unpaired_DRR147084_2.fq \
ILLUMINACLIP:/Volumes/databank1/ngs/trimmomatic/adapters/TruSeq3-PE.fa:2:30:10 \
LEADING:20 TRAILING:20 SLIDINGWINDOW:4:15 MINLEN:36;

“paired_DRR147084_1.fq”, “paired_DRR147084_2.fq” are the trimmed FASTQ files.

Thank you so much…