A new mutation under strong positive selection rises in frequency so fast that recombination has little time to break the stretch of chromosome around it, so every carrier still shares one long, near-identical haplotype block. A neutral allele of the same age has had many more effective generations of recombination per copy, so its block is already fragmented. This asymmetry — "long haplotypes at high frequency" — is the classic signature genome scans (Sabeti et al. 2002) use to flag recent sweeps.
Logistic rise: p(t) = p0*e^(st) / (1 - p0 + p0*e^(st))
Fixation time: t_fix ~ (2/s)*ln(2*Ne) (standard diffusion-approx result)
Block survival: P(intact to distance d) ~ exp(-c*d*t_eff)
EHH(d) = fraction of core-allele carriers whose haplotype
is still identical to the founder haplotype at distance d
iHS ~ ln[ Int(EHH_ancestral dd) / Int(EHH_derived dd) ]
Fix vs. the 3D original: that engine computed the sweep's haplotype age as (2/s)*ln(p0*10000), and since p0 = 1/(2*5000) that expression collapses to (2/s)*ln(1) = 0 for every s — the age floor then clamped it to exactly 1 generation regardless of the selection-coefficient or generations-since-onset sliders, so the block-erosion rate barely changed as you moved them. This build restores the textbook diffusion-approximation fixation time t_fix = (2/s)*ln(2*Ne), so stronger selection and older sweeps now visibly change how eroded the founder block is.
The grid above is a literal haplotype matrix: each row is one sampled chromosome, each column one SNP position running out from the core locus (bright center column). Green cells mark the shared founder background still unbroken by recombination since the mutation arose; grey cells mark segments already scrambled by crossovers. Drag the grid to pan sideways and scroll/pinch to zoom into the core — exactly how a genome browser lets you inspect a haplotype block. The EHH(d) plot is computed live from the actual fraction of unbroken cells at each distance, and the allele-frequency panel shows where the current "generations since onset" sits on the logistic sweep trajectory.
- Selection coefficient s — how much fitter carriers of the derived allele are; higher s drives frequency up fast and shortens the fixation time, giving recombination fewer generations to act on each lineage.
- Generations since onset — sweep age, capped at the fixation time; older sweeps (past fixation) give recombination more time to erode even a strongly selected haplotype.
- Recombination rate c — local crossover density (cM/Mb); higher c erodes blocks faster regardless of selection strength.
- Load neutral locus — same allele frequency, but block erosion uses the (much larger) neutral coalescent time instead of the sweep's short fixation time, showing the same frequency with none of the haplotype signature.
Real-world relevance: this exact iHS/EHH logic powers genome-wide selection scans over 1000 Genomes and biobank haplotype panels, used to map recent human adaptation (lactase persistence, high-altitude EPAS1, malaria-resistance alleles) and, in agriculture, to find loci swept by artificial selection during domestication.