gwas-database

2
0
Source

Query NHGRI-EBI GWAS Catalog for SNP-trait associations. Search variants by rs ID, disease/trait, gene, retrieve p-values and summary statistics, for genetic epidemiology and polygenic risk scores.

Install

mkdir -p .claude/skills/gwas-database && curl -L -o skill.zip "https://mcp.directory/api/skills/download/2629" && unzip -o skill.zip -d .claude/skills/gwas-database && rm skill.zip

Installs to .claude/skills/gwas-database

About this skill

GWAS Catalog Database

Overview

The GWAS Catalog is a comprehensive repository of published genome-wide association studies maintained by the National Human Genome Research Institute (NHGRI) and the European Bioinformatics Institute (EBI). The catalog contains curated SNP-trait associations from thousands of GWAS publications, including genetic variants, associated traits and diseases, p-values, effect sizes, and full summary statistics for many studies.

When to Use This Skill

This skill should be used when queries involve:

  • Genetic variant associations: Finding SNPs associated with diseases or traits
  • SNP lookups: Retrieving information about specific genetic variants (rs IDs)
  • Trait/disease searches: Discovering genetic associations for phenotypes
  • Gene associations: Finding variants in or near specific genes
  • GWAS summary statistics: Accessing complete genome-wide association data
  • Study metadata: Retrieving publication and cohort information
  • Population genetics: Exploring ancestry-specific associations
  • Polygenic risk scores: Identifying variants for risk prediction models
  • Functional genomics: Understanding variant effects and genomic context
  • Systematic reviews: Comprehensive literature synthesis of genetic associations

Core Capabilities

1. Understanding GWAS Catalog Data Structure

The GWAS Catalog is organized around four core entities:

  • Studies: GWAS publications with metadata (PMID, author, cohort details)
  • Associations: SNP-trait associations with statistical evidence (p ≤ 5×10⁻⁸)
  • Variants: Genetic markers (SNPs) with genomic coordinates and alleles
  • Traits: Phenotypes and diseases (mapped to EFO ontology terms)

Key Identifiers:

  • Study accessions: GCST IDs (e.g., GCST001234)
  • Variant IDs: rs numbers (e.g., rs7903146) or variant_id format
  • Trait IDs: EFO terms (e.g., EFO_0001360 for type 2 diabetes)
  • Gene symbols: HGNC approved names (e.g., TCF7L2)

2. Web Interface Searches

The web interface at https://www.ebi.ac.uk/gwas/ supports multiple search modes:

By Variant (rs ID):

rs7903146

Returns all trait associations for this SNP.

By Disease/Trait:

type 2 diabetes
Parkinson disease
body mass index

Returns all associated genetic variants.

By Gene:

APOE
TCF7L2

Returns variants in or near the gene region.

By Chromosomal Region:

10:114000000-115000000

Returns variants in the specified genomic interval.

By Publication:

PMID:20581827
Author: McCarthy MI
GCST001234

Returns study details and all reported associations.

3. REST API Access

The GWAS Catalog provides two REST APIs for programmatic access:

Base URLs:

  • GWAS Catalog API: https://www.ebi.ac.uk/gwas/rest/api
  • Summary Statistics API: https://www.ebi.ac.uk/gwas/summary-statistics/api

API Documentation:

Core Endpoints:

  1. Studies endpoint - /studies/{accessionID}

    import requests
    
    # Get a specific study
    url = "https://www.ebi.ac.uk/gwas/rest/api/studies/GCST001795"
    response = requests.get(url, headers={"Content-Type": "application/json"})
    study = response.json()
    
  2. Associations endpoint - /associations

    # Find associations for a variant
    variant = "rs7903146"
    url = f"https://www.ebi.ac.uk/gwas/rest/api/singleNucleotidePolymorphisms/{variant}/associations"
    params = {"projection": "associationBySnp"}
    response = requests.get(url, params=params, headers={"Content-Type": "application/json"})
    associations = response.json()
    
  3. Variants endpoint - /singleNucleotidePolymorphisms/{rsID}

    # Get variant details
    url = "https://www.ebi.ac.uk/gwas/rest/api/singleNucleotidePolymorphisms/rs7903146"
    response = requests.get(url, headers={"Content-Type": "application/json"})
    variant_info = response.json()
    
  4. Traits endpoint - /efoTraits/{efoID}

    # Get trait information
    url = "https://www.ebi.ac.uk/gwas/rest/api/efoTraits/EFO_0001360"
    response = requests.get(url, headers={"Content-Type": "application/json"})
    trait_info = response.json()
    

4. Query Examples and Patterns

Example 1: Find all associations for a disease

import requests

trait = "EFO_0001360"  # Type 2 diabetes
base_url = "https://www.ebi.ac.uk/gwas/rest/api"

# Query associations for this trait
url = f"{base_url}/efoTraits/{trait}/associations"
response = requests.get(url, headers={"Content-Type": "application/json"})
associations = response.json()

# Process results
for assoc in associations.get('_embedded', {}).get('associations', []):
    variant = assoc.get('rsId')
    pvalue = assoc.get('pvalue')
    risk_allele = assoc.get('strongestAllele')
    print(f"{variant}: p={pvalue}, risk allele={risk_allele}")

Example 2: Get variant information and all trait associations

import requests

variant = "rs7903146"
base_url = "https://www.ebi.ac.uk/gwas/rest/api"

# Get variant details
url = f"{base_url}/singleNucleotidePolymorphisms/{variant}"
response = requests.get(url, headers={"Content-Type": "application/json"})
variant_data = response.json()

# Get all associations for this variant
url = f"{base_url}/singleNucleotidePolymorphisms/{variant}/associations"
params = {"projection": "associationBySnp"}
response = requests.get(url, params=params, headers={"Content-Type": "application/json"})
associations = response.json()

# Extract trait names and p-values
for assoc in associations.get('_embedded', {}).get('associations', []):
    trait = assoc.get('efoTrait')
    pvalue = assoc.get('pvalue')
    print(f"Trait: {trait}, p-value: {pvalue}")

Example 3: Access summary statistics

import requests

# Query summary statistics API
base_url = "https://www.ebi.ac.uk/gwas/summary-statistics/api"

# Find associations by trait with p-value threshold
trait = "EFO_0001360"  # Type 2 diabetes
p_upper = "0.000000001"  # p < 1e-9
url = f"{base_url}/traits/{trait}/associations"
params = {
    "p_upper": p_upper,
    "size": 100  # Number of results
}
response = requests.get(url, params=params)
results = response.json()

# Process genome-wide significant hits
for hit in results.get('_embedded', {}).get('associations', []):
    variant_id = hit.get('variant_id')
    chromosome = hit.get('chromosome')
    position = hit.get('base_pair_location')
    pvalue = hit.get('p_value')
    print(f"{chromosome}:{position} ({variant_id}): p={pvalue}")

Example 4: Query by chromosomal region

import requests

# Find variants in a specific genomic region
chromosome = "10"
start_pos = 114000000
end_pos = 115000000

base_url = "https://www.ebi.ac.uk/gwas/rest/api"
url = f"{base_url}/singleNucleotidePolymorphisms/search/findByChromBpLocationRange"
params = {
    "chrom": chromosome,
    "bpStart": start_pos,
    "bpEnd": end_pos
}
response = requests.get(url, params=params, headers={"Content-Type": "application/json"})
variants_in_region = response.json()

5. Working with Summary Statistics

The GWAS Catalog hosts full summary statistics for many studies, providing access to all tested variants (not just genome-wide significant hits).

Access Methods:

  1. FTP download: http://ftp.ebi.ac.uk/pub/databases/gwas/summary_statistics/
  2. REST API: Query-based access to summary statistics
  3. Web interface: Browse and download via the website

Summary Statistics API Features:

  • Filter by chromosome, position, p-value
  • Query specific variants across studies
  • Retrieve effect sizes and allele frequencies
  • Access harmonized and standardized data

Example: Download summary statistics for a study

import requests
import gzip

# Get available summary statistics
base_url = "https://www.ebi.ac.uk/gwas/summary-statistics/api"
url = f"{base_url}/studies/GCST001234"
response = requests.get(url)
study_info = response.json()

# Download link is provided in the response
# Alternatively, use FTP:
# ftp://ftp.ebi.ac.uk/pub/databases/gwas/summary_statistics/GCSTXXXXXX/

6. Data Integration and Cross-referencing

The GWAS Catalog provides links to external resources:

Genomic Databases:

  • Ensembl: Gene annotations and variant consequences
  • dbSNP: Variant identifiers and population frequencies
  • gnomAD: Population allele frequencies

Functional Resources:

  • Open Targets: Target-disease associations
  • PGS Catalog: Polygenic risk scores
  • UCSC Genome Browser: Genomic context

Phenotype Resources:

  • EFO (Experimental Factor Ontology): Standardized trait terms
  • OMIM: Disease gene relationships
  • Disease Ontology: Disease hierarchies

Following Links in API Responses:

import requests

# API responses include _links for related resources
response = requests.get("https://www.ebi.ac.uk/gwas/rest/api/studies/GCST001234")
study = response.json()

# Follow link to associations
associations_url = study['_links']['associations']['href']
associations_response = requests.get(associations_url)

Query Workflows

Workflow 1: Exploring Genetic Associations for a Disease

  1. Identify the trait using EFO terms or free text:

    • Search web interface for disease name
    • Note the EFO ID (e.g., EFO_0001360 for type 2 diabetes)
  2. Query associations via API:

    url = f"https://www.ebi.ac.uk/gwas/rest/api/efoTraits/{efo_id}/associations"
    
  3. Filter by significance and population:

    • Check p-values (genome-wide significant: p ≤ 5×10⁻⁸)
    • Review ancestry information in study metadata
    • Filter by sample size or discovery/replication status
  4. Extract variant details:

    • rs IDs for each association
    • Effect alleles and directions
    • Effect sizes (odds ratios, beta coefficients)
    • Population allele frequencies

Content truncated.

literature-review

K-Dense-AI

Conduct comprehensive, systematic literature reviews using multiple academic databases (PubMed, arXiv, bioRxiv, Semantic Scholar, etc.). This skill should be used when conducting systematic literature reviews, meta-analyses, research synthesis, or comprehensive literature searches across biomedical, scientific, and technical domains. Creates professionally formatted markdown documents and PDFs with verified citations in multiple citation styles (APA, Nature, Vancouver, etc.).

293144

markitdown

K-Dense-AI

Convert various file formats (PDF, Office documents, images, audio, web content, structured data) to Markdown optimized for LLM processing. Use when converting documents to markdown, extracting text from PDFs/Office files, transcribing audio, performing OCR on images, extracting YouTube transcripts, or processing batches of files. Supports 20+ formats including DOCX, XLSX, PPTX, PDF, HTML, EPUB, CSV, JSON, images with OCR, and audio with transcription.

13741

scientific-writing

K-Dense-AI

Write scientific manuscripts. IMRAD structure, citations (APA/AMA/Vancouver), figures/tables, reporting guidelines (CONSORT/STROBE/PRISMA), abstracts, for research papers and journal submissions.

13426

reportlab

K-Dense-AI

"PDF generation toolkit. Create invoices, reports, certificates, forms, charts, tables, barcodes, QR codes, Canvas/Platypus APIs, for professional document automation."

968

matplotlib

K-Dense-AI

Foundational plotting library. Create line plots, scatter, bar, histograms, heatmaps, 3D, subplots, export PNG/PDF/SVG, for scientific visualization and publication figures.

947

drugbank-database

K-Dense-AI

Access and analyze comprehensive drug information from the DrugBank database including drug properties, interactions, targets, pathways, chemical structures, and pharmacology data. This skill should be used when working with pharmaceutical data, drug discovery research, pharmacology studies, drug-drug interaction analysis, target identification, chemical similarity searches, ADMET predictions, or any task requiring detailed drug and drug target information from DrugBank.

945

You might also like

flutter-development

aj-geddes

Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.

643969

drawio-diagrams-enhanced

jgtolentino

Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.

591705

ui-ux-pro-max

nextlevelbuilder

"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."

318398

godot

bfollington

This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.

339397

nano-banana-pro

garg-aayush

Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.

451339

fastapi-templates

wshobson

Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.

304231

Stay ahead of the MCP ecosystem

Get weekly updates on new skills and servers.