# cut bases before adapter

**URL:** https://forum.qiime2.org/t/cut-bases-before-adapter/19689
**Category:** General Discussion
**Created:** [May 26, 2021, 3:10pm UTC](https://forum.qiime2.org/t/cut-bases-before-adapter/19689 "2021-05-26T15:10:32Z")
**Posts on this page:** 1
**Showing post:** 3

<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: [May 26, 2021, 4:58pm UTC](https://forum.qiime2.org/t/cut-bases-before-adapter/19689/3 "2021-05-26T16:58:58Z")

</div>

> [@zhonglin\_ma](#):
>
> found there are base(s）before my adapter (and it’s not my barcode sequences), what’s worse, these bases are not equal in length which make it difficult to cut them, is there any way to deal with it?

You can simply run [cutadapt](https://docs.qiime2.org/2021.4/plugins/available/cutadapt/). Any extra bases before the primers will be trimmed off. If you search the forum you'll find quite a bit of information on various ways to use cutadapt. For example:

> [@q2-cutadapt output](https://forum.qiime2.org/t/q2-cutadapt-output/17031/20):
>
> This is quite perplexing indeed. thinking Usually when I see such consistent loss across all the samples, it usually implies that the primer sequences are slightly incorrect. Or something else is consistently wrong... man_shrugging What sequencing protocol was used to generate this data? Do you have a reference? These primers are identical to the ones below, except for the T in place of K in the reverse primer. Which should not be an issue as K == G or T ([Herlemann et al. 2011](https://doi.org/10.1038/ismej.2011.41)). Bakt\_34…

> [@Cutadapt failing to remove all primers](https://forum.qiime2.org/t/cutadapt-failing-to-remove-all-primers/17264/2):
>
> 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 regio…

> [@q2-cutadapt output](https://forum.qiime2.org/t/q2-cutadapt-output/17031/24):
>
> Good news @jessica.song! I think I solved this. fireworks First, thank you for sending me the PDF describing the protocol. I noticed a key statement: pairs of primers (Fw-Rev or Rev-Fw) had to be present in the sequence fragments That is, this particular sequencing facility must expect mixed orientation reads. rotating_light Therefore you need to enter in both primers for each of the --p-front-\* commands (in 5' - 3' orientation). dna Like so: qiime cutadapt trim-paired \ --i-demu…

-Mike

---

_[View the full topic](https://forum.qiime2.org/t/cut-bases-before-adapter/19689)._
