tooluniverse-mendelian-randomization
БесплатноБез исполняемых скриптовНе проверенMendelian randomization (MR) causal inference — does an exposure, risk factor, or biomarker CAUSALLY affect a disease/outcome, using genetic variants as…
от mims-harvard★ 1 813 звёзд на GitHubОб этом скилле
Mendelian Randomization (Causal Inference from Genetic Instruments)
MR estimates the CAUSAL effect of an exposure on an outcome using genetic variants as instrumental variables. Because alleles are randomized at conception, MR is largely robust to the confounding and reverse causation that bias observational associations. It is not a free lunch: the causal claim rests on three assumptions, and violating them (especially horizontal pleiotropy) silently biases the estimate.
LOOK UP, DON'T GUESS: never assert a causal MR estimate from memory. Genetic-instrument results are updated as new GWAS are published — always retrieve current evidence with EpiGraphDB_get_mendelian_randomization. Do not invent beta/p-values.
Correlation ≠ causation, and genetic correlation ≠ causation. A high genetic correlation (rg) means two traits share heritability — it does NOT establish a causal direction. Only MR (with valid instruments) speaks to causality. Report them as different kinds of evidence.
The three instrumental-variable assumptions
| Assumption | Statement | How it fails | Check |
|---|---|---|---|
| Relevance | Instrument is robustly associated with the exposure | Weak instruments (low F-stat) → bias toward the confounded observational estimate | MOE score; instruments selected at GWAS significance |
| Independence | Instrument shares no common cause with the outcome | Population stratification, assortative mating | Ancestry-matched GWAS; report population |
| Exclusion restriction | Instrument affects the outcome ONLY through the exposure | Horizontal pleiotropy — the variant influences the outcome via another path | MR-Egger intercept ≈ 0; agreement across methods |
If you cannot speak to these, your causal claim is provisional. Say so.
When to use
- "Does [exposure] causally affect [outcome/disease]?" — the core MR question.
- Triangulating an observational/epidemiological association ("BMI correlates with depression — is it causal?").
- Reverse-causation checks (bidirectional MR: does the outcome cause the exposure instead?).
- Prioritising drug targets / risk factors with genetic causal support.
- Distinguishing a causal driver from a shared-etiology bystander (MR vs genetic correlation).
This skill wraps the IEU OpenGWAS / EpiGraphDB MR-EvE ("MR Everything-vs-Everything") resource: a large matrix of pre-computed two-sample MR results between GWAS traits. It does not run a bespoke two-sample MR from raw summary statistics with your own instrument set — see Limitations.
Anchor tools
| Tool | Purpose |
|---|---|
EpiGraphDB_search_opengwas |
Resolve a free-text trait to exact OpenGWAS study IDs + labels (DO THIS FIRST) |
EpiGraphDB_get_mendelian_randomization |
Pre-computed MR estimate(s) for an exposure→outcome trait pair (curated pairs; start here) |
OpenGWAS_get_mr_instruments |
Custom two-sample MR: fetch the exposure's clumped instruments + their harmonized outcome effects for any GWAS pair (needs a free OPENGWAS_JWT). Use when the pair isn't in MR-EvE |
MR_estimate |
Local calculator: given harmonized beta_exposure/se_exposure/beta_outcome/se_outcome arrays (e.g. straight from OpenGWAS_get_mr_instruments), computes IVW, MR-Egger (with pleiotropy intercept), weighted-median, and Cochran's Q / I² — no R, no manual formula. Use this to finish the custom-MR path below instead of hand-deriving IVW or shelling out to TwoSampleMR |
EpiGraphDB_get_genetic_correlations |
rg between a trait and others (shared etiology, NOT causation). Sparse — see Step 4 caveat |
EpiGraphDB_get_drugs_for_trait |
Drugs targeting genes associated with a risk-factor trait (causal-target follow-up) |
gwas_search_associations |
GWAS Catalog associations, to inspect the instruments behind a trait |
Workflow
Step 1 — Resolve trait labels (avoid silent misses)
EpiGraphDB matches GWAS trait labels exactly and case-sensitively. Always resolve free text first:
EpiGraphDB_search_opengwas {"query": "coronary heart disease"}
# → returns ids like 'ieu-a-7' and the exact label 'Coronary heart disease'
Use the returned exact label (or a sentence-case form) in the MR call. The MR tool now retries sentence-case variants and returns a metadata.note when it falls back or finds nothing — read that note; an empty mr_results with a note means "labels didn't match", NOT "no causal effect".
Step 2 — Run MR (exposure → outcome)
EpiGraphDB_get_mendelian_randomization {
"exposure_trait": "LDL cholesterol",
"outcome_trait": "Coronary heart disease",
"pval_threshold": 1e-5
}
Each row carries beta (causal effect estimate), se, pval, method, moescore, and the exposure/outcome IDs.
Step 3 — Interpret (see tables below)
Direction, magnitude, instrument quality, and method agreement.
Step 4 — Triangulate
- Bidirectional MR (primary triangulation) — swap exposure and outcome t
Установить tooluniverse-mendelian-randomization в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл tooluniverse-mendelian-randomization?
Mendelian randomization (MR) causal inference — does an exposure, risk factor, or biomarker CAUSALLY affect a disease/outcome, using genetic variants as instrumental variables (IEU OpenGWAS / EpiGraphDB MR-EvE). Use this whenever the user asks if X causes Y, whether an observational association is actually causal or just correlation, if a biomarker/trait is a causal risk factor, wants to triangulate epidemiology against genetic evidence, or mentions Mendelian randomization, instrumental-variable analysis, two-sample MR, or genetic causal evidence — even if they never say "MR" (e.g. "is LDL cholesterol actually causal for heart disease?", "does BMI cause type 2 diabetes or just correlate?", "is CRP a causal driver of stroke?"). Covers trait-label resolution, MR effect direction/magnitude, instrument quality (MOE score), method agreement (IVW vs MR-Egger vs weighted median), bidirectional MR for reverse causation, and distinguishing causation from genetic correlation. Not for plain GWAS association lookups (use the GWAS skills) or fitting your own instruments from raw summary statistics.
Как установить скилл tooluniverse-mendelian-randomization?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл tooluniverse-mendelian-randomization запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic