gwas-catalog-skill

Query the GWAS Catalog REST API v2 for studies, associations, SNPs, and traits.

5.3k|765|Updated Mar 4, 2026
One-click install
npx skills add https://github.com/openai/plugins --skill gwas-catalog-skill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gwas-catalog-skill
Source: https://github.com/openai/plugins/tree/main/plugins/life-science-research/skills/gwas-catalog-skill
Command: npx skills add https://github.com/openai/plugins --skill gwas-catalog-skill

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires requests, and includes scripts (resource) components.

What problem does it solve?

Researchers need quick, compact access to GWAS Catalog data without writing custom API clients or parsing verbose HATEOAS responses by hand.

Core Features & Use Cases

  • Compact REST Queries: Submit GET/POST requests to GWAS Catalog REST API v2 endpoints including studies, associations, SNPs, EFO traits, genes, publications, and loci.
  • Automatic Record Extraction: Target _embedded resource lists via record_path and receive truncated, depth-limited JSON summaries instead of raw payloads.
  • Raw Payload Archival: Optionally save full responses with pagination links to disk using save_raw for downstream analysis.
  • Use Case: Ask for GWAS studies related to asthma and receive a concise markdown summary of the top 10 matching studies with accession IDs and traits.

Quick Start

Ask the assistant to fetch GWAS Catalog studies for the trait asthma and summarize the top results.

Frequently Asked Questions about gwas-catalog-skill

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

FAQPage Schema
How do I query the GWAS Catalog API for studies by trait?

Send a JSON request with path "studies" and params like {"efo_trait": "asthma", "size": 10}, plus record_path "_embedded.studies". The script returns up to max_items compact study records from the GWAS Catalog REST API v2.

What GWAS Catalog endpoints can I access with this REST client?

Supported paths include metadata, studies, studies/<accession>, associations, snps, efoTraits, genes, publications, and loci. Both collection endpoints and single-resource lookups are handled through the same JSON stdin interface.

How do I get associations for a specific gene like BRCA1?

Use path "associations" with params {"mapped_gene": "BRCA1", "size": 10} and record_path "_embedded.associations". The response contains compact association records limited by max_items.

Can I save the full GWAS Catalog API response including pagination links?

Yes, set save_raw to true in the request JSON. The complete HATEOAS payload is written to raw_output_path (or a default /tmp file), while the stdout output stays compact.

Why does the GWAS API request return an invalid_input error?

The script validates that base_url and path are non-empty strings, method is GET or POST, and numeric fields like max_items are positive integers. Providing only one of json_body or form_body is also required.

What Python dependency does the GWAS REST client require?

The script requires the requests library for HTTP calls. If requests is not installed, it returns a missing_dependency error instead of executing the query.