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

bio-causal-genomics-mediation-analysis

Maintainer FreedomIntelligence · Last updated April 1, 2026

Decompose genetic effects into direct and indirect paths through mediating variables using the mediation R package. Tests whether gene expression, methylation, or other molecular phenotypes mediate the effect of genetic variants on disease. Use when testing whether a molecular phenotype mediates the genotype-to-phenotype relationship.

OpenClawNanoClawAnalysisReproductionbio-causal-genomics-mediation-analysis🧬 bioinformatics (gptomics bio-* suite)bioinformatics — epidemiological & causal genomicsdecompose

Original source

FreedomIntelligence/OpenClaw-Medical-Skills

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

Maintainer
FreedomIntelligence
License
MIT
Last updated
April 1, 2026

Skill Snapshot

Key Details From SKILL.md

2 min

Key Notes

  • R: mediation::mediate() for causal mediation analysis.
  • Test whether gene expression mediates the effect of this variant on disease" → Decompose the total genetic effect into direct and indirect (mediated) paths through a molecular phenotype, estimating ACME, ADE, and proportion mediated with bootstrap confidence intervals. R: mediation::mediate() for causal mediation analysis.
  • mediator_model <- lm(expression ~ genotype + age + sex + pc1 + pc2, data = dat).

Source Doc

Excerpt From SKILL.md

Framework

Causal mediation decomposes the total effect of a treatment (genotype) on an outcome (phenotype) into:

  • ACME (Average Causal Mediation Effect) - Indirect effect through the mediator
  • ADE (Average Direct Effect) - Direct effect not through the mediator
  • Total effect = ACME + ADE
  • Proportion mediated = ACME / Total effect

Typical genomic applications:

  • SNP -> gene expression (mediator) -> disease
  • SNP -> DNA methylation (mediator) -> gene expression
  • SNP -> protein levels (mediator) -> clinical outcome

Basic Mediation with the mediation Package

Goal: Decompose a genetic effect into direct and indirect (mediated) paths through a molecular phenotype.

Approach: Fit separate models for mediator and outcome, then run mediate() with bootstrap to estimate ACME (indirect), ADE (direct), and proportion mediated.

library(mediation)

## For binary outcome, use glm with family = binomial

outcome_model <- glm(
  disease ~ genotype + expression + age + sex + pc1 + pc2,
  data = dat, family = binomial
)

Use cases

  • Use when testing whether a molecular phenotype mediates the genotype-to-phenotype relationship.

Not for

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

Upstream Related Skills

  • mendelian-randomization - Causal inference using genetic instruments
  • colocalization-analysis - Test if signals share a causal variant
  • population-genetics/association-testing - GWAS for treatment-outcome associations
  • multi-omics-integration/mofa-integration - Multi-omics data for mediation chains

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