This 2D companion samples and calls peaks with the exact same statistical model as the 3D version, drawn as a flat bar-chart track instead of a 3D bar field. Reads pile up along the genome in fixed-width bins; each bin's read count k is Poisson-distributed around a rate λ that is background everywhere except near real binding sites, where it is elevated by the enrichment fold-change:
rate(i) = depth · λ_bg + depth · λ_bg·(fold−1) · exp(−(i−c)² / 2σ²)
P(k; λ) = λᵏ e^(−λ) / k!
The peak caller (mirroring MACS2's local-lambda model) estimates a local background λ_model from the surrounding window and the genome-wide mean, then asks how surprising the observed count is under that null model:
λ_model = max(λ_global, λ_local window)
p = P(X ≥ k | λ_model) = 1 − Σ_{i=0}^{k−1} P(i; λ_model)
significant ⇔ −log₁₀(p) ≥ threshold
Fix applied in this 2D model: a bin with zero reads (k=0) can never be evidence against the null — by definition P(X≥0)=1 for any λ, so its significance score must always be exactly 0. The 3D engine's p-value loop starts its running sum at CDF(0) instead of CDF(k−1), so for k=0 it silently returns 1−P(0) (i.e. P(X≥1)) rather than 1. Verified numerically against the closed-form Poisson survival function: the two only diverge at k=0. It never shows up in the 3D sim because its λ floor (0.5) keeps that mis-scored value below the lowest selectable threshold (1.0), but the bug is real, so this 2D sibling special-cases k=0 to return 1 directly.
- Enrichment — how many-fold reads pile up at a real binding site over background; low enrichment is the hardest case to detect.
- Background depth λ and sequencing depth — raise both signal and noise together; more reads shrink Poisson relative variance (σ/λ = 1/√λ) and sharpen calls.
- Significance threshold — the −log₁₀(p) cutoff; raising it trades sensitivity for a lower false-discovery rate, exactly the knob real ChIP-seq/ATAC-seq pipelines tune.
- Resample reads — redraws the Poisson counts for the same site layout, showing that peak calls are a random sample, not a deterministic readout.
Drag to pan the track and scroll/pinch to zoom in on individual bins. Real-world relevance: this is the exact statistical test MACS2 runs per bin to call transcription-factor binding peaks from ChIP-seq or accessible-chromatin peaks from ATAC-seq.