Keep It Simple, Stupid | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Hi,
I have two strings that I want to compute the number of mismatches between them. These two strings are of the "same" size. Let's call them 'source' string and 'target' string. Now, the problem is that the 'source' string may come in ambiguous form, meaning that in one position they may contain more than 1 (upto 4) characters. The ambiguous position is marked with square bracketed [ATCG] region. Is there an efficient way I can compute the number of mismatch between "source" and "target", of the above situation? The example is as follows: Example 1 (where the source is ambiguous): I have no problem when dealing when 'source' string is not ambigous like this Example 2 (where the source is NOT ambiguous): For example I can use bitwise operator to do it. But for ambigous case I'm lost. PS: "target" string can be assumed to be never ambiguous. Regards, Edward In reply to Mismatch Positions of Ambiguous String by monkfan
|
|