Trimmomatic MINLEN option doesn't work
1
0
Entering edit mode
11 months ago
Apprentice ▴ 90

Hi.

I'm using Trimmomatic v0.39 to trim low quality base. I set MINLEN option to 50 as below.

java -Xmx4g -jar trimmomatic-0.39.jar PE 
-threads 1 -phred33 -trimlog ${id}.trimlog 
${id}_R1.fastq.gz 
${id}_R2.fastq.gz 
${id}_R1.paired.fastq.gz ${id}_R1.unpaired.fastq.gz 
${id}_R2.paired.fastq.gz ${id}_R2.unpaired.fastq.gz 
TRAILING:20 MINLEN:50 
ILLUMINACLIP:adapters.fa:2:30:10

However, trimmed fastq file had reads with length<50. I thought it might be dropped if both reads are less than MINLEN in length in the case of paired end. In other words, if one read length is less than MINLEN, but the other read is longer than MINLEN, it will not be dropped. Is this idea correct?

RNA-Seq • 550 views
ADD COMMENT
0
Entering edit mode

I guess if you saw that then that is how trimmomatic must be operating to help you keep the maximum data. If you want both reads to be > 50 bp you could filter them afterwards (reformat.sh from BBMap suite can help with that).

ADD REPLY
0
Entering edit mode

Thank you for your advice. I'll try it.

ADD REPLY
4
Entering edit mode
11 months ago
antonioggsousa ★ 2.3k

Hi,

I think the option MINLEN works just fine. Although trimmomatic trims according the order of parameters given as it is stated in its documentation (here - second page, first paragraph):

Processing Order

The different processing steps occur in the order in which the steps are specified on the command line. It is recommended in most cases that adapter clipping, if required, is done as early as possible, since correctly identifying adapters using partial matches is more difficult.

So, its discarding all the reads below the MINLEN, i.e., 50 bp, but after that is performing the clipping of Illumina adapters. Since you can have just reads that are around 50, let's say 55 bp, after clipping off the adapters, you'll end up with reads below 50 bp.

I guess that if you want all your reads to be >50 bp just put MINLEN:50 after ILLUMINACLIP:adapters.fa:2:30:10. Personally, the first parameter that I would choose to give to trimmomatic is ILLUMINACLIP:adapters.fa:2:30:10 and only then TRAILING:20 MINLEN:50 as a matter of habit.

I hope this helps,

António

ADD COMMENT
0
Entering edit mode

Thank you for your great advice. I didn't know that trimmomatic trims according the order of parameters given.

I will update my command!

ADD REPLY

Login before adding your answer.

Traffic: 2627 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6