← Về thư mục
📄 / / profiles / r-and-d / raw_evidence / OpenAI4S / skills / bioskills / bio-population-genetics-linkage-disequilibrium / references / usage-guide.md

Linkage Disequilibrium - Usage Guide

Overview

Linkage disequilibrium is the non-random association of alleles at different loci, but the practical point is that r2 and D' answer different questions: r2 (= chi2/N) is the tagging and GWAS-power currency, while D' marks whether recombination has been observed and is upward-biased for rare variants; pruning (genotype-blind) and clumping (p-value-aware) are distinct operations, and any clumping or fine-mapping LD reference must be ancestry-matched or it fails silently.

Prerequisites

Quick Start

Tell your AI agent what you want to do: - "Prune my genotypes for PCA, excluding long-range-LD regions first" - "Compute composite r2 between SNPs without phasing" - "Clump my GWAS summary stats to one lead SNP per locus" - "Find tag SNPs at r2 >= 0.8 for my variants of interest" - "Define Gabriel haplotype blocks for a candidate region" - "Plot LD decay with distance, stratified by population"

Example Prompts

LD Pruning

"Exclude the MHC and known inversions by coordinate, then LD-prune my PLINK fileset at r2 0.1 for PCA."

"Create an independent SNP set for ADMIXTURE with a 200kb window."

LD Calculation

"Compute composite (unphased) r2 between all pairs within 500kb and report D' for the HLA region."

"Build an LD matrix for my candidate locus and tell me which SNPs tag a variant at r2 >= 0.8."

GWAS Clumping

"Clump my GWAS summary statistics with p1 5e-8 and r2 0.1 using an ancestry-matched LD reference."

"Find lead SNPs for each associated locus, and flag where over-clumping might hide a secondary signal."

Blocks and Decay

"Identify Gabriel haplotype blocks across chromosome 6p21."

"Plot LD decay with physical distance, stratifying by population so admixture LD does not flatten the curve."

What the Agent Will Do

  1. Identify the operation - measure (r2 vs D'), prune, clump, block, or decay - from the stated goal, not from a default.
  2. For measurement, default to composite --r2-unphased / Rogers-Huff unless phase is trustworthy, and reserve D' for block/recombination questions.
  3. For pruning, exclude long-range-LD regions by coordinate first, then slide an r2 window with a step of 1 for kb windows.
  4. For clumping, override PLINK's permissive defaults (p1 5e-8, r2 0.1) and use an ancestry-matched LD reference.
  5. For blocks, run the Gabriel confidence-interval method; for decay, bin r2 by distance after stratifying by population.
  6. Report variant counts before/after pruning, lead SNPs per locus, and any rare-variant or wrong-ancestry caveats.

Tips