🔵 synonymous (s=0) — 🟠 nonsynonymous (your s) — reaching top = fixed, bottom = lost

Molecular Evolution: Wright-Fisher dN/dS

This 2D companion to the codon-level dN/dS sim swaps the 3D codon ribbon and its hard-wired acceptance probability for the actual population-genetic process that produces molecular dN/dS in real sequence data: a Wright-Fisher model of genetic drift and selection. Each new mutation — synonymous (neutral, s=0) or nonsynonymous (your chosen selection coefficient s) — starts at frequency 1/N and is resampled generation by generation until it either fixes (reaches frequency 1) or is lost (reaches 0), exactly the discrete stochastic process underlying Kimura's 1962 diffusion theory of fixation probability. Watching many such trajectories scroll across the chart, and the running empirical dN/dS converge on the closed-form Kimura prediction below it, makes visible why dN/dS is not an arbitrary dial but a direct read-out of the population-scaled selection coefficient Ns.