arxiv-database
This skill provides Python tools for searching and retrieving preprints from arXiv.org via its public Atom API. It supports keyword search,…
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.
Original source
https://github.com/FreedomIntelligence/OpenClaw-Medical-Skills/tree/main/skills/bio-causal-genomics-mendelian-randomization
Skill Snapshot
Source Doc
Mendelian randomization (MR) uses genetic variants as instrumental variables (IVs) to estimate causal effects of exposures on outcomes. Valid instruments must satisfy three assumptions:
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.
TwoSampleMR (extract_instruments + harmonise_data + mr)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'
)
Related skills
This skill provides Python tools for searching and retrieving preprints from arXiv.org via its public Atom API. It supports keyword search,…
Bayesian optimization for experimental design and hyperparameter tuning in biomedical research.
Compute alignment statistics: flagstat, idxstats, coverage depth.
Calculate alignment statistics including sequence identity, conservation scores, substitution matrices, and similarity metrics. Use when com…