Some of us that started sequence analysis probably always wondered how the optimal matching (Needleman-Wunsch, Levenshtein, global alignment) algorithm works. So I decided to use the tools of biostatisticians and try to explain the algorithm using an interactive app.

Basically, the calculations start from the top left square (first row and column are initiated as well–for those of you who want to code it themselves), and the final dissimilarity score will appear in the bottom right square. The calculations in between the two squares are explained in the tooltip, just hover over each with the mouse pointer. Have fun!