Molecular evolution 2026-11-05
Molecular evolution is inherited change in molecules such as DNA and proteins across generations. Mutations introduce new variants; natural selection and genetic drift influence which variants persist. Comparing a nucleotide sequence or protein sequence between lineages therefore supplies evidence about their history as well as their present chemistry.
An important early example was the comparison of cytochrome c from different organisms. Emanuel Margoliash's 1963 report connected differences in protein primary structure to evolutionary relationships. The experimental input was the ordered amino acid residues of the proteins, rather than only their bulk composition or their shared function. Placing corresponding positions side by side made molecular differences countable.[ref]
For a deliberately simplified example, suppose two already aligned sequences have differing positions among compared positions. Their observed difference fraction is . That statistic is not itself a divergence time. If both lineages split time units ago and each accumulates substitutions at the same constant rate per position per unit time, their expected accumulated pairwise molecular divergence is
The factor two counts the two descendant branches. At low divergence, the observed difference fraction can approximate ; repeated changes at one position can conceal earlier changes, and unequal branch rates invalidate the equal-rate simplification. A molecular clock additionally needs a rate or time calibration to turn molecular differences into dates.
Sequence identity is a measured agreement between aligned positions. homology is a historical relationship of common descent; it is not a percentage. Orthology and paralogy further distinguish relationships associated with lineage splitting and gene duplication. These distinctions matter when a phylogenetic tree is inferred from a chosen gene rather than directly observed.
The neutral theory of molecular evolution provides a complementary population-level explanation: molecular change need not always be an adaptive improvement. Motoo Kimura's 1968 argument emphasized the potential importance of neutral changes and genetic drift, while leaving room for natural selection.[ref]
Use the number of alignment columns, including gap columns, as the denominator. A column contributes to sequence identity when its two nongap letters are equal, to sequence similarity when its two nongap letters have a strictly positive BLOSUM62 score, and to the gap fraction when either letter is a gap. A zero substitution score is not counted as similar.
The implementation in part (a) computes each numerator directly during its final pass through the aligned strings:
for name, a in alignments.items():
    print(name, a["alignment_length"], a["identities"],
          a["similarities"], a["gaps"])
    print(a["identity_percent"], a["similarity_percent"], a["gap_percent"])
QueryColumnsIdenticalSimilarGap columns
baboon6663 (95.45%)65 (98.48%)1 (1.52%)
squirrel monkey5849 (84.48%)50 (86.21%)4 (6.90%)
dingo7157 (80.28%)59 (83.10%)10 (14.08%)
goldfish7234 (47.22%)50 (69.44%)14 (19.44%)
Identical columns also count as similar for these data, so these percentages are overlapping summaries rather than three categories summing to 100%.
The maximum-scoring cell records the inclusive end position in each sequence. During traceback, moving left consumes a reference residue, moving up consumes a query residue, and moving diagonally consumes both; when traceback stops, the remaining prefix lengths are one less than the corresponding one-based starts. Consequently i+1 and j+1 are the correct starts returned in part (a), without counting any inserted gaps as sequence residues.
The following report joins these coordinates to the alignments and sequence identity/sequence similarity values already calculated:
for name, a in alignments.items():
    print(f"{name}: query length={a['query_length']}, "
          f"reference length={a['reference_length']}, "
          f"alignment columns={a['alignment_length']}, score={a['score']}")
    print(f"Query {a['query_start']} {a['query']} {a['query_end']}")
    print(f"Ref   {a['reference_start']} {a['reference']} {a['reference_end']}")
    print(f"Identity {a['identity_percent']:.2f}%; "
          f"similarity {a['similarity_percent']:.2f}%; "
          f"gaps {a['gap_percent']:.2f}%")
All reference sequences have length 508. The following are one-based inclusive coordinates; the aligned strings and all percentages are given in parts (a) and (b).
QueryQuery lengthQuery intervalReference intervalColumnsScore
baboon651–65241–30666314
squirrel monkey561–5661–11658278
dingo661–661–6671301
goldfish632–63248–31572190
For example, the goldfish local sequence alignment excludes its first query residue and aligns residues 2–63. As a check, removing gaps from each aligned string gives exactly the sequence slice determined by its reported interval.
Time cell Created 2026-10-24 Updated 2026-11-05
A neuron active preferentially at a particular part of a temporally extended task or interval. Temporal selectivity can coexist with selectivity for location, behavior and sequence identity; it is not a claim that the cell is an isolated clock.