6.4.5Bioinformatics & Computational Biology

Explain scoring matrices (BLOSUM, PAM)

2,068 words9 min readdifficulty · medium2 backlinks

WHY do we need a scoring matrix at all?

WHAT should the score represent? The right quantity is: is this pairing more likely because the two residues are truly homologous (related by descent), or is it just random coincidence? That is a likelihood ratio.


HOW to derive the log-odds score from first principles

Why this step? Because the log-odds is the statistically optimal score for testing H1H_1 vs H0H_0 (a consequence of the Neyman–Pearson lemma). Sign meaning:

  • s(a,b)>0s(a,b) > 0: substitution seen more than chance → conserved/favorable.
  • s(a,b)<0s(a,b) < 0: seen less than chance → disruptive.
  • s(a,b)=0s(a,b) = 0: exactly as expected by chance.

BLOSUM — BLOcks SUbstitution Matrix

HOW the number works (this trips everyone up):


PAM — Point Accepted Mutation

HOW higher-PAM matrices are made — extrapolation:

  1. Build a 20×2020\times20 mutation probability matrix MM for 1 PAM directly from closely-related sequences.
  2. To model more distant sequences, multiply the matrix by itself: M(n)=MnPAM250=M250.M^{(n)} = M^n \quad\Rightarrow\quad \text{PAM250} = M^{250}. This assumes mutations accumulate as a Markov process (each step independent of the past).
  3. Convert MnM^n to log-odds using the formula above.
Figure — Explain scoring matrices (BLOSUM, PAM)

Worked Examples


Active Recall

Recall What does a positive vs negative matrix entry mean?

Positive → substitution occurs more often than chance (conserved/favorable). Negative → less than chance (disruptive). Zero → as expected by chance.

Recall Which direction is "distant" for PAM and for BLOSUM?

PAM high = distant (more mutations). BLOSUM high = close (higher identity clustering). They run opposite.

Recall Why do we take the logarithm of the odds ratio?

So that per-column scores add up instead of multiplying — matching how alignment algorithms sum scores and how independent probabilities combine.

Recall Feynman: explain to a 12-year-old

Imagine trading cards. Some swaps are fair ("I'll give you a common card for a common card") and some are unfair. A scoring matrix is a cheat sheet telling you how fair each swap is. It looks at real card-trading history (real proteins evolving) and gives plus points to swaps that people actually make a lot (because those cards are basically interchangeable) and minus points to swaps almost nobody makes (because those cards are totally different). We add up the points to decide if two whole decks (proteins) are cousins.


Flashcards

What quantity does a scoring-matrix entry s(a,b)s(a,b) represent?
A scaled log-odds ratio: 1λlog2qabpapb\frac{1}{\lambda}\log_2 \frac{q_{ab}}{p_a p_b} — how often pair (a,b) occurs in real alignments vs by chance.
Why is the log taken in the log-odds score?
To make per-column scores additive (logs turn the product of independent column probabilities into a sum).
What does the "62" in BLOSUM62 mean?
The clustering threshold: sequences ≥62% identical within a block are merged/counted as one before tallying substitutions.
Higher BLOSUM number is for which sequences?
More closely related (higher identity) sequences.
What does 1 PAM unit mean?
An evolutionary distance where 1 accepted point mutation has occurred per 100 residues (1% change).
How are high-PAM matrices generated?
By multiplying the 1-PAM mutation matrix by itself: PAM250 = M^250 (Markov extrapolation).
Higher PAM number is for which sequences?
More distantly related (more accumulated mutations) sequences.
BLOSUM vs PAM: how do their numbers relate directionally?
Opposite — high BLOSUM = close; high PAM = distant. (e.g. BLOSUM62 ≈ PAM160–200 behavior.)
Why does W↔W score +11 but L↔L only +4 in BLOSUM62?
Trp is rare, so a Trp match is statistically surprising (high info), giving a larger log-odds; Leu is common, so its match is less informative.
Which matrix for a ~25% identity distant homolog search?
BLOSUM45 or PAM250.
Which statistical principle makes log-odds the optimal score?
Neyman–Pearson lemma (likelihood-ratio test for homology H1 vs random H0).
What data source is BLOSUM built from?
The BLOCKS database of ungapped, conserved local protein alignments (observed directly).
What model is PAM built from?
A Markov evolutionary model of point mutations fitted to closely related proteins (Dayhoff).

Mnemonic


Connections

  • Sequence Alignment — scoring matrices feed into Needleman-Wunsch Algorithm & Smith-Waterman Algorithm.
  • BLAST — default matrix is BLOSUM62; choice affects sensitivity.
  • Log-odds and Likelihood Ratios — statistical backbone (Neyman–Pearson).
  • Markov Chains — PAM extrapolation via matrix powers MnM^n.
  • Amino Acid Properties — hydrophobicity/charge explain why certain substitutions score high.
  • Gap Penalties — the other half of an alignment score.

Concept Map

requires

is

derived from

H1 homology

H0 random

log makes additive

optimal by

positive

negative

used by

BLOSUM built from

PAM built from

Sequence alignment need

Scoring matrix

20x20 log-odds table

Odds ratio q_ab / pa pb

Observed freq q_ab

Background freq pa pb

s a,b = log-odds score

Neyman-Pearson lemma

Conserved substitution

Disruptive substitution

Needleman-Wunsch / Smith-Waterman

BLOCKS database

Evolutionary point mutations

Hinglish (regional understanding)

Intuition Hinglish mein samjho

Dekho, jab hum do proteins ko align karte hain, toh har position pe do amino acids match ho rahe hote hain. Lekin sab substitutions barabar nahi hote — Leucine ko Isoleucine se badalna almost harmless hai (dono hydrophobic hain), par Leucine ko charged Aspartate se badalna protein ko kharab kar sakta hai. Isliye humein ek scoring matrix chahiye jo har pair ko ek number de: positive agar wo swap evolution mein chance se zyada dikhta hai, negative agar kam dikhta hai. Yeh number nikalta hai log-odds se: log2(qab/(papb))\log_2(q_{ab}/(p_a p_b)) — matlab "observed frequency divided by random frequency", phir log le lo taaki columns ke scores add ho sakein (kyunki independent probabilities multiply hoti hain, aur log unhe addition mein badal deta hai).

BLOSUM aur PAM do families hain. BLOSUM real conserved alignments (BLOCKS database) se seedha count karke banti hai. Yaad rakho: BLOSUM ka number = clustering threshold, aur HIGH BLOSUM = closely related sequences ke liye (BLOSUM80 close, BLOSUM45 distant). PAM ek evolutionary Markov model se banti hai — 1 PAM matlab 100 residues mein 1 accepted mutation. Distant sequences ke liye matrix ko khud se multiply karte hain (PAM250 = M250M^{250}), isliye HIGH PAM = distant.

Sabse important trap: PAM aur BLOSUM ke numbers ulti direction mein chalte hain! High PAM = door ke rishtedar, High BLOSUM = kareebi rishtedar. Exam mein yahi confuse karte hain students. Mnemonic yaad rakho: "BLOSUM Big = Buddies, PAM Plenty = Parted."

Kyun important hai? Kyunki BLAST search karte waqt sahi matrix choose karna padta hai. Agar aap distant homolog dhoond rahe ho (~25% identity), toh BLOSUM45/PAM250 use karo — warna hit miss ho jayega. Yeh matrix hi decide karti hai ki algorithm asli homology dhoondh payega ya nahi.

Test yourself — Bioinformatics & Computational Biology

Connections