← Về thư mục
📄 / / profiles / r-and-d / raw_evidence / OpenAI4S / skills / bioskills / bio-causal-genomics-pleiotropy-detection / references / usage-guide.md

Pleiotropy Detection - Usage Guide

Overview

Detect and adjust for horizontal pleiotropy in two-sample Mendelian randomization. Distinguishes uncorrelated horizontal pleiotropy (UHP) from correlated horizontal pleiotropy (CHP) and selects a method battery whose assumptions span both regimes.

UHP vs CHP is the central distinction:

A complete sensitivity battery must include at least one CHP-aware method when LDSC rg(exposure, outcome) >= 0.3 or biology suggests a shared upstream factor.

Operational Decision Flow

  1. Compute LDSC genetic correlation (see causal-genomics/genetic-correlation). If |rg| > 0.3, escalate to Step 3.
  2. Run the standard battery: IVW (random-effects if Cochran Q p < 0.05), MR-Egger with NOME I^2_GX check (SIMEX correct if 0.6 <= I^2_GX < 0.9), weighted median, weighted mode, MR-PRESSO at NbDistribution >= 10000 for stringent reporting.
  3. If CHP plausible (rg > 0.3 OR PRESSO global p < 0.05 with > 50% outliers OR Egger/median/mode disagree by > 2 SE), run CAUSE (if >= 100 sig SNPs) or LHC-MR; report ELPD delta + z + q + gamma.
  4. Triangulate with pre-MR Steiger filter, bidirectional MR, LCV gcp, and the LDSC rg report.

LCV gcp Interpretation

gcp value Interpretation
0 Pure genetic correlation; no partial causation
0.5 Partial causation; mixture
0.6 Partial causation; modestly causal direction
1 Fully causal in tested direction
Significant p_gcp != 0 Directional evidence of (partial) causation

LCV uses ALL genome-wide SNPs after LDSC-merging; it does NOT use the MR instrument set. It complements MR rather than replacing it.

Prerequisites

install.packages(c('remotes', 'TwoSampleMR', 'MendelianRandomization', 'simex'))
remotes::install_github('rondolab/MR-PRESSO')          # CRAN-never; GitHub-only
remotes::install_github('jean997/cause')               # CHP-aware (Morrison 2020)
remotes::install_github('cnfoley/mrclust')             # Mechanism heterogeneity
remotes::install_github('gqi/MRMix')                   # Mixture-of-distributions
remotes::install_github('qingyuanzhao/mr.raps')        # CRAN-archived 2025-03; install from GitHub
remotes::install_github('LizaDarrous/lhcMR')           # Heritable-confounder MR
# LCV: git clone https://github.com/lukejoconnor/LCV (R scripts, no package)

Inputs are typically a harmonized TwoSampleMR data.frame (beta.exposure, beta.outcome, se.exposure, se.outcome, SNP, effect_allele, eaf, etc.). LHC-MR and LCV take genome-wide GWAS sumstats with LDSC-style merged SNPs; CAUSE takes pruned signature SNPs plus full sumstats for nuisance estimation.

Quick Start

Tell your AI agent what you want to do: - "Run the standard MR sensitivity battery on my TwoSampleMR-harmonized data" - "I suspect a shared heritable confounder; run CAUSE alongside IVW, Egger, and MR-PRESSO" - "My instruments are mostly weak (mean F < 20); use MR-RAPS instead of IVW" - "I have a polygenic exposure with few significant SNPs; run LHC-MR or LCV" - "Cluster my instruments by causal estimate to identify heterogeneous mechanisms" - "Run bidirectional MR with Steiger pre-filtering on both directions" - "Apply SIMEX to my MR-Egger because I^2_GX is 0.75" - "Build a STROBE-MR sensitivity reporting table from my MR results"

Example Prompts

Standard sensitivity battery (UHP-focused)

"Run IVW, MR-Egger, weighted median, weighted mode, Cochran Q, Egger intercept, MR-PRESSO with 5000 distributions, Steiger directionality, and leave-one-out on my harmonized data and produce a comparison table."

"Compute I^2_GX for my Egger analysis; if below 0.9 apply SIMEX correction."

Suspected CHP (correlated pleiotropy)

"LDSC genetic correlation between my exposure and outcome is 0.45. Run CAUSE in addition to MR-PRESSO and compare delta_ELPD against the sharing model."

"Use LHC-MR to jointly estimate forward causal effect, reverse causal effect, and heritable-confounder contribution from genome-wide sumstats."

"Compute LCV gcp from LDSC-merged sumstats to distinguish causation from pure genetic correlation."

Weak-IV regime

"Mean F-statistic across my instruments is 14. Run MR-RAPS with Huber robust loss and overdispersion modeling; report point estimate and CI alongside IVW."

"Apply MR-Mix and contamination mixture to my weak-IV dataset; reconcile against MR-RAPS."

Heterogeneous mechanisms

"I suspect my LDL instruments operate through multiple lipoprotein pathways. Run MR-Clust and report per-cluster IVW estimates with biological annotation suggestions."

Polygenic exposure

"My exposure is polygenic with only 40 genome-wide-significant SNPs. CAUSE is underpowered. Run LHC-MR or report LCV gcp instead."

Drug-target cis-MR

"Run colocalization at the cis-locus instead of Egger because I only have 3 SNPs in tight LD; complement with Steiger directionality."

Bidirectional MR

"Instrument both directions and apply Steiger pre-filter before primary IVW; report forward and reverse IVW + Egger + median + mode side by side."

SIMEX rescue for Egger

"My I^2_GX is 0.78. Apply SIMEX correction to MR-Egger using the simex package; report SIMEX-corrected slope alongside naive slope."

STROBE-MR reporting

"Generate a STROBE-MR compliant table summarizing all methods, F-statistics, I^2_GX, Egger intercept, PRESSO global / distortion / corrected, Steiger, and CAUSE delta_ELPD with citations."

What the Agent Will Do

  1. Verify instrument selection (F-statistic distribution, LD pruning, MAF, harmonization, palindrome handling)
  2. Run IVW + Egger + weighted median + weighted mode side-by-side
  3. Test Egger intercept for directional UHP; compute I^2_GX for NOME validity; SIMEX-correct if needed
  4. Run MR-PRESSO with >= 5000 distributions for global + outlier + distortion tests; produce corrected estimate
  5. Apply Steiger filter and report directionality test
  6. Run leave-one-out for stability
  7. If CHP is plausible (rg >= 0.3 or biology suggests shared factor): add CAUSE (if sig SNPs >= 100) OR LHC-MR
  8. If mechanisms heterogeneous: run MR-Clust
  9. If weak instruments: switch primary to MR-RAPS with robust loss
  10. Reconcile UHP-method agreement vs CHP-method estimate; flag discordances
  11. Produce STROBE-MR table with all methods, thresholds, and limitations

Tips

causal-genomics/mendelian-randomization - Primary causal estimation that this sensitivity battery validates causal-genomics/genetic-correlation - LDSC rg required for Step 1 of the decision flow; CHP escalation trigger causal-genomics/colocalization-analysis - Required for cis-MR drug-target signals where instruments are too few for Egger causal-genomics/fine-mapping - Identify causal variants underlying instrument loci causal-genomics/mediation-analysis - Multivariable MR for mediator-adjusted causal estimates population-genetics/association-testing - GWAS summary statistics underlying MR instruments clinical-biostatistics/effect-measures - Translate MR estimates to clinical effect measures