This is an old revision of the document!
Basic Usage of Trimmomatic
The shell script below will trim/clean up Illumina paired reads (for options see http://www.usadellab.org/cms/?page=trimmomatic).
If you have your own set of adapters, let's say in the following path (/path/to/userdir/Adapters.fas), you need to place such information after you have declared the Paired and Unpaired file names <ILLUMINACLIP:/path/to/userdir/Adapters.fas:2:30:10>. If you don't do this (because you don't know which adapters were used for the library), don't worry… you can use the script as it is, since trimmomatic will use its own Illumina provided adapters and search them (All adapters by default will be searched)
Do not forget to provide your directories names when /path/to/userdir/ appears
input can be fastq (decompressed or compressed as gz), output will be decompressed by default.
always check if there is a newer update of Trimmomatic available in perun.
== shell script: do no leave spaces between lines
Paired End Mode:
#!/bin/bash #$ -S /bin/sh . /etc/profile #$ -cwd #$ -pe threaded 10 cd /path/to/userdir java -jar /opt/perun/Trimmomatic-0.36/trimmomatic-0.36.jar PE -threads 10 -phred33 -trimlog LOG_NAME.out READS_R1.fastq READS_R2.fastq READS_R1_PairNtrim.fq READS_R1_unPairNtrim.fq READS_R2_PairNtrim.fq READS_R2_unPairNtrim.fq HEADCROP:20 LEADING:10 TRAILING:10 SLIDINGWINDOW:10:25 MINLEN:40
Single End Mode:
#!/bin/bash #$ -S /bin/sh . /etc/profile #$ -cwd #$ -pe threaded 10 cd /path/to/userdir java -jar /opt/perun/Trimmomatic-0.36/trimmomatic-0.36.jar SE -threads 10 -phred33 -trimlog LOG_NAME.out READS.fastq READS_Ntrim.fq HEADCROP:20 LEADING:10 TRAILING:10 SLIDINGWINDOW:10:25 MINLEN:40
This will perform the following:
• HEADCROP: Cut the specified number (20) of bases from the start of the read.
• LEADING: Remove bases in the start of a read if the quality is below quality 10. (LEADING:10)
• TRAILING: Remove bases in the end of a read if the quality is below quality 10. (TRAILING:10)
• SLIDINGWINDOW: Perform a sliding window trimming, cutting once the average quality within the window falls below a threshold. Scan the read with a 10-base wide sliding window, cutting when the average quality per base drops below 25 (SLIDINGWINDOW:10:25)
• MINLEN: Drop the read if it is below a specified length (below 40) (MINLEN:40).
• -phred33: Quality scores in Phred33 format. [https://en.wikipedia.org/wiki/FASTQ_format]
• ILLUMINACLIP: Remove adapters <ILLUMINACLIP:/path/to/userdir/Adapters.fas:2:30:10> (/path/to/userdir/Adapters.fas, adapter file).
Parameters listed here are a little strict. You can adjust them based on your demand. To test the quality of the read, use fastqc first to get a quality control report.
