A multiple sequence alignment places several related sequences into columns so that homologous positions line up. It is the input to comparative analysis, primer and conserved-region discovery, and phylogenetic tree building.
What an MSA is for
An MSA turns a set of sequences into a table. Each row is a sequence, each column is a proposed homologous position, and gaps represent insertions or deletions that occurred after the sequences diverged.
The alignment is a hypothesis. It is not a fact. Different gap penalties or a different order of sequence addition can change the result, especially when the sequences are diverged or contain repeats.
Progressive alignment
Many tools build an MSA in stages. They compute pairwise distances, cluster the sequences into a guide tree, and add sequences or groups from the most similar to the most divergent. This is fast and works well when the sequences are clearly related.
The weakness is that early mistakes are hard to correct. If two divergent sequences are aligned badly at the start, later sequences may inherit the error. Iterative refinement, consistency-based methods and structure-aware methods can reduce this problem.
Alignment of coding sequences
For coding DNA, the alignment must preserve the reading frame. A gap of one base changes every downstream codon. Protein-guided alignments, codon-aware aligners and manual checks around indels are common solutions.
For closely related sequences, a simple nucleotide alignment may be sufficient. For distant homologues, a protein alignment back-translated to codons often gives a better result because protein sequences retain similarity longer than DNA.
Reading an MSA
Look at the columns, not only the overall picture.
- Conserved columns suggest functional or structural constraint.
- Highly variable columns may be under positive selection or may be misaligned.
- Long gaps in one sequence may indicate a real insertion or a missing assembly region.
- Columns with many gaps are often excluded from tree building.
- A block of gaps that shifts the frame is a warning sign.
Trimming alignments
Alignment trimming removes poorly aligned columns before tree building. It can improve a tree, but aggressive trimming can remove real signal. The choice should be reported and, when the result matters, tested with and without trimming.
Trimming is not a substitute for a good alignment. If the alignment is wrong, trimming may hide the problem rather than fix it.
Tools and formats
Common formats are FASTA, Clustal and Stockholm. Most tools accept FASTA and write one of the others. The alignment can be viewed in a browser, in a desktop editor or in a phylogenetic program.
Common programs include MAFFT, MUSCLE and Clustal Omega. They differ in speed, memory use and the type of alignment they optimise. None is universally best; the right choice depends on the number and divergence of the sequences.
Choosing a method
The choice of aligner should follow the data, not fashion. For a few closely related sequences, almost any progressive method will give a similar answer. For hundreds of divergent sequences, consistency-based or iterative methods are usually worth the extra time. For proteins with known structures, structure-aware alignment can protect columns that are conserved in three dimensions but variable in sequence.
Ask three questions before running a tool. How many sequences are there? How diverged are they? Is the downstream analysis sensitive to alignment columns? If the answer to the last question is yes, compare at least two reasonable settings and check whether the biological conclusion survives.
How the alignment affects downstream analysis
An MSA is rarely the final product. It feeds tree building, conservation scores, primer design, domain boundary estimation and selection analysis. An error in the alignment therefore propagates.
A tree built from a misaligned repeat region can group sequences by repeat copy number rather than by ancestry. A conservation score calculated over a frame-shifted codon alignment can highlight the wrong positions. A primer designed from a badly aligned conserved block may fail in half the samples.
The practical lesson is to inspect the alignment at the positions that matter for the next step. Do not accept a colourful overview image as evidence that every column is correct.
A small worked example
Take five homologous protein sequences of different lengths. One contains a 30-residue insertion relative to the others. A progressive aligner may place the insertion as a block of gaps in the four shorter sequences, which is the desired result. If the insertion is placed in the middle of a conserved motif instead, the alignment is wrong.
The check is simple: look at the conserved motif. If the motif is split by gaps in some sequences but intact in others, the alignment has probably misassigned the insertion. Re-running with a different gap penalty, or aligning the conserved domain separately, often resolves it.
This is also why an alignment should not be judged only by its total score. A high score can hide a locally wrong region that matters more than the rest of the alignment.
A quality checklist
- Are the sequence identifiers unique and traceable?
- Is the reading frame preserved for coding DNA?
- Are the termini trimmed consistently?
- Are long gaps concentrated in a few sequences or spread across all of them?
- Do conserved columns correspond to known functional sites?
- Does a second method or a changed gap penalty produce the same major conclusion?
Key points
- An MSA is a hypothesis about homology.
- Progressive methods can inherit early errors.
- Coding DNA needs frame-aware alignment.
- Trim, but test whether trimming changes the conclusion.
- Record the tool, version and parameters.
Common mistakes
- Aligning coding DNA without checking the reading frame.
- Using default gap penalties on very divergent sequences.
- Trimming away conserved columns that matter.
- Treating one alignment as definitive.
- Forgetting to report the alignment tool and version.
When to ask for help
If an alignment has long gaps, frame shifts or a suspiciously conserved block, ask before building a tree. You can order an analysis or read the phylogenetic tree guide. The Alignment & Phylogenetics studio builds alignments and trees, and the bootstrap guide explains the support values.
Sources and further reading
Written by the Solagene team for research and education. Found an error? Tell us and we will correct it.