LightMySky

Alignment Scoring: Substitution Matrices, Gap Penalties and Significance

An alignment is only as meaningful as the score that produced it. This stop derives substitution scores from observed substitution frequencies, sets gap penalties deliberately, and asks whether a score that good would arise by chance.

No account needed. Progress saves in this browser.

What a learner can do afterwards

  • Explain how a log-odds substitution matrix is built from aligned sequences of known relatedness
  • Choose a matrix and a gap penalty appropriate to a stated evolutionary distance
  • Interpret an E-value and say why it moves when the database grows

1 · Read

An alignment is only as meaningful as the score that produced it. Substitution scores come from log-odds matrices built by counting substitutions in trusted alignments of known relatives. Aligned pairs seen more often than chance score positive, unlikely pairs score negative. Positions matching beyond chance suggest shared ancestry, while differences record mutations since divergence.

Try it together

Suppose you compare two closely related proteins. You pick a strict matrix that rewards only likely changes and charge high gap penalties, because insertions and deletions should be rare between close kin. For two distant cousins you switch to a forgiving matrix with gentler gaps. The wrong matrix blurs real homology into noise. Gaps model insertion and deletion events, and opening one costs more than extending it, since one event can span residues.

Searching a huge database always finds lookalikes by luck, so raw scores convert into E-values. An E-value is the number of hits this good expected from chance alone. Small values mark trustworthy matches worth following up. The value grows with database size: the same hit in a doubled database looks weaker, because more letters mean more chances for luck.

Good to know

To argue homology from a search result, read score, matrix, and E-value together. Ask whether the matrix fits the evolutionary distance, whether gaps were priced sanely, and whether the E-value survives the database size. Statistics at the scale of billions of letters separates shared ancestry from random resemblance.

Matrices price substitutions, penalties price gaps, and E-values price luck.

2 · Watch

Take it off screen

Print a worksheetA4 with an answer key page for grown-ups. No screen, no internet.

Where it sits

Then practise

8 questions wait behind this lesson, each with its answer explained. Every answer feeds the sky: stars light as they are learned, and dim when it is time to come back.

Spotted a problem on this page? Tell us
Alignment Scoring: Substitution Matrices, Gap Penalties and Significance · Science, ages 22 to 23 · LightMySky