Discover genes associated with diseases and traits using genome-wide association studies (GWAS)
# Install ToolUniverse
pip install tooluniverse
# No API keys required - all GWAS tools are public!from python_implementation import discover_gwas_genes
# Discover genes associated with type 2 diabetes
results = discover_gwas_genes("type 2 diabetes", max_results=10)
for gene in results:
print(f"{gene.symbol:10s} {gene.confidence_level:8s} "
f"p={gene.min_p_value:.2e} studies={gene.evidence_count}")Output:
NYAP1 Medium p=1.00e-300 studies=2
CPS1 Medium p=1.00e-300 studies=4
UGT1A8 High p=1.00e-300 studies=4
FADS1 High p=1.00e-300 studies=4
UGT1A9 High p=1.00e-300 studies=4
...
This skill answers: "What genes are associated with [disease/trait]?"
It:
- Searches GWAS Catalog for genome-wide significant associations (p < 5e-8)
- Aggregates evidence across multiple independent studies
- Ranks genes by statistical significance and replication
- Optionally enriches with fine-mapping data (L2G scores) from Open Targets
- Returns ranked list with confidence levels
- Drug Target Discovery: Find genes with strong genetic evidence for disease
- Clinical Research: Identify genetic risk factors for complex diseases
- Functional Genomics: Map disease variants to candidate genes
- Comparative Analysis: Find genes shared across related diseases
- SKILL.md - Complete skill documentation (workflow, parameters, best practices)
- QUICK_START.md - 5-minute quick start with examples
- SKILL_TESTING_REPORT.md - Comprehensive test results (100% pass)
- SKILL_CREATION_SUMMARY.md - Development process summary
from python_implementation import discover_gwas_genes
genes = discover_gwas_genes("coronary artery disease")
print(f"Found {len(genes)} genes")targets = discover_gwas_genes(
trait="type 2 diabetes",
disease_ontology_id="MONDO_0005148",
p_value_threshold=5e-10, # Stricter threshold
min_evidence_count=3, # Multiple studies
use_fine_mapping=True # Include L2G scores
)
for gene in targets[:10]:
if gene.confidence_level == "High":
print(f"{gene.symbol}: L2G={gene.l2g_score}, "
f"{gene.evidence_count} studies")from tooluniverse.tools import gwas_get_snp_by_id, OpenTargets_get_variant_info
# Get SNP details
snp = gwas_get_snp_by_id(rs_id="rs7903146")
print(f"SNP {snp['rs_id']} mapped to genes: {snp['mapped_genes']}")
# Get variant annotation
variant = OpenTargets_get_variant_info(variantId="10_112998590_C_T")
print(f"Consequence: {variant['data']['variant']['mostSevereConsequence']['label']}")See QUICK_START.md for 5 complete examples.
- ✓ No API keys required (all public data)
- ✓ Integrates GWAS Catalog + Open Targets Genetics
- ✓ Automatic evidence aggregation across studies
- ✓ Fine-mapping (L2G) predictions for causal genes
- ✓ Confidence level classification
- ✓ Handles 500,000+ GWAS associations
- ✓ 100% test coverage
# Run tool tests
python test_gwas_tools.py
# Run comprehensive tests
python test_skill_comprehensive.pyResult: ✓ 10/10 tests passing (100%)
See SKILL_TESTING_REPORT.md for detailed results.
- gwas_get_associations_for_trait
- gwas_search_snps
- gwas_get_snp_by_id
- gwas_get_study_by_id
- gwas_search_studies
- ...and 6 more
- OpenTargets_search_gwas_studies_by_disease
- OpenTargets_get_study_credible_sets
- OpenTargets_get_variant_credible_sets
- OpenTargets_get_variant_info
- OpenTargets_get_gwas_study
- OpenTargets_get_credible_set_detail
All tools tested and working ✓
- oneOf Validation Bug: Some tools require
validate=Falseparameter (documented) - Text Search Ambiguity: Use disease ontology IDs for precise matching
- P-Value Underflow: Very significant associations reported as p=0.0
- Incomplete L2G Coverage: Fine-mapping not available for all studies
See SKILL.md for details and workarounds.
Add to Claude Desktop config:
{
"mcpServers": {
"tooluniverse": {
"command": "uvx",
"args": ["tooluniverse-mcp"]
}
}
}Then ask: "What genes are associated with Alzheimer's disease?"
See QUICK_START.md for MCP examples.
- Basic discovery: 5-10 seconds
- With fine-mapping: 15-30 seconds
- Data coverage: 500,000+ GWAS associations
- Update frequency: Weekly (GWAS Catalog), Quarterly (Open Targets)
-
GWAS Catalog - EBI/NHGRI curated GWAS catalog
- URL: https://www.ebi.ac.uk/gwas/
- Coverage: 100,000+ publications, 500,000+ associations
-
Open Targets Genetics - Fine-mapped GWAS with L2G predictions
- URL: https://genetics.opentargets.org/
- Coverage: Fine-mapping, credible sets, QTL colocalization
Buniello A, et al. (2019) The NHGRI-EBI GWAS Catalog of published genome-wide
association studies. Nucleic Acids Research, 47(D1):D1005-D1012.
Mountjoy E, et al. (2021) An open approach to systematically prioritize causal
variants and genes at all published human GWAS trait-associated loci.
Nature Genetics, 53:1527-1533.
skills/tooluniverse-gwas-trait-to-gene/
├── README.md # This file
├── SKILL.md # Complete documentation
├── QUICK_START.md # Quick start guide
├── python_implementation.py # Core implementation
├── test_gwas_tools.py # Tool validation tests
├── test_skill_comprehensive.py # Comprehensive tests
├── SKILL_TESTING_REPORT.md # Test results
└── SKILL_CREATION_SUMMARY.md # Creation summary
"type_2_diabetes": "MONDO_0005148"
"alzheimer_disease": "MONDO_0004975"
"coronary_artery_disease": "MONDO_0005010"
"breast_cancer": "MONDO_0007254"
"schizophrenia": "MONDO_0005090"
"rheumatoid_arthritis": "MONDO_0008383"
"asthma": "MONDO_0004979"Find more at: https://www.ebi.ac.uk/ols/ontologies/mondo
- Documentation: Start with QUICK_START.md
- Issues: Check SKILL_TESTING_REPORT.md
- GWAS data: https://www.ebi.ac.uk/gwas/docs
- Open Targets: https://genetics-docs.opentargets.org/
MIT License - see LICENSE file for details
✓ Production Ready
- 100% test pass rate
- Complete documentation
- Working examples
- Known issues documented
Created: 2026-02-13