What problem does it solve?
Regional plots, LD pruning, and coloc analyses need pairwise linkage disequilibrium r² values between a lead variant and nearby variants, but downloading multi-gigabyte reference panels is a heavy cold-start. This Skill fetches only the needed region from the 1000 Genomes Phase 3 GRCh38 panel on demand and computes ancestry-stratified r² locally with plink 1.9.
Core Features & Use Cases
- On-demand region fetch: tabix byte-range requests against the EBI 1000G FTP pull only a ~5-50 MB region VCF, cached locally for repeat runs.
- Ancestry-stratified LD: filters samples to a chosen 1000G super-population (EUR, AFR, AMR, EAS, SAS) via the canonical Phase 3 panel TSV before computing r².
- Provenance-rich outputs: writes ld_pairs.tsv, a manifest.yaml with panel and plink versions, and a human-readable report.md.
- Use Case: Given a SORT1 locus lead variant (1_109274968_G_T) and five partner variants, produce EUR r² values ready for LocusZoom-style LD coloring of a regional Manhattan plot.
Quick Start
Ask the agent to compute ancestry-stratified LD r² around a lead variant using the 1000 Genomes panel, or run the bundled demo with python ld_1000g_region_compute.py --demo --output /tmp/sort1_ld_demo.