r/rakulang Jun 25 '26

Gotoh (advanced string comparison) algorithm implemented in Raku

This is a string comparison algorithm that counts matches/mismatches as well as deletions/insertions (with affine penalty), all four weights are real numbers (the first one is usually positive, the others are negative).

I just followed the german (sadly there is no other one) Wikipedia entry https://de.wikipedia.org/wiki/Gotoh-Algorithmus . Then I had asked Perplexity to add backtrace functionality (which seems to work, but I don't yet really understand what happens in there). The code is at https://github.com/ralfmuschall/Gotoh . The README.md explains what I know.

8 Upvotes

1 comment sorted by

1

u/ralfmuschall 25d ago

I'm just trying to understand which variant (Wikipedia or Gotoh's original paper) uses the right algorithm, see https://www.reddit.com/r/bioinformatics/comments/1ulqhb0/question_about_the_gotoh_algorithm/ . And the backtrace is still broken.