Sequence alignment is the basic tool used to compare two or more protein sequences and detect evolutionary relationships between them. To carry out an alignment we need a way of scoring how likely it is that one amino acid has been replaced by another during evolution. This is done using log-odds scoring matrices, which assign a numerical score to every possible pair of amino acids.
The two most widely used log-odds matrices in protein sequence analysis are the PAM matrices and the BLOSUM matrices. Both matrices work on the same underlying logic comparing how often two amino acids are found aligned together in real evolutionary data against how often this would happen purely by chance but they are constructed using different methods.
1. The Basic Idea Behind Log-Odds Scoring
Consider two long protein sequences that are separated by a certain evolutionary distance (measured in PAM units, or simply obtained from an alignment). At a given site, suppose amino acid i occurs in the first sequence and amino acid joccurs in the second. Let M(i,j) be the fraction of sites where this particular pairing (i with j) is observed.
Now imagine we take the two sequences and randomly shuffle the amino acids within each one. The overall amino acid composition does not change, but any evolutionary relationship between the two sequences is destroyed. If we now ask how often i and j would appear together purely due to their individual frequencies, this fraction would be I(i) × I(j), where I(i) and I(j) are the individual frequencies of amino acids i and j in the data.
The ratio of these two quantities is defined as:
R(i,j) = M(i,j) ÷ [I(i) × I(j)]
This ratio tells us whether i and j are aligned together more often than expected by chance (R > 1), less often than expected (R < 1), or exactly as expected (R = 1). Because the evolutionary process is assumed to be time-reversible, this matrix of R values is symmetric, that is, R(i,j) = R(j,i). This makes biological sense — the probability of finding iopposite j cannot depend on which sequence is arbitrarily labelled “first” and which is labelled “second.”
If we consider an entire alignment made up of many aligned positions, the overall relative likelihood of that alignment arising under the evolutionary model (compared to it arising by pure chance) is obtained by multiplying together the R values of every aligned pair across all positions of the alignment.
1.1 Converting the Product into a Sum
Multiplying together a long series of ratios is inconvenient for alignment algorithms, which work more efficiently with sums. To convert the product into a sum, we take logarithms. The score for aligning amino acid i with amino acid j is defined as:
S(i,j) = C × log_B [R(i,j)]
Here B is the base of the logarithm and C is a scaling constant; both are chosen purely for convenience, so that the final scores fall on a manageable numerical scale (usually rounded to whole numbers). Once this is done, the total score of an alignment is simply the sum of S(i,j) values over every aligned position. The alignment that gives the maximum possible sum is exactly the same alignment that gives the maximum relative likelihood — so maximizing the additive score is equivalent to finding the biologically most probable alignment. A matrix built up in this way, using the log of the R values, is called a log-odds matrix.
A positive score means the two amino acids are more likely to occur together than expected by chance; a negative score means the opposite. In such matrices, all diagonal values (an amino acid aligned with itself) are typically positive, since every amino acid is naturally more likely to align with itself than with a different one by chance.
2. PAM Scoring Matrices
PAM stands for “Point Accepted Mutation.” PAM matrices are derived directly from an underlying evolutionary (Markov) model of amino acid substitution, built up from observed data on protein evolution.
2.1 Construction and PAM250 as an Example
The most commonly cited PAM matrix is PAM250, which represents a relatively large evolutionary distance (250 accepted point mutations per 100 residues). It was calculated using substitution data compiled by Jones and co-workers (1992). In this matrix, both the base B and the constant C are set to 10, and the resulting scores are rounded to the nearest whole number.
The highest score found in the PAM250 matrix is for tryptophan aligned with itself, S(W,W) = 15. Using the inverse relationship R = B^(S/C), this converts to R(W,W) = 10^1.5 ≈ 31.6, meaning a tryptophan residue is about 31.6 times more likely to be paired with another tryptophan in real proteins at this evolutionary distance than would be expected by chance alone. This reflects the very low mutability of tryptophan — it changes very rarely during evolution. By contrast, amino acids with high mutability, such as serine, show much smaller diagonal scores, since they are replaced by other amino acids relatively often and are therefore only slightly more likely to be found aligned with themselves than by pure chance.
2.2 Relationship with Physico-Chemical Properties
The pairs of non-identical amino acids that receive the highest positive scores in the PAM matrix are generally pairs with similar physico-chemical properties. The classic examples are:
- Tyrosine and phenylalanine (Y↔F): both carry an aromatic side group; they differ only in the presence of an OH group on the ring in tyrosine.
- Aspartate and glutamate (D↔E): both carry an acidic COO⁻ group; glutamate simply has one extra carbon in its side chain.
- Lysine and arginine (K↔R): both are basic amino acids with long side chains ending in a positively charged nitrogen group.
- Valine and isoleucine (V↔I): both are hydrophobic with medium-sized hydrocarbon side chains, differing by a single extra carbon.
In contrast, pairs of amino acids with very different physico-chemical properties — for instance, most hydrophilic-hydrophobic pairs — receive negative scores.
Two amino acids stand out as unusual: tryptophan and cysteine, which are the two slowest-evolving amino acids. Tryptophan has an unusually bulky side chain, so any substitution is likely to distort the protein’s three-dimensional structure and is therefore eliminated by natural selection. Cysteine forms disulfide bridges (–S–S–) between different parts of a polypeptide chain, and disrupting such bonds is also structurally damaging. Both amino acids therefore show high diagonal (self-alignment) scores but strongly negative scores against almost every other amino acid — except for two notable exceptions, C↔W and C↔Y, which show unexpectedly positive scores. These two exceptions are not explained by similarity of physico-chemical properties but by the closeness of their codons in the genetic code (discussed below).
This overall pattern is consistent with the idea of stabilizing selection: natural selection acts against mutations that drastically alter the physico-chemical character of a protein and prevents such changes from becoming fixed in a population. When the amino acid pairs with high PAM scores are plotted on a principal component analysis (PCA) map of amino acid properties, almost all of them cluster close together, confirming that evolution “notices” and conserves physico-chemical similarity.
2.3 Role of the Genetic Code
The structure of the genetic code also affects amino acid substitution rates. Some amino acid substitutions require the change of only a single nucleotide within a codon, whereas others require two or three nucleotide changes. Substitutions reachable by a single nucleotide change are naturally expected to occur more frequently.
When the amino acid pairs reachable by a single-nucleotide substitution are marked out on the PAM matrix, it turns out that every pair with a positive score falls into this single-nucleotide-change category — meaning no frequently observed substitution requires more than one nucleotide change. However, the reverse is not true: many pairs that are reachable by a single nucleotide change still show zero or negative scores. This shows that the genetic code only sets out what substitutions are mutationally possible; whether they are actually observed at appreciable frequency is further filtered by natural selection acting on amino acid properties.
A useful example is the valine-to-glutamate (V→E) substitution, which is possible through a single nucleotide change (T to A at the second codon position) and therefore likely occurs frequently as a raw mutation. However, because valine and glutamate have very different physico-chemical properties (one hydrophobic, one acidic), most such mutations are eliminated by selection before they can spread through a population. As a result, the observed substitution rate is low and S(V,E) is negative.
It is also worth noting that the genetic code itself is not arranged randomly. Amino acids with similar properties tend to be assigned to nearby codons, meaning they are often reachable from one another by a single mutation. Comparison of the real genetic code with large numbers of randomly reshuffled hypothetical codes (Freeland et al. 2000) supports the idea that the code evolved specifically to minimize the impact of point mutations on protein structure and function. The canonical code is thought to have originated very early in the history of life, before the divergence of archaea, bacteria, and eukaryotes, although minor lineage-specific modifications to the code have since arisen in some isolated groups of organisms and organelles (Knight, Freeland, and Landweber 2001).
2.4 Effect of PAM Distance
A log-odds matrix can, in principle, be derived for any PAM distance. PAM250 represents a large evolutionary distance, meaning there is a substantial chance that any given amino acid has changed, so quite a few off-diagonal scores turn out positive. For a smaller PAM distance (such as PAM100 or less), there is a much higher probability that each amino acid position has remained unchanged. Consequently, at low PAM distances the diagonal scores are larger and most off-diagonal scores are negative.
This has a direct practical implication for choosing which matrix to use:
- Low PAM number matrices are suited to detecting alignments with high percentage identity — i.e., closely related sequences.
- High PAM number matrices are suited to detecting distantly related sequences, where individual residues may have changed but overall physico-chemical character is still conserved.
3. BLOSUM Scoring Matrices
BLOSUM stands for “BLOcks SUbstitution Matrix,” introduced by Henikoff and Henikoff (1992). BLOSUM matrices are also log-odds matrices, but unlike PAM matrices, they are built directly from observed sequence alignments, without constructing a phylogenetic tree and without assuming an explicit evolutionary (Markov) model.
3.1 Basic Method of Construction
The BLOSUM method starts from a multiple sequence alignment. First, the frequency I(i) of each amino acid across the entire alignment is counted. Then, for every column of the alignment, every possible pair of aligned residues is counted and tallied into a matrix A(i,j), which records how often amino acid i is aligned opposite amino acid janywhere in the dataset.
Because this method counts pairs of aligned residues rather than inferred substitutions, the diagonal entries of the A matrix are non-zero from the start — identical residues aligned with each other are counted directly. This is an important conceptual difference from the PAM method, which is based on a substitution-counting matrix derived using parsimony on a phylogenetic tree; two residues that are simply aligned together without an inferred direct substitution between them (for example, if one column shows a V-to-I change on one branch and an I-to-L change on another branch, but no direct V-to-L substitution) are treated differently by the two methods. This is why the PAM and BLOSUM approaches, even when applied to similar underlying data, can give somewhat different numerical matrices.
Once the A(i,j) matrix is obtained, the relative frequency of each type of aligned pair is calculated as:
q(i,j) = A(i,j) ÷ A(total)
where A(total) is the sum of all elements of the A matrix. This gives the observed frequency of i-j pairs in the real alignment data. This is then compared with the frequency expected under random pairing (based on the individual amino acid frequencies I(i) and I(j)), giving a ratio R(i,j) directly analogous to the R(i,j) used for PAM matrices. The log-odds score is then obtained in exactly the same way, S(i,j) = C log_B R(i,j).
The mathematics of the BLOSUM approach is simpler than PAM because it moves directly from raw alignment data to the log-odds matrix, without the intermediate step of building an evolutionary substitution model.
3.2 The Problem of Closely Related Sequences
A significant drawback of the raw BLOSUM approach is that it is very sensitive to the presence of clusters of nearly identical sequences within the alignment data. Such near-identical sequences contribute disproportionately large counts to the diagonal of the A matrix, skewing the result. This problem does not affect the PAM method in the same way, because closely related sequences sit very close together on the phylogenetic tree and therefore require very few inferred substitutions along their connecting branches.
Real biological sequence data is typically “patchy” — many sequences are available for a few well-studied protein families, while other families are represented by only a handful of sequences. Henikoff and Henikoff addressed this imbalance using data from the Blocks database, which contains reliable, gapless alignments of conserved protein domains. Within each alignment block, sequences were grouped into clusters based on a chosen percentage-identity cutoff (commonly 80% or 62%).
The counting rules used with this clustering approach are:
- Sequences that fall within the same cluster are not counted against each other when tallying the A(i,j) matrix, since they are too similar to provide independent substitution information.
- When counting pairs between different clusters, all sequences belonging to one cluster are treated as contributing the weight of a single sequence. For example, if a cluster contains two closely related sequences, each contributes only half the weight of an independent sequence.
3.3 Naming Convention
The log-odds matrix produced using a particular percentage-identity cutoff is named according to that cutoff. Thus:
- BLOSUM80 is built using clusters defined at 80% identity — it includes substitution information only between sequences that are less than 80% similar to each other.
- BLOSUM62 is built using clusters defined at 62% identity — it includes substitution data only between sequences less than 62% similar.
An important point to remember for exams is that the numbering convention of BLOSUM works in the opposite direction to PAM: a lower BLOSUM number represents lower sequence similarity in the underlying data (more divergent sequences contributed to the matrix), whereas a lower PAM number represents greater sequence similarity (a smaller evolutionary distance). This means, in practice, that a low-numbered BLOSUM matrix (like BLOSUM45) and a high-numbered PAM matrix (like PAM250) are both suited to detecting distantly related sequences, while a high-numbered BLOSUM matrix (like BLOSUM80) and a low-numbered PAM matrix (like PAM30 or PAM100) are both suited to closely related sequences.
3.4 Scaling and Example Scores
BLOSUM62 scores are scaled such that S(i,j) = 2 log₂ R(i,j) — these are called “half-bit” units, since a full “bit” corresponds to a factor of two change in relative likelihood, and a score of 1 in this scaling corresponds to a factor of 2^0.5. The highest score in BLOSUM62 is again for tryptophan aligned with itself, S(W,W) = 11, which corresponds to R(W,W) = 2^(11/2) ≈ 45.2 — a value quite close to the corresponding PAM250 estimate, despite the completely different derivation methods.
4. Comparing Different Log-Odds Scoring Systems
When PAM, BLOSUM, and other log-odds systems (derived from different methods and different sets of sequence alignments) are compared side by side, the exact numerical scores differ somewhat, since the underlying data and derivation methods are different. However, the broad patterns are remarkably consistent across all these systems:
- The same amino acids (such as W and C) consistently emerge as the most conserved.
- The same amino acids (such as S) consistently emerge as the least conserved, or most mutable.
- The same pairs of non-identical amino acids (Y-F, D-E, K-R, V-I) consistently receive the most significant positive scores.
This consistency gives confidence that these scoring systems are capturing something genuinely fundamental about how natural selection acts on the physico-chemical properties of amino acids during protein evolution, rather than being artifacts of a particular dataset or method.
5. PAM versus BLOSUM: Key Differences
| Feature | PAM Matrices | BLOSUM Matrices |
|---|---|---|
| Basis of derivation | Explicit evolutionary (Markov) model built from a phylogenetic tree | Direct counting from observed sequence alignments (Blocks database) |
| Data used | Closely related sequences only, extrapolated to greater distances | Alignments across a range of divergences, clustered by % identity |
| Diagonal entries | Derived from substitution counts | Non-zero from direct pair counting |
| Sensitivity to redundant/near-identical sequences | Largely unaffected (close sequences require few tree substitutions) | Sensitive; corrected using sequence clustering |
| Numbering convention | Higher PAM number = greater evolutionary distance = more divergent | Higher BLOSUM number = higher %-identity cutoff = less divergent data used |
| Suitability | Extrapolation may become unreliable at very large evolutionary distances | Considered more effective for detecting distant (“twilight zone”) relationships, since based directly on distant-sequence comparisons |
| Additional capability | Can be used to estimate evolutionary distances and build phylogenetic trees | Cannot be used for evolutionary distance or tree-building, since no explicit evolutionary model is assumed |
5.1 Advantages and Disadvantages Summary
PAM Matrices:
- Advantage: grounded in an explicit evolutionary model, so can be used for estimating evolutionary distances and phylogenetic trees.
- Disadvantage: relies on parsimony-based substitution counting from closely related sequences only, then extrapolates to larger distances; this extrapolation may not always be reliable for very divergent sequences.
BLOSUM Matrices:
- Advantage: derived directly from real alignments across a range of divergence levels, making it well suited for detecting weak, distant similarities in database searches.
- Disadvantage: since it is not based on an explicit evolutionary model, it cannot be used to calculate evolutionary distances or construct phylogenetic trees.
6. Conclusion
Log-odds scoring matrices provide the mathematical foundation for scoring protein sequence alignments in a way that reflects real evolutionary tendencies rather than arbitrary rules. Both the PAM and BLOSUM families of matrices are built on the same core principle — comparing observed amino acid pairing frequencies against chance expectation and converting the resulting ratio into an additive log score — but differ in how the underlying data is gathered and processed. PAM matrices rely on an explicit evolutionary model derived from closely related sequences and extrapolated outward, while BLOSUM matrices are derived empirically and directly from clustered alignments of conserved protein blocks. Despite their different derivations, both systems converge on similar conclusions about which amino acids are conserved and which substitutions are evolutionarily favoured, reflecting the underlying role of natural selection in preserving the physico-chemical character of proteins.
Quick Revision Points
- R(i,j) = M(i,j) ÷ [I(i) × I(j)] — ratio of observed to chance pairing frequency.
- S(i,j) = C log_B R(i,j) — the log-odds score.
- PAM250: B = C = 10; highest score S(W,W) = 15 → R ≈ 31.6.
- BLOSUM62: half-bit units, S = 2 log₂ R; highest score S(W,W) = 11 → R ≈ 45.2.
- High-scoring non-identical pairs: Y-F, D-E, K-R, V-I (similar physico-chemical properties).
- W and C: slowest evolving; high diagonal scores, negative off-diagonal scores (except C-W, C-Y, explained by genetic code proximity).
- All positive PAM scores correspond to amino acid pairs reachable by a single nucleotide substitution, but not all single-nucleotide-reachable pairs give positive scores (selection filters mutational possibility).
- Low PAM number / high BLOSUM number → closely related sequences, high % identity.
- High PAM number / low BLOSUM number → distantly related sequences.
- PAM allows evolutionary distance and tree estimation; BLOSUM does not.










