Cutadapt wrong behaviour
1
0
Entering edit mode
5.5 years ago
dllopezr ▴ 120

Hi, community!

I am using cutadapt v 1.18 in paired end mode to trim shotgun metagenomic sequences. My command line is the following:

cutadapt -q 20,20 -m 70:70 -a "ADAPTER_FORWARD" -A "ADAPTER REVERSE" -o forwardoutput.fastq -p reverseoutput.fastq input_forward.fastq input_reverse.fastq -e 0.18

where:

-q 20,20:  Trim for 5' end and 3'end when quality PHRED score is below 20.
-m 70:70:   Discard read in Forward and Reverse if read length is below of 70 pb 
-a:  Call forward adapater
-A: Call reverse adapter
-o: Filename of forward output
-p: Call the paired end mode and filename of reverse output
-e 0.18: Allow 18% of mismatch in adpater

The problem is that in reverse output I have a set of reads with phred values below to 20enter image description here

What could be the problem?

Thanks

cutadapt • 1.3k views
ADD COMMENT
1
Entering edit mode
5.5 years ago
gb ★ 2.2k

It behaves like expected, as you can see the ends are above q20.

The -q (or --quality-cutoff) parameter can be used to trim low-quality ends from reads

It looks at the ends, in other words from outside to inside. If a base has a quality score above 20 the trimming stops. But it can still be that the next base is below 20 again. The tool can not remove bases in the middle of the read. To solve this you could use a tool that uses a sliding window, this means that it will take the average or minimum of 3 bases and trims of all these 3 bases. You can also use sickle, this tool uses a sliding window but it checks from the 5' end till 3' end if the quality drop it trims of the rest of the read.

ADD COMMENT
1
Entering edit mode

Agreed. If you really want to remove sequences based on the average quality score, you might use skewer. Still, I do not see why this would be necessary.

ADD REPLY

Login before adding your answer.

Traffic: 2013 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