0
$\begingroup$

When I do:

SequenceAlignment["-0.999995756767227832383453368554576431549","-0.999995756767227832383346049698547342279"]

I get:

{-0.99999575676722783238,{,3},34,{533,6049},6,{,9},8,{5,},54,{5,},7,{6,3},4,{3154,227},9}

Clearly there is an extra 3 that is missing as a common sequence number at the end:

-0.9999957567672278323834...
-0.9999957567672278323833...

Is this a bug? (Using Mathematica 10.0.2)

$\endgroup$

2 Answers 2

1
$\begingroup$

Mathematica took the alignments in the following way

-0.99999575676722783238x34
-0.99999575676722783238334
$\endgroup$
3
  • $\begingroup$ Yes, but why this behavior? $\endgroup$ Mar 10, 2015 at 14:09
  • 1
    $\begingroup$ @Giovanni Well, I haven't checked the details but it's using the Needleman-Wunsch algorithm. $\endgroup$ Mar 10, 2015 at 14:22
  • $\begingroup$ Ok. Thanks. I thought it was an exact method of finding these sequences. $\endgroup$ Mar 10, 2015 at 16:48
1
$\begingroup$

If you increase the `GapPenalty" (default is zero) you can pick up the 3; however, the difference sequences get longer and the total similarity score decreases.

SequenceAlignment["-0.999995756767227832383453368554576431549", \
"-0.999995756767227832383346049698547342279", GapPenalty -> 3]

{"-0.999995756767227832383", {"453368554", "346049698"}, "5", {"7643154", "4734227"}, "9"}

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.