Makematics: Sequence Alignment

Via wikipedia:
In bioinformatics, a sequence alignment is a way of arranging the sequences of DNA, RNA, or protein to identify regions of similarity that may be a consequence of functional, structural, or evolutionary relationships between the sequences. Aligned sequences of nucleotide or amino acid residues are typically represented as rows within a matrix. Gaps are inserted between the residues so that identical or similar characters are aligned in successive columns.

Example of professional sequence alignment program

Sequence alignment is a powerful research tool, and finding the longest common substring of a DNA set seemed like the perfect use of this week’s dynamic programming exercise.

Sketch code

Default frame - compare both sequences full length

New longest common subsequence

Shifted reference frame to the right

For the future:
Sequence alignment can be beautiful. I would like to tweak this sketch to give more complex visualizations.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s