Cutadapt failing to remove all primers

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.