<p>Hi,</p>

<p>I have a list of kmers, between 8-12 nt in length, and I would like to align these to a larger sequence returning all ungapped matches with at most 2 mismatches. I would like search to be exhaustive i.e. I do not want to miss anything. I wrote a python script to compute hamming distance for all substrings of my reference to the query, but it is too slow for many (1000s) queries on a reference of ~100,000nt.</p>

<p>What program would you recommend that does this and runs rather quickly. I have looked into Bowtie2, but I am unsure if it was designed to work with such short query sequences.</p>

<p>Thanks for the feedback.</p>

Ended up creating a custom python script that:

1. Broke up the larger sequence into kmers of required sizes into a set.
2. For each query kmer, compute possible all 2-mismatch kmers into a set.
3. interesect set from 1 with set from 2.

Works extremely quickly as my kmers are quite small (8-12 nt) and the search target is also relatively small (tens of kb).