Cutadapt failing to remove all primers

Many thanks to your answers.

In fact, the I have tried this commend using 1 thread, 4 threads, 10 threads. They were all be killed :dizzy_face:

I will try using 1 thread again, and also try using --p-parttree or fragment-insertion.

By the way, I feel uncertain about the step of cutadapt trim-paired

  1. I found the seqs of the rep-seqs still containing the reverse primers. Why...

The used code was:
qiime cutadapt trim-paired --p-cores 20 --i-demultiplexed-sequences pre_5/demultiplexed-seqs.qza --p-anywhere-f CCTACGGGNGGCWGCAG --p-anywhere-r GGACTACHVGGGTATCTAATCC --o-trimmed-sequences pre_5/trimmed-seqs.qza --quiet

  1. In QIIME1, there is a parameter in split_barcode to adjust the sequence orientation according to the barcode. Is the QIIME2 has the same function so that the primers can be correctly recognized and trimmed??

Oh, I am really helpless... :pensive:

Hi @Moon

Add the flags --p-match-read-wildcards and --p-match-adapter-wildcards to your command. This will allow matching of IUPAC wild cards such as H, V, N, etc… This is why your primers are not currently being trimmed. So, adding these flags, at least the --p-match-adapter-wildcards flag should help.

This also may explain why you end up with having so many sequences. The variety of alternative bases (due to the primer wild cards) create more variation in your sequence in the primer region. Artificially inflating the number of unique sequences in your data.

Furthermore, I’d advise adding the flag --p-discard-untrimmed as well. This will discard any sequences in which both primers could not be trimmed from the sequences. If you do not use this, then you may have sequences with at least one or both primers remaining in your seqeunces. That is, some sequences may have accumulated slightly more sequencing errors and cannot be matched to your primer sequence. Discarding sequences, in which you cannot extract the primers is a great form of quality control as it will help mitigate denoising, alignment and phylogentic issues later on. See qiime cutadapt trim-paired --help for more details.

Also, if you want to see how well cutadapt is working I’d advise not to use --quiet. In fact, I’d use --verbose, and redirect the onscreen output to a file. You should be able to add > cutadapt.log to the end of your command.


Thank you so much for giving such a detailed answer, which really helps me a lot!


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