[Bioperl-l] mismatch string search in BioPerl?

Gene Cutler cutler@tularik.com
Thu, 25 Apr 2002 10:24:40 -0700


On Thursday, April 25, 2002, at 10:03  AM, Martin Schenker wrote:

> Hi all!
>
> Is there something like a mismatch string search as a module in 
> BioPerl? I
> try to find e.g. a 30 AA string (one mismatch allowed) in a sequence. I
> could write some sledge-hammer code permuting happily through the string
> with a "." on any possible position but perhaps someone had a
> better/faster/neater idea already?!?
>

I just needed to do the same thing.  I had the same initial permute 
idea, but decided that that would get quickly unworkable if I wanted to 
allow multiple substitutions.  Instead, I put together an algorithm that 
doesn't use regular expressions but rather compares one base at a time 
and starts over at the next position when the number of mismatches gets 
too high.

I will send you the code separately so that everyone doesn't need to 
download the attachment, but anyone else who would like this code is 
welcome to drop me a line.