The primers are still present after cutadpt

Hi, I have been trying to use cutadpt and dada2 for my data analysis, however, I found out that in my rep-seqs, the primers are still present.

Here are the codes I used
qiime tools import --type 'SampleData[SequencesWithQuality]' --input-path se-33-manifest --output-path single-end-demux.qza --input-format SingleEndFastqManifestPhred33V2

qiime cutadapt trim-single --i-demultiplexed-sequences single-end-demux.qza --p-front CCTGTCAGATCAAAAACGAC CAGGAACTACATCACAATAAC --p-adapter GTCGTTTTTGATCTGACAGG GTTATTGTGATGTAGTTCCTG --p-overlap 3 --p-error-rate 0.1 --p-match-read-wildcards --p-match-adapter-wildcards --p-discard-untrimmed --o-trimmed-sequences primer-trimmed-demux.qza --verbose > cutadapt-log.txt

qiime dada2 denoise-single
--i-demultiplexed-seqs primer-trimmed-demux.qza
--p-trunc-len 0
--p-max-ee 2
--p-trunc-q 2
--o-table table.qza
--o-representative-sequences rep-seqs.qza
--o-denoising-stats denoising-stats.qza
Here is some of the output files
cutadapt-log.txt (5.7 KB)

Thanks for the help!

Junli

Hello, I am not 100% sure as I haven't used single end reads before where the amplicon is smaller than the sequencing read. I think it is possibly the way your primers are inputted, have you tried using linked adapters?

Something like:

qiime cutadapt trim-single --i-demultiplexed-sequences single-end-demux.qza --p-adapter CCTGTCAGATCAAAAACGAC...CAGGAACTACATCACAATAAC --p-overlap 3 --p-error-rate 0.1 --p-match-read-wildcards --p-match-adapter-wildcards --p-discard-untrimmed --o-trimmed-sequences primer-trimmed-demux.qza --verbose > cutadapt-log.txt

You may need to tweak the primers as I wasn't sure which primers you're using, I assumed that CCTGTCAGATCAAAAACGAC is your forward read and CAGGAACTACATCACAATAAC is how your reverse primer will be read in the forward sequence. This way you will only retain sequences that the forward and reverse primers have been removed.

Hopefully this is it, let us know either way!

Hi, Jono,

This won't work for me. Because for my sequencing results, some have forward or reverse primers, some have both. I have to keep all these PCR products.

I read the log file again and saw his warning
"WARNING:
The adapter is preceded by 'C' extremely often.
The provided adapter sequence could be incomplete at its 5' end.
Ignore this warning when trimming primers."

Do you know how to fix this problem?

Thank you!

Junli

Hello @yuanyuan12543,

From the cutadapt docs:

Each read will be searched for all given adapters, but only the best matching adapter is removed .

and

By default, at most one adapter sequence is removed from each read, even if multiple adapter sequences were provided. This can be changed by using the --times option (or its abbreviated form -n ). Cutadapt will then search for all the given adapter sequences repeatedly, either until no adapter match was found or until the specified number of rounds was reached.

This is probably the source of the issue. I would just remove each primer and adapter sequence you expect one by one to avoid confusion. Qiime also does not support the linked adapters logic.

2 Likes

Thank you! I will try the --times option.

Junli

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.