This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Is this a bug of Cutadapt

Hi,

I found I could't remove the 5' adapters of my fastq file by using Cutadapt. Is there any bugs or could you give me some suggestions to remove the adapters?

Thanks!

cutadapt --quality-base=33 -q 20 -a TGGAATTCTCGGGTGCCAAGG -g GTTCAGAGTTCTACAGTCCGACGATC -m 18 -M 26 C101.fastq -o C101_rm_adapt.fastq
cutadapt --quality-base=33 -q 20 -a TGGAATTCTCGGGTGCCAAGG -b GTTCAGAGTTCTACAGTCCGACGATC -m 18 -M 26 C101.fastq -o C101_rm_adapt_test.fastq
cutadapt --quality-base=33 -q 20 -a TGGAATTCTCGGGTGCCAAGG -b TTCTACAGTCCGACGATC -m 18 -M 26 C101.fastq -o C101_rm_adapt_test02.fastq

$ zcat C101_rm_adapt.fastq.gz|grep TTCTACAGTCCGACGATC | wc -l
2685599

$ grep TTCTACAGTCCGACGATC C101_rm_adapt_test.fastq | wc -l
2685599

$ grep TTCTACAGTCCGACGATC C101_rm_adapt_test02.fastq | wc -l
2828775

$ zcat C101_rm_adapt.fastq.gz|grep TTCTACAGTCCGACGATC | head

TTCTACAGTCCGACGATC
GTTCTACAGTCCGACGATC
TTCTACAGTCCGACGATC
TTCTACAGTCCGACGATC
TTCTACAGTCCGACGATC
TTCTACAGTCCGACGATC
TTCTACAGTCCGACGATC
GAGTTCTACAGTCCGACGATC
NGTTCTACAGTCCGACGATC
TTCTACAGTCCGACGATC

$ grep TTCTACAGTCCGACGATC C101_rm_adapt_test02.fastq | head

TTCTACAGTCCGACGATC
GTTCTACAGTCCGACGATC
TTCTACAGTCCGACGATC
TTCTACAGTCCGACGATC
TTCTACAGTCCGACGATC
TTCTACAGTCCGACGATC
TTCTACAGTCCGACGATC
GAGTTCTACAGTCCGACGATC
AGAGTTCTACAGTCCGACGATC
NGTTCTACAGTCCGACGATC

$ grep TTCTACAGTCCGACGATC C101_rm_adapt_test.fastq | head

TTCTACAGTCCGACGATC
GTTCTACAGTCCGACGATC
TTCTACAGTCCGACGATC
TTCTACAGTCCGACGATC
TTCTACAGTCCGACGATC
TTCTACAGTCCGACGATC
TTCTACAGTCCGACGATC
GAGTTCTACAGTCCGACGATC
NGTTCTACAGTCCGACGATC
TTCTACAGTCCGACGATC
softwareerror

Can you please post the stats that cutadapt provides after execution? I think it writes them to STDERROR.

In addition please simplify the example to a single simple, minimal data run that shows the problem. The current output is way too complicated to follow and you are in fact reusing a filename - though that alone would not explain the problem.

There is no STDERRORs.

1 answer

I found Cutadapt couldn't clean the adapter sequences completely when both using -a and -g, but could trim the adapter step by step (test.fastq could be download from here):

## At the same time: `-a` and `-g`

$ cutadapt --quality-base=33 -q 20 -a TGGAATTCTCGGGTGCCAAGG -g GTTCAGAGTTCTACAGTCCGACGATC -m 18 -M 26 test.fastq -o test_rm_adapt.fastq

$ grep TTCTACAGTCCGACGATC test_rm_adapt.fastq |wc -l
418

## successively:`-a`, `-g`

$ cutadapt --quality-base=33 -q 20 -a TGGAATTCTCGGGTGCCAAGG test.fastq -o test_rm_adapt_a.fastq

$ cutadapt --quality-base=33 -q 20 -g GTTCAGAGTTCTACAGTCCGACGATC -m 18 -M 26 test_rm_adapt_a.fastq -o test_rm_adapt_g.fastq


$ grep TTCTACAGTCCGACGATC test_rm_adapt_a.fastq |wc -l
448
$ grep TTCTACAGTCCGACGATC test_rm_adapt_g.fastq |wc -l
0

what is this GTTCAGAGTTCTACAGTCCGACGATC adapter?

Log in to answer this question.