davila7/claude-code-templates/gwas-database
Claude Code and agent skill by davila7/claude-code-templates
- community
Checking that the SKILL.md file is still in the repository.
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
npx vskill@latest install davila7/claude-code-templates/gwas-databaseSKILL.md
The same SKILL.md was published earlier as davila7/claude-code-templates/gwas-database.
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:
GCSTIDs (e.g., GCST001234) - Variant IDs:
rsnumbers (e.g., rs7903146) orvariant_idformat - 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):
Returns all trait associations for this SNP.
By Disease/Trait:
Returns all associated genetic variants.
By Gene:
Returns variants in or near the gene region.
By Chromosomal Region:
Returns variants in the specified genomic interval.
By Publication:
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:
- Main API docs: https://www.ebi.ac.uk/gwas/rest/docs/api
- Summary stats docs: https://www.ebi.ac.uk/gwas/summary-statistics/docs/
Core Endpoints:
- Studies endpoint -
/studies/{accessionID}
```python 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() ```
- Associations endpoint -
/associations
``python # 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() ``
- Variants endpoint -
/singleNucleotidePolymorphisms/{rsID}
``python # 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() ``
- Traits endpoint -
/efoTraits/{efoID}
``python # 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
Example 2: Get variant information and all trait associations
Example 3: Access summary statistics
Example 4: Query by chromosomal region
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:
- FTP download: http://ftp.ebi.ac.uk/pub/databases/gwas/summary_statistics/
- REST API: Query-based access to summary statistics
- 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
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:
Query Workflows
Workflow 1: Exploring Genetic Associations for a Disease
- 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)
- Query associations via API:
``python url = f"https://www.ebi.ac.uk/gwas/rest/api/efoTraits/{efo_id}/associations" ``
- 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
- Extract variant details:
- rs IDs for each association
- Effect alleles and directions
- Effect sizes (odds ratios, beta coefficients)
- Population allele frequencies
- Cross-reference with other databases:
- Look up variant consequences in Ensembl
- Check population frequencies in gnomAD
- Explore gene function and pathways
Workflow 2: Investigating a Specific Genetic Variant
- Query the variant:
``python url = f"https://www.ebi.ac.uk/gwas/rest/api/singleNucleotidePolymorphisms/{rs_id}" ``
- Retrieve all trait associations:
``python url = f"https://www.ebi.ac.uk/gwas/rest/api/singleNucleotidePolymorphisms/{rs_id}/associations" ``
- Analyze pleiotropy:
- Identify all traits associated with this variant
- Review effect directions across traits
- Look for shared biological pathways
- Check genomic context:
- Determine nearby genes
- Identify if variant is in coding/regulatory regions
- Review linkage disequilibrium with other variants
Workflow 3: Gene-Centric Association Analysis
- Search by gene symbol in web interface or:
``python url = f"https://www.ebi.ac.uk/gwas/rest/api/singleNucleotidePolymorphisms/search/findByGene" params = {"geneName": gene_symbol} ``
- Retrieve variants in gene region:
- Get chromosomal coordinates for gene
- Query variants in region
- Include promoter and regulatory regions (extend boundaries)
- Analyze association patterns:
- Identify traits associated with variants in this gene
- Look for consistent associations across studies
- Review effect sizes and directions
- Functional interpretation:
- Determine variant consequences (missense, regulatory, etc.)
- Check expression QTL (eQTL) data
- Review pathway and network context
Workflow 4: Systematic Review of Genetic Evidence
- Define research question:
- Specific trait or disease of interest
- Population considerations
- Study design requirements
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 93 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingcli-tool/components/skills/scientific/gwas-database/SKILL.md
Popularity
- Repository stars
- 27,781
- Repository forks
- 2,869
- Repository npm downloads, 7 days
- 4,235
- 7-day trend score
- 71
Stars and forks are for the whole GitHub repository, not this skill alone. Downloads are for the repository's npm package. Refreshed 4 Oct 2026, a month ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/davila7/claude-code-templates/gwas-database)