Sequence Alignment: How Does It Work?
There are multiple computer programs that can generate a sequence alignment. They try to maximize the number of matches by changing the positions of the sequences relative to one another and/or by adding gaps.
Once two DNA sequences are aligned so that the greatest number of nucleotides match up, they can then be compared.