Alterlab Gwas logo

Alterlab Gwas

Organization
NVlabs
alterlab-gwas

Query the NHGRI-EBI GWAS Catalog REST API for SNP-trait associations, retrieving variants by rs ID, disease/trait, or gene along with p-values and summary statistics. Use when investigating genome-wide association study hits, mapping a SNP or rsID to traits, building polygenic risk scores, or doing genetic epidemiology lookups. Part of the AlterLab Academic Skills suite.

Overview

PublisherNVlabs
RepositorySkill2Env
Skill namealterlab-gwas
Stars
189
Forks
18
Bundled files
6
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 6 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by NVlabs on GitHub. Read the source before you install it.

Installation

Install the Alterlab Gwas AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/NVlabs/Skill2Env/tree/main/SkillHub/skills/alterlab-gwas
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/NVlabs/Skill2Env.git /tmp/Skill2Env
mkdir -p .claude/skills
cp -r /tmp/Skill2Env/SkillHub/skills/alterlab-gwas .claude/skills/alterlab-gwas
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Alterlab Gwas in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Alterlab Gwas on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Alterlab Gwas is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

GWAS Catalog Database

Overview

The GWAS Catalog is a curated repository of published genome-wide association studies maintained by NHGRI and EBI. It contains SNP-trait associations from thousands of GWAS publications — genetic variants, associated traits and diseases, p-values, effect sizes, and full summary statistics for many studies.

Scripts

scripts/query_gwas.py — query the GWAS Catalog REST API (stdlib only, JSON to stdout):

bash
python scripts/query_gwas.py variant rs7903146           # associations for a SNP
python scripts/query_gwas.py trait MONDO_0005148 --size 100  # associations for a trait
python scripts/query_gwas.py study GCST001795            # study metadata

When to Use This Skill

Use this skill for:

  • Genetic variant associations — SNPs associated with diseases or traits
  • SNP lookups — information about specific variants (rs IDs)
  • Trait/disease searches — genetic associations for phenotypes
  • Gene associations — variants in or near specific genes
  • GWAS summary statistics — complete genome-wide association data
  • Study metadata — publication and cohort information
  • Population genetics — ancestry-specific associations
  • Polygenic risk scores — variants for risk prediction models
  • Functional genomics / systematic reviews — variant effects, literature synthesis

Data Model

Four core entities, each with a canonical identifier:

  • Studies → GCST accessions (e.g., GCST001234)
  • Associations → SNP-trait links with p-values (genome-wide significant: p ≤ 5×10⁻⁸)
  • Variants → rs numbers (e.g., rs7903146)
  • Traits → trait ontology short-forms (e.g., MONDO_0005148 = type 2 diabetes on the main REST API); genes use HGNC symbols (e.g., TCF7L2)

Trait-ID gotcha (verified): the two APIs disagree on trait IDs. The main REST API has migrated many traits to MONDO / current EFO short-forms, so efoTraits/MONDO_0005148 works but the legacy efoTraits/EFO_0001360 now 404s. The Summary Statistics API still uses the legacy ID: traits/EFO_0001360 works there but traits/MONDO_0005148 404s. If a trait path 404s, look up the current short-form with /efoTraits/search/findByTrait?trait=... (main API) before assuming the trait is absent.

APIs

Two free, no-key REST APIs:

  • GWAS Catalog API: https://www.ebi.ac.uk/gwas/rest/api (curated associations, studies, variants, traits)
  • Summary Statistics API: https://www.ebi.ac.uk/gwas/summary-statistics/api (all tested variants, not just significant hits)

Core endpoints: /studies/{GCST}, /efoTraits/{efoID}/associations, /singleNucleotidePolymorphisms/{rsID} and /{rsID}/associations. Responses are HAL+JSON with _embedded results, _links for related resources, and pagination (page, size).

Core Workflow

  1. Identify the entity — get the EFO ID (trait), rs ID (variant), GCST (study), or HGNC symbol (gene). Use the web interface for free-text → EFO mapping.
  2. Query the matching endpoint — trait/variant/study/region; iterate pages via page/size.
  3. Filter — by p-value (≤ 5×10⁻⁸ for genome-wide significance), ancestry, sample size, discovery/replication status.
  4. Extract — rs IDs, effect alleles/directions, effect sizes (OR or beta), p-values.
  5. Cross-reference — Ensembl (consequences), gnomAD (frequencies), Open Targets, PGS Catalog.
  6. For genome-wide analyses — pull full summary statistics via the Summary Statistics API or FTP rather than scraping the association endpoints.

Routing Guidance

  • Writing API calls / want copy-paste code (endpoints, the four worked examples, summary-stats access, cross-referencing, full paginated Python helper) → references/query_examples.md.
  • Following a multi-step task (disease-, variant-, gene-centric, systematic review, summary-stats analysis) or web-interface search syntax → references/query_workflows.md.
  • Need response field names, pagination details, or best-practice / data-quality guidance → references/data_fields_and_best_practices.md.
  • Deep endpoint specs, all query params, error handling, advanced filtering → references/api_reference.md.

Reference Index

  • references/query_examples.md — REST endpoint code, four canonical query examples (disease, variant, summary stats, chromosomal region), summary-statistics access, cross-referencing, and a complete paginated Python integration returning a DataFrame.
  • references/query_workflows.md — Five step-by-step query workflows (disease, variant, gene, systematic review, summary statistics) plus web-interface search modes.
  • references/data_fields_and_best_practices.md — Association/study response fields, pagination, query and interpretation best practices, rate-limiting ethics, and data-quality considerations.
  • references/api_reference.md — Comprehensive endpoint specifications, query parameters/filters, response formats, error handling, and integration with external databases.

Citation and Resources

When using GWAS Catalog data, cite:

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Alterlab Gwas AI skill do?

Query the NHGRI-EBI GWAS Catalog REST API for SNP-trait associations, retrieving variants by rs ID, disease/trait, or gene along with p-values and summary statistics. Use when investigating genome-wide association study hits, mapping a SNP or rsID to traits, building polygenic risk scores, or doing genetic epidemiology lookups. Part of the AlterLab Academic Skills suite.

Why use Alterlab Gwas on TypingMind?

Because you install it once and use it with any model. Alterlab Gwas is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Alterlab Gwas in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/NVlabs/Skill2Env/tree/main/SkillHub/skills/alterlab-gwas. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Alterlab Gwas?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Alterlab Gwas?

As many as you like. As long as a model supports skills, you can use Alterlab Gwas with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Alterlab Gwas AI skill free?

Yes. It is published on GitHub by NVlabs under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇