in reply to mismatching characters in dna sequence

Have you tried binary xoring the strings? Zeros will occur in positions that are occupied by the same letter, the other results are unique for all combinations.
perl -e '$s1 = "AAAACCCCTTTTGGGG"; $s2 = "ACTGACTGACTGACTG"; print $s1 ^ $s2; ' | hexdump 00000000 00 02 15 06 02 00 17 04 15 17 00 13 06 04 13 00

Replies are listed 'Best First'.
Re^2: mismatching characters in dna sequence
by prbndr (Acolyte) on Dec 30, 2011 at 01:08 UTC
    i don't know what this means...
      If you apply binary xor (exclusive-or) on the strings, you get another string as a result. This string contains the null character in places where the two strings were identical, and various other characters in positions where the two strings were different. For each tuple of letters, the result is different.
        For each tuple of letters, the result is different.

        A problem might be (depending on what exactly the OP needs) that "A" ^ "T" is the same as "T" ^ "A" (etc.), so the direction of the change (i.e. A->T or T->A) would be lost with this simple approach.

        yes, i need to know the direction of change.