Skip to content

feat(olink): data-driven per-disease effect-size catalog - #4

Merged
bschilder merged 1 commit into
mainfrom
feat/olink-disease-effect-catalog-v2
Apr 23, 2026
Merged

feat(olink): data-driven per-disease effect-size catalog#4
bschilder merged 1 commit into
mainfrom
feat/olink-disease-effect-catalog-v2

Conversation

@bschilder

Copy link
Copy Markdown
Owner

Replaces closed PR #3 (base branch was the now-deleted feat/olink-npx-simulator after #2 merged — rebased onto current main as a single cherry-picked commit).

Content unchanged from #3: 7-disease × 43-row catalog, DiseaseEffectCatalog class, extended demo notebook §10, docs rubric. See PR #3 for full description.

🤖 Generated with Claude Code

Ships synthlab/data/olink_disease_effects.csv — a curated, source-cited
per-disease protein effect-size catalog covering 7 diseases × 43 rows
(Alzheimer, BRCA_hereditary, CAD, CKD, Cancer_broad, IBD, T2D). Every
row cites a real DOI (Sun et al. 2023 UKB-PPP, Williams et al. 2022
Sci Transl Med, Eldjarn et al. 2023 deCODE, Cohen et al. 2018
CancerSEEK, Dubin et al. 2023 Nat Comm CRIC, Guo et al. 2024 Nat
Aging, Hu et al. 2025 Nat Comm UKB-PPP, Ahn et al. 2021 Cancers).

Public API in synthlab.olink:
- DiseaseEffectCatalog (frozen dataclass wrapping the loaded frame
  with .diseases(), .proteins_for(), .effects_for(noise_sd, seed))
- load_disease_effect_catalog(path=None) — importlib.resources-based
  ship-in-wheel loader

Both re-exported from synthlab/__init__.py.

Tests (tests/test_olink_disease_catalog.py, 15 tests):
- schema, minimum disease coverage, DOI shape, defensible magnitudes
- effects_for shape, KeyError paths, noise determinism / perturbation
- end-to-end round-trip: catalog → effects_for → simulate_olink_npx,
  assert per-disease mean NPX shift matches catalog within 3 SE at
  500 samples/arm × 44 rows

Demo notebook (notebooks/olink_demo.ipynb) gains Section 10 —
disease-conditional generation — with loading, inspection, 3-group
cohort simulation (T2D/CAD/baseline, 300 samples each), top-5
grouped-bar chart, and a catalog-vs-empirical scatter. Rebuilt via
notebooks/_build_olink_demo.py; executed outputs embedded. Cell
count goes from 24 → 34.

Docs:
- README.md gains a "Disease-conditional effect catalog" subsection
  with per-disease row-range citations.
- docs/olink_disease_catalog.md — full schema, unit-conversion
  guidance, SE guidance, evidence-strength rubric, PR checklist
  for adding a new disease.

Ship-in-wheel plumbing:
- synthlab/data/__init__.py + data/*.csv in [tool.setuptools.package-data]
- .gitignore carve-out so synthlab/data/*.csv are tracked while other
  data/ and *.csv remain ignored.

Stacks on PR #2 (feat/olink-npx-simulator).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@bschilder
bschilder merged commit 00bc3b2 into main Apr 23, 2026
1 check 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