Sequence Alignment: How Does It Work?

There are several different computer programs that can generate an alignment. All of them try to maximize the number of matches among all sequences being aligned by changing the positions of the sequences relative to one another and/or by adding gaps.

To compare two DNA sequences, they must be aligned so that the greatest number of nucleotides match up.

Animation of an alignment of two short sequences (no audio)