mendelnoulli

Code and figure notebooks for the manuscript on time-varying polygenic effects and monogenic penetrance.

Each page shows one main figure panel by panel, with the script that draws it, the scripts that produced its inputs, and each script's header (inputs, recipe, outputs). All code is in src/; the notebooks in notebooks/ regenerate every panel from the fitted models. No participant-level data are included.

Figure 1 — Polygenic effects change with age Figure 2 — The genetic age interaction changes individual predictions Figure 3 — Polygenic risk rescales loading; carrier variants reshape composition Figure 4 — What the gate selects Figure 5 — Inherited predisposition and the health record Figure 6 — Replication: carrier life courses in three cohorts

Pipeline

1. Train the model on UK Biobank (src/train_slope_3way.py): signatures, polygenic level and age effects, health reference, frailty.
2. Held-out predictions (src/triplet_loo_calibration.py): per-person deviation and frailty refit up to enrollment.
3. Carrier atlases (src/reparam_fig3/run_atlas_triplet_fixed.sh, run_static_atlas_triplet.sh, run_brca1_s8_triplet.sh).
4. Figures: the scripts named on each page.

Data access: UK Biobank, All of Us and Mass General Brigham Biobank data are available to approved researchers from each resource.