# Need to trim primers but this will prevent merging sequences?

**URL:** https://forum.qiime2.org/t/need-to-trim-primers-but-this-will-prevent-merging-sequences/20944
**Category:** User Support
**Tags:** dada2, paired-end, cutadapt
**Created:** [September 30, 2021, 7:36pm UTC](https://forum.qiime2.org/t/need-to-trim-primers-but-this-will-prevent-merging-sequences/20944 "2021-09-30T19:36:43Z")
**Posts on this page:** 1
**Showing post:** 10

<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 4, 2021, 5:31pm UTC](https://forum.qiime2.org/t/need-to-trim-primers-but-this-will-prevent-merging-sequences/20944/10 "2021-10-04T17:31:37Z")

</div>

> [@MicrobeManager](#):
>
> I suppose I could try to truncate these at 228 and 229 nts but this would prevent the samples from overlapping, which is why you suggest using forward reads only, correct?

Correct.

> [@MicrobeManager](#):
>
> This is why I asked my original question, since I figured trimming the primers would have an effect on the sequence length and affect truncation and merging. The "best of" post also mentions that trimming on the 5' end will affect overlap, (the -2 for the 5' trim is included in the equation).
> 
> From the post:  
> 216 forward + (218 - 2) reverse - (16S-341F and 16S-805R) amplicon = overlap  
> 216 forward + 216 reverse - (805 - 341) amplicon = overlap  
> 432 - 464 = overlap  
> -32 = overlap

Presence of the primer at the 5' end only affects the overlap calculation itself, not the actual process of merging reads, because the merging process only cares about the bases in the region of overlap (aside from all the other quality control stuff). That is, you'd simply update the calculation to take into account primer removal, by subtracting out the primer lengths from both your sequence data and that of the expected amplicon length. If your expected amplicon is 464 bp, and your primers are 38 bp (_i.e._ 17 + 21) then your new expected amplicon length is 426 bp (assuming the amplicon length was originally calculated containing the primers). Thus, your overlap calculation would be based on this value. Does this make sense?

> [@MicrobeManager](#):
>
> I realize cutadapt is more appropriate for removing primers than p-trim-left, but in the end does it make a difference since I am still losing too many bp to merge?

Hard to say, but you can proceed with DADA2 / deblur trimming option. I've had to do this when the sequencing company would not provide the primer sequences (proprietary), but the did give me the trimming positions. In this case I had no choice but to use the trimming features of DADA2 / deblur.

> [@MicrobeManager](#):
>
> In that case could I just use the whole sequence given, trim off the primers, and call it a day? I don't have much leeway to trim the sequences, only 12 bp or so before losing the 12 bp overlap for merging (or I'll just use forward reads).

I am thinking it may be safer to simply just use the forward reads. I feel that you may be losing too much data by trying to merge them. Again, many users, including myself, have processed data by only using the forward reads. I'd strongly suggest that you processing the data two ways: by using the forward reads only, and with your merged data. From there you can make a judgement call as to which best fits your expectations.

---

_[View the full topic](https://forum.qiime2.org/t/need-to-trim-primers-but-this-will-prevent-merging-sequences/20944)._
