I have never used the difflib or similar and have a few questions.<div>I am working with DNA sequences of length 25. I have a list of 230,000 and need to look for each sequence in the entire genome (toxoplasma parasite) I am not sure how large the genome is but more that 230,000 sequences.</div>
<div>The are programs that do this and really fast, and they eve do partial matches but not quite what I need. So I am looking to build a custom solution.</div><div>I need to look for each of my sequences of 25 characters example(<span class="Apple-style-span" style="font-family: Verdana; ">AGCCTCCCATGATTGAACAGATCAT).</span></div>
<div><span class="Apple-style-span" style="font-family: Verdana; ">The genome is formatted as a continuos string (CATGGGAGGCTTGCGGAGCCTGAGGGCGGAGCCTGAGGTGGGAGGCTTGCGGAG.........)</span></div><div><font class="Apple-style-span" face="Verdana"><br>
</font></div><div><font class="Apple-style-span" face="Verdana">I don&#39;t care where or how many times on if it exists. This is simple I think, <span class="Apple-style-span" style="font-family: sans-serif; font-size: 16px; "><tt class="descclassname" style="background-color: transparent; padding-top: 0px; padding-right: 1px; padding-bottom: 0px; padding-left: 1px; font-size: 0.95em; ">str.</tt><tt class="descname" style="background-color: transparent; padding-top: 0px; padding-right: 1px; padding-bottom: 0px; padding-left: 1px; "><span class="Apple-style-span" style="font-size: small;">find</span></tt><tt class="descname" style="background-color: transparent; padding-top: 0px; padding-right: 1px; padding-bottom: 0px; padding-left: 1px; "><font class="Apple-style-span" face="Verdana"><span class="Apple-style-span" style="font-size: small;">(AGCCTCCCATGATTGAACAGATCAT)</span></font></tt></span></font></div>
<div><font class="Apple-style-span" face="Verdana"><br></font></div><div><font class="Apple-style-span" face="Verdana">But I also what to find a close match defined as only wrong at 1 location and I what to record the location. I am not sure how do do this. The only thing I can think of is using a wildcard and performing the search with a wildcard in each position. ie 25 time.</font></div>
<div><font class="Apple-style-span" face="Verdana">For example</font></div><div><font class="Apple-style-span" face="Verdana">AGCCTCCCATGATTGAACAGATCAT</font></div><div><font class="Apple-style-span" face="Verdana">AGCCTCCCATGATAGAACAGATCAT</font></div>
<div><font class="Apple-style-span" face="Verdana">close match with a miss-match at position 13</font></div><div><font class="Apple-style-span" face="Verdana"><br></font></div><div><font class="Apple-style-span" face="Verdana"><br>
</font></div><div><div name="mailplane_signature"><table><tbody><tr><td width="80">
<img src="http://www.gravatar.com/avatar/226e40fdc55d4597a46279296a616384.png">
</td><td width="10"></td><td width="127" align="center">
<div style="padding-right: 5px; padding-left: 5px;
font-size: 11px; padding-bottom: 5px; color: #666666;
padding-top: 5px">
  <p><strong>Vincent Davis<br>
    720-301-3003
  </strong><br>
    
    <a href="mailto:vincent@vincentdavis.net">vincent@vincentdavis.net</a>  </p>
<div style="font-size: 10px">
  <a href="http://vincentdavis.net">my blog</a> |
  <a href="http://www.linkedin.com/in/vincentdavis">LinkedIn</a></div></div></td></tr><tr></tr></tbody></table></div></div>