# Cutadapt failing to remove all primers

**URL:** <https://forum.qiime2.org/t/cutadapt-failing-to-remove-all-primers/17264>\
**Category:** User Support\
**Created:** [October 29, 2020, 4:45am UTC](https://forum.qiime2.org/t/cutadapt-failing-to-remove-all-primers/17264 "2020-10-29T04:45:44Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![SoilRotifer](https://forum.qiime2.org/user_avatar/forum.qiime2.org/soilrotifer/32/21071_2.png) [@SoilRotifer](https://forum.qiime2.org/u/SoilRotifer)\
**Post date:** [October 29, 2020, 2:29pm UTC](https://forum.qiime2.org/t/cutadapt-failing-to-remove-all-primers/17264/2 "2020-10-29T14:29:57Z")

</div>

Hi @Moon

> [@Moon](#):
>
> I found the seqs of the rep-seqs still containing the reverse primers. Why…

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.

---

_[View the full topic](https://forum.qiime2.org/t/cutadapt-failing-to-remove-all-primers/17264)._
