Skip to content

Add Variant-to-Function (V2F) Tipping-Point & Rescue Radar - #4

Merged
dttdrv merged 3 commits into
mainfrom
feat/v2f-tipping-point-radar
Nov 20, 2026
Merged

dttdrv merged 3 commits into
mainfrom
feat/v2f-tipping-point-radar

Conversation

@dttdrv

@dttdrv dttdrv commented Nov 13, 2026 •

Copy link
Copy Markdown
Owner

Summary

Adds examples/neural-v2f/radar.py (epigenesis radar / epigenesis.py radar / tests/verify.py neural-v2f) to detect passive-reporter-silent, endogenous-circuit tipping non-coding variants across full morphogen signaling regimes, quantify critical threshold shifts ($\Delta S_{\mathrm{crit}}$), propose dual cis/trans rescues, and test claims against matched negative controls (biological_acceptance = False).

What Was Added

  • Regime-wide cryptic bifurcation & tipping-point radar (examples/neural-v2f/radar.py):
    • Sweeps full morphogen regimes ($S \in [0.06, 0.85]$) and bisects exact developmental tipping points (BISECTION_STEPS = 12), matching target-fate entry direction so locked-out regimes accurately flag signal_locked = True.
    • Classifies edits into cryptic_bifurcation, concordant_switch, canalized_buffered, and neutral; when NumPy is present, optionally attaches bundled Kreimer 0–72h motif-temporal (|kreimer_mpra_mean| < 0.15) as the active sequence_silent / doubly_silent gate, while logging bundled Siraj Huber-linear (r = 0.049 cross-study correlation) strictly as informational context.
    • Generalizes across all built-in circuits (neural-tube, mutual-toggle, tri-lineage-switch, or custom JSON CircuitSpecs), Hallikas GLI2/GLI3, all 532 JASPAR 2024 PWMs, custom PWMs, FASTA scans, and arbitrary JSON/CSV/TSV variant tables (SNVs, MNVs, insertions, deletions).
  • Non-specific binding floor (Z_ns = 2e-4):
    • Partition ratios use $q = (Z_{\mathrm{mut}} + Z_{\mathrm{ns}}) / (Z_{\mathrm{ref}} + Z_{\mathrm{ns}})$ (auto-disabled when --epsilon 0 for exact Hallikas parity) to prevent ratio blow-ups on featureless decoys; eliminates ratio-only cryptic false positives from column-scrambled PWMs (0 cryptic hits across all 5 / 5 curated loci).
  • Dual rescue solver:
    • Trans dose rescue (find_trans_signal_rescue): bisects minimal morphogen dose shift $\Delta S_{\mathrm{rescue}}$ restoring wild-type fate.
    • Cis epistatic second-site rescue (_rescue_candidate): searches all single-base second sites and verifies recovery across the full signaling regime.
  • Strict null controls (DEFAULT_SHUFFLES = 1000), frozen held-out test-split evaluation, & sealed brainc causal verification:
    • Exact Altschul–Erickson Eulerian dinucleotide shuffle (dinucleotide_shuffle, verified with verify_dinucleotide_counts) + column-scrambled motif PWM (scramble_motif_pwm).
    • Added examples/neural-v2f/heldout-freeze/ (PLAN.md, predict.py, FREEZE.json, predictions.json, score.py, results.json, RESULTS.md): SHA-256 predictions sealed before single-shot outcome scoring on 118 unseen GSE188264 test loci and 1,885 unseen measured alleles.
    • Verifies exact allele reversion (0.0), passive reporter isolation (0.0), and sealed SHA-256 brainc v2/v3 Development Modules for top candidate and cis rescue.
  • Unified CLI, release launcher, docs, CI, and tests:

Verified Quantitative Results & Honest Limitations

  • Point-scan vs. regime-wide cryptic reconciliation (7 / 33 / 4):
    • Single-dose scan (circuit.py at $S = 0.20$) flags 7 cryptic SNVs on chr15 and 33 across the 5 curated loci (chr15 7, chr13 7, chr21 7, chr18 6, chr1 6), while 93 edits are reporter-silent at at least one step (chr15 19, chr13 19, chr21 19, chr18 18, chr1 18).
    • Requiring passive reporter silence across the entire signaling grid ($S \in [0.06, 0.85]$, 9 steps; $\max_S |\Delta\mathrm{reporter}(S)| &lt; 0.02$) yields 4 strict regime-wide cryptic_bifurcation edits (62:A>C, 47:T>G, 58:A>C, 163:T>G; 4 / 4 doubly silent; trans rescues 4 / 4, cis full-regime rescues 2 / 4).
  • Curated chr15:90936956-90937127 null controls (n = 1,000 dinucleotide shuffles + scrambled PWM, Z_ns = 2e-4):
    • dinucleotide_null_mean = 0.155 (std = 1.3561, max = 19, empirical_p_ge = 0.04995, 6.45× enrichment, 305.6× partition-sum separation).
    • scrambled_cryptic_count = 0 (30,295.8× partition-sum separation).
  • 85 measured CRE perturbations in the 5 curated GSE188264 loci: 52 switch fate cleanly and 0 are cryptic (total_measured_cryptic = 0).
  • Frozen held-out evaluation (118 unseen GSE188264 test loci, 1,885 unseen alleles):
    • 8 / 118 unseen loci harbor 24 strict SNV cryptic hits (24 / 24 doubly silent; top locus chr3:20371482-20371653 has 14 cryptic SNVs vs 0 / 100 dinucleotide decoys, empirical_p_ge = 0.009901, 0 scrambled-PWM hits).
    • Negative empirical MPRA concordance across 1,885 measured test alleles: Pearson(|dRep_GLI2|, |alpha|) = 0.012258 (Spearman = 0.019435); predicted cryptic CRE alleles (7) have lower mean |alpha| (1.258827) than concordant switches (15, 2.471281), yet 0 / 7 are empirically silent (< 0.15).
  • Scope (biological_acceptance = False): Software and mechanistic consistency controls pass; in vivo embryonic or clinical variant pathogenicity is not established.

Verification

  • .venv/bin/python -m unittest tests.test_neural_v2f -v: 10/10 OK
  • Studio NumPy Python (3.14.6): tests.test_neural_v2f 10/10 OK, studio/tests 32/32 OK
  • /Users/dttdrv/.local/bin/python3.11 tests/verify.py boundary: COMPILER-BOUNDARY-PASSED
  • /Users/dttdrv/.local/bin/python3.11 tests/verify.py neural-circuit: NEURAL-CIRCUIT-SOFTWARE-PASSED (16/16)
  • /Users/dttdrv/.local/bin/python3.11 tests/verify.py neural-v2f: NEURAL-V2F-SOFTWARE-PASSED (10/10)
  • /Users/dttdrv/.local/bin/python3.11 tests/verify.py sdist && wheel: SDIST-SELF-TEST-PASSED, WHEEL-SMOKE-PASSED
  • research/check_freeze.py: 61 original digests verified, 6 declared publication copies, 0 mismatched

@dttdrv
dttdrv merged commit db0c704 into main Nov 20, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant