Agent skill

bio-causal-genomics-mendelian-randomization

Estimate causal effects of an exposure on an outcome from GWAS summary statistics using genetic instruments. Implements IVW (fixed/random), MR-Egger, weighted median/mode, MR-RAPS, CAUSE, GSMR-HEIDI, MR-PRESSO, MVMR, MR-Clust, LCV, and LHC-MR via TwoSampleMR, MendelianRandomization, MR-PRESSO, cause, and lhcMR. Use when testing causal direction between traits, evaluating drug-target effects via cis-pQTL/cis-eQTL, performing multivariable mediation MR, distinguishing causation from correlated horizontal pleiotropy, or producing STROBE-MR-compliant sensitivity batteries.

BioTender-maxgithub.com/BioTender-maxGitHub ↗
claude-codeNOASSERTION
Install
npx skills add BioTender-max/awesome-bio-agent-skills --skill mendelian-randomization --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 6
SKILL.md size: 34 KB
Bundled scripts: none
Path: skills/bioskills/mendelian-randomization/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 135
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

Review
written from the skill's own SKILL.md · Aug 5, 2026

What it does

Estimates causal effects of an exposure on an outcome from GWAS summary statistics using genetic instruments. Implements IVW (fixed/random), MR-Egger, weighted median/mode, MR-RAPS, CAUSE, GSMR-HEIDI, MR-PRESSO, MVMR, MR-Clust, LCV, and LHC-MR via TwoSampleMR, MendelianRandomization, MR-PRESSO, cause, and lhcMR. Use when testing causal direction between traits, evaluating drug-target effects via cis-pQTL/cis-eQTL, performing multivariable mediation MR, distinguishing causation from correlated horizontal pleiotropy, or producing STROBE-MR-compliant sensitivity batteries.

How it works

  • Provides a mapped set of MR methods accessible from R, including: TwoSampleMR::mr() for IVW/Egger/weighted median/weighted mode; MendelianRandomization package methods (mr_ivw, mr_egger, mr_median, mr_mbe, mr_conmix); MR-PRESSO::mr_presso(); cause::cause(); MVMR::strength_mvmr() + MVMR::ivw_mvmr().
  • Supplies a reference of compatibility, instrument counts, and pleiotropy assumptions per method in a tabular format.
  • Documents one- vs two-sample contexts, weak-instrument bias direction, and practical fixes (e.g., MR-RAPS for weak instruments, MRlap for overlap/winner’s curse corrections).
  • Describes a cis-MR workflow restricting instruments to a gene’s cis window, with colocalization checks and PAV flags for drug-target interpretation.

When to use it

  • When testing causal direction between traits, or evaluating drug-target effects via cis-pQTL/cis-eQTL.
  • When performing multivariable mediation MR (X -> M -> Y) or distinguishing causation from correlated horizontal pleiotropy.
  • When planning STROBE-MR-compliant sensitivity batteries and selecting an appropriate primary method according to the experimental scenario (standard two-sample polygenic exposure, one-sample settings, partial overlap, cis-MR, or MVMR).

What it can touch

  • Primary tool: TwoSampleMR. Other methods include MendelianRandomization, MR-PRESSO, cause, and lhcMR as noted in the description.

Caveats

  • Discusses multiple failure modes and aligns method choices with pleiotropy assumptions and instrument strength.
  • Emphasizes verification of version compatibility for underlying packages (TwoSampleMR, ieugwasr, MR-PRESSO, MRlap, coloc, mrclust, lhcMR) and notes potential biases like winner’s curse and weak instruments.
  • Recommends design choices to mitigate biases (e.g., three-sample design, overlap corrections, and sensitivity panels).
From the SKILL.md

## Version Compatibility Reference examples tested with: TwoSampleMR 0.6.0+, MendelianRandomization 0.10+, MR-PRESSO 1.0+, cause 1.2+, MVMR 0.4+, ieugwasr 1.0+, MRlap 0.0.3.2+, coloc 5.2+, mrclust 0.1+, lhcMR 0.0.1+, R 4.4+. Both TwoSampleMR 0.6.0 and ieugwasr 1.0 are the JWT-transition versions; older versions still expect deprecated OAuth. Before using code patterns, verify installed versions match. If versions differ: - R: `packageVersion('<pkg>')` then `?function_name` to verify parameters - CLI (plink, GCTA-GSMR): `<tool> --version` then `<tool> --help` If code throws an error referencing a function that has moved (e.g. `ieugwasr::ld_clump` vs `TwoSampleMR::clump_data`) or an OAuth token failure, introspect the installed API and adapt the example rather than retrying. # Mendelian Randomization **"Test whether trait X causally affects trait Y from GWAS summary statistics"** -> Use genetic variants as instrumental variables (IVs) that satisfy three assumptions (relevance, independence, exclusion restriction) to estimate `beta_causal = beta_outcome / beta_exposure` under the IV framework (Davey Smith & Ebrahim 2003 IJE 32:1; Burgess Thompson 2017 SAGE textbook). Tool choice is a

What's inside
Steps it walks through
  1. Version Compatibility
  2. Statistical Model Taxonomy
  3. Decision Tree by Experimental Scenario
  4. One-Sample vs Two-Sample Bias Direction
  5. MRlap: unified correction for sample overlap + winner's curse + weak instruments
  6. Drug-Target / cis-MR Framework
  7. Binary outcomes and non-collapsibility
  8. Per-Method Failure Modes
  9. IVW under directional pleiotropy
  10. Weak-instrument bias direction
  11. Winner's curse at P~5e-8
  12. NOME violation invalidating Egger
  13. Steiger filter false flag under unmeasured confounding
  14. Palindromic SNP harmonization
Ships with 5 files
  • examples/cis_mr_drug_target.R
  • examples/mr_visualization.R
  • examples/two_sample_mr.R
  • examples/twosamplemr_analysis.R
  • usage-guide.md
More from awesome-bio-agent-skills
All skills →
About this skill
What does the bio-causal-genomics-mendelian-randomization skill do?

Estimate causal effects of an exposure on an outcome from GWAS summary statistics using genetic instruments. Implements IVW (fixed/random), MR-Egger, weighted median/mode, MR-RAPS, CAUSE, GSMR-HEIDI, MR-PRESSO, MVMR, MR-Clust, LCV, and LHC-MR via TwoSampleMR, MendelianRandomization, MR-PRESSO, cause, and lhcMR. Use when testing causal direction between traits, evaluating drug-target effects via cis-pQTL/cis-eQTL, performing multivariable mediation MR, distinguishing causation from correlated horizontal pleiotropy, or producing STROBE-MR-compliant sensitivity batteries.

How do I install it?

Run `npx skills add BioTender-max/awesome-bio-agent-skills --skill mendelian-randomization --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From BioTender-max/awesome-bio-agent-skills, a repository with 135 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going