Trimmomatic-0.39 is used to preprocess sequencing data fastq for pair-end reads (PE).

Installing trimmomatic-0.39

Download Trimmomatic-0.39 from its website to ‘Downloads’ as ‘Trimmomacti-0.30/trimmoatic-0.39.jar’. Then I copy trimmomatic-0.39 to ‘/usr/local/bin’ in order to globally run trimmomactic-0.39. Run trimmomatic program from the directory where the PE fastq files are.

system("conda install -c bioconda trimmomatic")
system("ls /usr/local/bin/") # check for trimmomatic-0.39.jar in 'bin'
system("cd ./nnthieu/Downloads/Trimmomatic-0.39")
system("sudo cp trimmomatic-0.39.jar /usr/local/bin/trimmomatic.jar")
system("nano ~./zshrc")
system("alias trimmomatic='java -jar /usr/bin/trimmomatic.jar' ")
system("source ~/.zshrc")

Download data

system("prefetch SRR957824")
system("fasterq-dump --verbose SRR957824")

The outputs are 2 fastq files: SRR957824_1.fastq SRR957824_2.fastq

Setting trimmers for trimmomatic as following:

system("trimmomatic PE SRR957824_1.fastq SRR957824_2.fastq \
out_PE_SRR957824_1.fastq out_UPE_SRR957824_1.fastq \
out_PE_SRR957824_2.fastq out_UPE_SRR957824_2.fastq \
ILLUMINACLIP:TruSeq3-PE.fa:2:30:10:2:True \
LEADING:3 \
TRAILING:3 \
ILLUMINACLIP:TruSeq2-PE.fa:2:30:10 \
SLIDINGWINDOW:5:30 \
MINLEN:35
")

The outputs of this function are 2 files: out_PE_SRR957824_1.fastq out_PE_SRR957824_2.fastq

Now I check the sequence quality of these 2 files:

Check sequence data quality with fastqc:

system("fastqc out_PE_SRR957824_1.fastq out_PE_SRR957824_2.fastq")

Display outputs

for out_PE_SRR957824_1_fastqc

These codes helps with showing html output file in a frame in ‘.md file’ that is easy to see.

output html files:

out_PE_SRR957824_2_fastqc