gwas-catalog-region-fetch

Fetch regional GWAS summary statistics from the NHGRI-EBI GWAS Catalog via tabix-on-FTP.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pysam, pandas, requests.

What problem does it solve?

Researchers needing per-variant GWAS effect sizes (beta, SE, p-value, EAF) for a specific chromosomal window often must download entire multi-gigabyte summary statistics files. This Skill performs a single tabix byte-range fetch against the NHGRI-EBI GWAS Catalog harmonised collection, returning only the variants in the requested region for one GCST study accession.

Core Features & Use Cases

  • Tabix range fetch over FTP: Streams only the bytes covering the requested chromosome window from the harmonised <GCST>.h.tsv.gz file using pysam, avoiding full-file downloads.
  • Canonical harmonised output: Maps hm_* columns to a locuscompare-schema TSV (variant_id, chromosome, position, ref, alt, beta, se, p, eaf) with ALT as the effect allele on GRCh38 forward strand.
  • Provenance manifest and report: Writes manifest.yaml with accession, source URL, fetch timestamp, and variant count, plus a human-readable report.md.
  • Use Case: For colocalisation at the SORT1 locus, fetch GCST90269602 (cholesterol in medium VLDL) at chr1:108774968-109774968 and feed the resulting variants.tsv directly into coloc, fine-mapping, or Mendelian randomisation tooling.

Quick Start

Run the bundled demo by asking the agent to fetch the SORT1 cholesterol-VLDL GWAS region with gwas-catalog-region-fetch using --demo and an output directory.

Frequently Asked Questions about gwas-catalog-region-fetch

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

FAQPage Schema
How do I fetch GWAS summary statistics for a specific genomic region?

Provide a GWAS Catalog accession (GCST id), chromosome, and 1-based GRCh38 start/end coordinates. The skill performs a tabix byte-range fetch against the harmonised file on the EBI FTP server and returns per-variant rows with beta, SE, p-value, and effect allele frequency.

What is the difference between harmonised and raw GWAS Catalog files?

Harmonised files under the harmonised/ subdirectory are forward-strand-aligned to GRCh38 with consistent allele orientation via hm_* columns. Raw uploads may be on GRCh37 with study-specific conventions. This skill only fetches the harmonised path.

Does this skill work for single-variant GWAS lookups?

No, single-variant point lookups are out of scope; use a database-lookup or gwas-lookup skill instead. This skill fetches all variants within a chromosomal window from one study, intended for colocalisation, fine-mapping, or Mendelian randomisation inputs.

Why are some variants missing from the harmonised GWAS file?

The harmoniser drops palindromic A/T and G/C SNPs with effect allele frequency near 0.5 because they cannot be reliably oriented across studies. Some studies also lack deposited summary statistics entirely; check the hasSummaryStats flag in the GWAS Catalog API first.

Can I compare beta values across different GWAS studies directly?

No, beta is reported on the ALT allele per study, so cross-study comparison requires explicit effect-allele harmonisation such as TwoSampleMR's harmonise_data. Sign-flip risk is real for swapped alleles and palindromic variants.