# Pcr.seqs nomatch=keep not giving expected output

**URL:** <https://forum.mothur.org/t/pcr-seqs-nomatch-keep-not-giving-expected-output/22308>\
**Category:** Commands in mothur\
**Created:** [March 12, 2025, 4:42pm UTC](https://forum.mothur.org/t/pcr-seqs-nomatch-keep-not-giving-expected-output/22308 "2025-03-12T16:42:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chdevogelaere](https://avatars.discourse-cdn.com/v4/letter/c/6f9a4e/32.png) [@Chdevogelaere](https://forum.mothur.org/u/Chdevogelaere)\
**Post date:** [March 12, 2025, 4:42pm UTC](https://forum.mothur.org/t/pcr-seqs-nomatch-keep-not-giving-expected-output/22308/1 "2025-03-12T16:42:50Z")

</div>

Hi,  
I’m running pcr.seqs in mothur v. 1.48 on a custom database using the following command

pcr.seqs(fasta=custom\_db.align, processors=8, keepdots=F, keepprimer=T, seed=8947961, start=1044, end=13862)

which leads to roughly 1/6 of my sequences to end up in the bad.accnos file. I assume this is because their start \> requested start and/or end \< requested end?

I was under the impression setting nomatch=keep would keep these sequences in the pcr.align file, but what it actually does is print the full 50.000bp sequence (instead of position 1044-13.862) to the scrap.pcr.align. Is this the intended behaviour? Is there a way to allow sequences with leading/trailing dots to not be rejected?

---

<div class="post-metadata">

**Author:** ![westcott](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.mothur.org/westcott/32/18_2.png) [@westcott](https://forum.mothur.org/u/westcott)\
**Post date:** [March 13, 2025, 3:58pm UTC](https://forum.mothur.org/t/pcr-seqs-nomatch-keep-not-giving-expected-output/22308/2 "2025-03-13T15:58:01Z")

</div>

The nomatch parameter is only used by mothur when you are using an oligos file. You can use the [chops.seqs](https://mothur.org/wiki/chop.seqs/) command to trim while allowing for leading/trailing gaps.

First trim from 13862:  
chop.seqs(fasta=current, keep=front, countgaps=true, numbases=13862)

To trim to position 1044 (13862-1043):  
chop.seqs(fasta=current, keep=back, countgaps=true, numbases=12819)

---

<div class="post-metadata">

**Author:** ![system](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.mothur.org/system/32/2_2.png) [@system](https://forum.mothur.org/u/system)\
**Post date:** [March 23, 2025, 3:58pm UTC](https://forum.mothur.org/t/pcr-seqs-nomatch-keep-not-giving-expected-output/22308/3 "2025-03-23T15:58:38Z")

</div>

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