locuscompare-region-render

Render 4-panel LocusCompare colocalization plots from harmonised GWAS and QTL summary statistics.

1.1k|257|Updated Feb 25, 2026
One-click install
npx skills add https://github.com/ClawBio/ClawBio --skill locuscompare-region-render
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: locuscompare-region-render
Source: https://github.com/ClawBio/ClawBio/tree/main/skills/locuscompare-region-render
Command: npx skills add https://github.com/ClawBio/ClawBio --skill locuscompare-region-render

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires numpy, scipy, pandas, matplotlib, pysam, pyyaml, pydantic, requests.

What problem does it solve?

Confirming whether two genome-wide association signals (e.g. a GWAS hit and an eQTL signal) share the same causal variant at a locus normally requires manual data harmonisation, LD computation, and plotting across multiple tools. This Skill automates the full pipeline and produces the canonical Liu 2019 LocusCompare 4-panel diagnostic figure with full reproducibility provenance.

Core Features & Use Cases

  • 4-panel regional visualisation: Overlays an outcome GWAS Manhattan, an exposure QTL Manhattan, a GENCODE gene track, and a cross-trait -log10(p) scatter colored by LD r² to the lead variant.
  • Flexible data inputs: Accepts pre-fetched harmonised sumstats TSVs in a canonical schema, or fetches regions on demand from the eQTL Catalogue, GWAS Catalog, UKB-PPP pQTL, 1000 Genomes (LD via plink), and Ensembl REST (gene track).
  • Reproducibility by default: Every run emits a YAML manifest with source releases, plink version, palindromic-exclusion counts, SHA-256 checksums, and a rerunnable commands.sh.
  • Use Case: Given the SORT1 eQTL study and a cholesterol GWAS, render the regional LocusCompare plot around lead variant 1_109274968_G_T to visually confirm colocalization before citing the formal coloc PP-H4 in a target-validation report.

Quick Start

Ask the agent to render a LocusCompare plot for lead variant 1_109274968_G_T using the bundled synthetic demo, or point it at a YAML config naming your exposure and outcome summary-statistics files.

Frequently Asked Questions about locuscompare-region-render

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I make a LocusCompare plot for a GWAS and eQTL signal?

Provide a JSON or YAML config naming the lead variant (chr_pos_ref_alt, GRCh38), the exposure and outcome studies, and a window size. The skill fetches both regions, computes LD r² against 1000 Genomes, and renders the 4-panel PNG plus a manifest.

What input format do the summary statistics need for colocalization plotting?

Inputs must be tab-separated slices in the canonical schema: variant_id, chromosome, position_bp, allele_a, allele_b, beta, se, and p, in GRCh38 with allele_b as the effect allele. Bundled fetchers emit this format from eQTL Catalogue and GWAS Catalog automatically.

Does the LocusCompare render work without plink installed?

Yes, it degrades gracefully. Without plink 1.9 the LD r² computation is skipped and scatter points render in grey, with the caveat recorded in the manifest. Install plink via brew or apt to restore LD coloring.

Why are some variants excluded from the colocalization scatter?

Palindromic A/T and G/C variants have ambiguous strand alignment and are excluded from the cross-trait scatter by default, following the Hemani 2018 convention. The exclusion count is reported in the manifest, and they still appear in the per-trait Manhattan panels.

Can this skill compute coloc posterior probabilities like PP-H4?

No, it is a visualisation tool only and does not run coloc.abf, SuSiE, or fine-mapping. You supply the PP-H4 from an upstream tool such as Open Targets as a label, and the plot serves as visual confirmation alongside the formal statistic.

When should I not use a regional LocusCompare plot?

Avoid it for single variants, credible sets with fewer than 5 variants, trans-eQTL signals, or single-trait regional Manhattans. It also does not estimate causal effects; use a Mendelian randomisation skill for IVW or MR-Egger estimates.