Alignment scoring
What a substitution matrix is, why the alphabet decides which ones exist, how a gap is charged, and which matrix each alignment tool uses unless you pick another.
This page exists because five tools score an alignment with a substitution matrix and a gap penalty, and they make the same choices for the same reasons. Each tool page has its own controls; this page is what they share.
A matrix is a model of which substitutions are likely
An alignment score adds a value for every aligned pair of residues and subtracts a penalty for every gap. The values come from a substitution matrix: a table of how likely each residue is to be replaced by each other one, written as log-odds so that a likely substitution scores positive and an unlikely one negative.
The alphabet decides which matrices exist. Protein and nucleotide matrices are different objects, not stricter and looser settings of one thing:
| Alphabet | Matrices | Where they come from |
|---|---|---|
| Protein | The BLOSUM series | Derived from observed blocks of aligned protein |
| The PAM series | Extrapolated from a point-mutation model | |
| Nucleotide | EDNAFULL (also written DNAfull) | The IUB/IUPAC table: scores the four bases and every ambiguity code |
| DNAmat | The second nucleotide table the EMBOSS pairwise programs publish |
A protein matrix on DNA would read A, C, G and T as alanine, cysteine, glycine and threonine and return a number that means nothing. So the tools here pick the matrix from the alphabet unless you choose one. Multiple Sequence Alignment offers the mismatched matrix only disabled, with that reason beside it, and EMBL-EBI Services drops a matrix that stops applying when you switch the sequence type.
Gaps: linear or affine
A linear penalty charges the same for every gap column. An affine penalty charges more to open a gap than to extend one. Affine is the biologically motivated choice: a 12-base insertion is one evolutionary event, not twelve, and a linear penalty scatters it into several short gaps.
On the Multiple Sequence Alignment worked example, eight cricket COI genes, switching from linear −10 to affine (−12 open, −2 extend) takes the alignment from 609 columns and 1.6% gaps to 602 columns and 0.4% gaps: each row drops from eight gaps to one.
Which tool uses what
| Tool | Default matrix | Gaps | Can you change it? |
|---|---|---|---|
| Multiple Sequence Alignment, progressive aligner | EDNAFULL or BLOSUM62, by alphabet | Linear (−10 in the worked example) or affine | Matrix and gap model. The matrix that grades the finished alignment is a separate setting from the one that builds it |
| BLAST Search | blastn: reward 2, penalty −3. blastp: BLOSUM62 | blastn 5/2, blastp 11/1 (open/extend) | The BLAST parameters. Composition-based rescaling of the matrix, blastp's default in BLAST+, is not reproduced; the page says so |
| Dot Plot, scored engine | EDNAFULL or BLOSUM62, by alphabet | None: windows are scored, not aligned | Yes, including a pasted matrix in the standard format, such as a PAM |
| EMBL-EBI Services | Whatever each service declares | Each service's own | Every parameter the service advertises, read from the service when you pick it |
| Auto-annotate, translated matching | BLOSUM62, as blastx does | Gapped extension | No |
Scores and their statistics
A raw score depends on the matrix and the gap penalties, so it cannot be compared across settings. Search tools convert it using Karlin–Altschul statistics: a bit score, which is comparable across matrices, and an E-value, the number of hits that well-scoring expected by chance in a database of that size. BLAST Search and Auto-annotate's translated matching report both; BLAST's bit scores agree with BLAST+ to within one bit.
Related
Multiple Sequence Alignment · BLAST Search · Dot Plot · EMBL-EBI Services · Auto-annotate