Data & ReproStatistics & Data AnalysisFreedomIntelligence/OpenClaw-Medical-SkillsData & Reproduction
BI

bio-causal-genomics-mendelian-randomization

Maintainer FreedomIntelligence · Last updated April 1, 2026

Estimate causal effects between exposures and outcomes using genetic variants as instrumental variables with TwoSampleMR. Implements IVW, MR-Egger, weighted median, and MR-PRESSO methods for robust causal inference from GWAS summary statistics. Use when testing whether an exposure causally affects an outcome using genetic instruments.

OpenClawNanoClawAnalysisReproductionbio-causal-genomics-mendelian-randomization🧬 bioinformatics (gptomics bio-* suite)bioinformatics — epidemiological & causal genomicsestimate

Original source

FreedomIntelligence/OpenClaw-Medical-Skills

https://github.com/FreedomIntelligence/OpenClaw-Medical-Skills/tree/main/skills/bio-causal-genomics-mendelian-randomization

Maintainer
FreedomIntelligence
License
MIT
Last updated
April 1, 2026

Skill Snapshot

Key Details From SKILL.md

2 min

Key Notes

  • R: TwoSampleMR::mr() for multi-method causal estimation.
  • R: MendelianRandomization::mr_ivw() for individual methods.
  • Test whether my exposure causally affects this outcome using GWAS data" → Use genetic variants as instrumental variables to estimate causal effects from GWAS summary statistics, applying IVW, MR-Egger, and weighted median methods for robust inference. R: TwoSampleMR::mr() for multi-method causal estimation R: MendelianRandomization::mr_ivw() for individual methods.
  • exposure_dat <- extract_instruments(outcomes = 'ieu-a-2', p1 = 5e-08, clump = TRUE).

Source Doc

Excerpt From SKILL.md

Core Concepts

Mendelian randomization (MR) uses genetic variants as instrumental variables (IVs) to estimate causal effects of exposures on outcomes. Valid instruments must satisfy three assumptions:

  1. Relevance - The variant is associated with the exposure (F-statistic > 10)
  2. Independence - The variant is not associated with confounders
  3. Exclusion restriction - The variant affects the outcome only through the exposure

TwoSampleMR Workflow

Goal: Estimate the causal effect of an exposure on an outcome using GWAS summary statistics and genetic instruments.

Approach: Extract instruments for the exposure, extract matching outcome data, harmonize allele directions, and run multiple MR methods (IVW, Egger, weighted median, weighted mode).

"Test if an exposure causally affects an outcome" -> Use genetic variants as instrumental variables to estimate causal effects from GWAS data.

  • R: TwoSampleMR (extract_instruments + harmonise_data + mr)
  • R: MendelianRandomization (mr_input + mr_ivw/mr_egger)
library(TwoSampleMR)

## From local GWAS summary statistics

exposure_dat <- read_exposure_data(
  filename = 'exposure_gwas.txt',
  sep = '\t',
  snp_col = 'SNP', beta_col = 'BETA', se_col = 'SE',
  effect_allele_col = 'A1', other_allele_col = 'A2',
  pval_col = 'P', eaf_col = 'EAF'
)

Use cases

  • Use when testing whether an exposure causally affects an outcome using genetic instruments.

Not for

  • Do not rely on this catalog entry alone for installation or maintenance details.

Upstream Related Skills

  • pleiotropy-detection - Sensitivity analyses for MR assumptions
  • colocalization-analysis - Confirm shared causal variants
  • fine-mapping - Prioritize causal variants at instrument loci
  • population-genetics/association-testing - GWAS for exposure and outcome data

Related skills

Related skills

Back to directory
AR
Data & ReproStatistics & Data Analysis

arxiv-database

This skill provides Python tools for searching and retrieving preprints from arXiv.org via its public Atom API. It supports keyword search,…

Claude CodeAnalysis
K-Dense-AI/claude-scientific-skillsView
BA
Data & ReproStatistics & Data Analysis

bayesian-optimizer

Bayesian optimization for experimental design and hyperparameter tuning in biomedical research.

OpenClawNanoClawAnalysis
FreedomIntelligence/OpenClaw-Medical-SkillsView
BI
Data & ReproStatistics & Data Analysis

bio-alignment-files-bam-statistics

Compute alignment statistics: flagstat, idxstats, coverage depth.

OpenClawNanoClawAnalysis
FreedomIntelligence/OpenClaw-Medical-SkillsView
BI
Data & ReproStatistics & Data Analysis

bio-alignment-msa-statistics

Calculate alignment statistics including sequence identity, conservation scores, substitution matrices, and similarity metrics. Use when com…

OpenClawNanoClawAnalysis
FreedomIntelligence/OpenClaw-Medical-SkillsView