Queries the NHGRI-EBI GWAS Catalog REST API v2 for SNP-trait associations by rs ID, disease/trait (EFO/MONDO), gene, or study (GCST), returning p-values, effect sizes, ancestry, and FTP links to harmonised summary statistics.
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/query_gwas.py — query the GWAS Catalog REST API (stdlib only, JSON to stdout):
python scripts/query_gwas.py variant rs7903146 # associations for a SNP (strongest first)
python scripts/query_gwas.py trait MONDO_0005148 --size 100 # associations for a trait
python scripts/query_gwas.py gene TCF7L2 # associations mapped to a gene
python scripts/query_gwas.py find-trait "type 2 diabetes" # free text -> efo_id
python scripts/query_gwas.py study GCST001795 # study metadata (+ summary-stats FTP link)
Use this skill for:
| Scenario | Use Instead |
|---|---|
| Target-disease association scores, L2G / colocalisation evidence for drug targets | alterlab-opentargets |
| Clinical pathogenicity of a variant (ACMG/AMP, review stars) | alterlab-clinvar |
| Population allele frequencies or gene constraint | alterlab-gnomad |
| Which gene/tissue a variant regulates (eQTL/sQTL) | alterlab-gtex |
| Variant consequence (VEP), coordinates, gene models | alterlab-ensembl |
Hand-off rule. When the request matches a row above, open your answer by naming that skill by its exact id (for example alterlab-opentargets) and saying in one line why it fits better, then stop applying this skill's procedure. Name it even when you also need to ask for missing input. If only part of the request is out of scope, name the skill for that part and do only the in-scope part. A brief general pointer is fine; the named skill does the work.
Four core entities, each with a canonical identifier:
GCST accessions (e.g., GCST001234)rs numbers (e.g., rs7903146)efo_id (e.g., MONDO_0005148 = type 2 diabetes mellitus); genes use HGNC symbols (e.g., TCF7L2)Trait-ID gotcha (verified 2026-09): many traits have been re-mapped to MONDO / current EFO short-forms, and a stale ID returns an empty page rather than an error —
associations?efo_id=EFO_0001360(legacy type 2 diabetes) gives 0 rows whileefo_id=MONDO_0005148gives thousands. Resolve free text first withGET /v2/efo-traits?efo_trait=type 2 diabetesand use the returnedefo_id. Older papers and pipelines may still cite the legacy EFO ID.
https://www.ebi.ac.uk/gwas/rest/api/v2 — curated top associations, studies, SNPs, traits, genes, publications. Free, no key; throttled at 15 requests/second; default page size 20 (keep size ≤ 200 — larger pages time out). Interactive reference: https://www.ebi.ac.uk/gwas/rest/api/v2/docs/gwas/rest/api/singleNucleotidePolymorphisms/..., /efoTraits/..., camelCase fields) is deprecated and was scheduled for retirement by May 2026; it may still answer, but don't write new code against it./gwas/summary-statistics/api) is retired (HTTP 410); full summary statistics are served from the FTP site (see workflow step 6). EBI describes a replacement API as "coming soon".Core v2 endpoints: /v2/associations (filters rs_id, efo_id, efo_trait, mapped_gene, accession_id, pubmed_id; sort=p_value&direction=asc), /v2/studies and /v2/studies/{accession_id}, /v2/single-nucleotide-polymorphisms (by rs_id, mapped_gene, or chromosome + bp_start/bp_end), /v2/efo-traits, /v2/genes/{gene_name}. Responses are HAL+JSON with snake_case fields: results under _embedded.<resource> (associations, studies, snps, efo_traits), paging under page (totalElements, totalPages, number), next pages in _links.next.
efo_id (trait; resolve free text via /v2/efo-traits?efo_trait=), rs ID (variant), GCST (study), or HGNC symbol (gene).page/size or follow _links.next.snp_allele[]), effect sizes (or_per_copy_num or the beta text), p-values. p_value underflows to 0.0 for very strong signals (rs7903146 in type 2 diabetes reaches 3×10⁻¹³¹⁵), so rank and report with pvalue_mantissa / pvalue_exponent./v2/studies?efo_id=...&full_pvalue_set=true; each study's full_summary_stats field gives its FTP directory. Harmonised files live at https://ftp.ebi.ac.uk/pub/databases/gwas/summary_statistics/GCST<range>/<GCST>/harmonised/<GCST>.h.tsv.gz (GWAS-SSF columns, tabix-indexed .tbi), so a region can be pulled remotely with tabix <url> 10:112900000-113200000 instead of downloading the whole file. Don't scrape the association endpoints for this — they hold only curated top hits.references/query_examples.md.references/query_workflows.md.references/data_fields_and_best_practices.md.references/api_reference.md.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.When using GWAS Catalog data, cite:
Sollis E, et al. (2023) The NHGRI-EBI GWAS Catalog: knowledgebase and deposition resource. Nucleic Acids Research 51:D977-D985. PMID: 36350656. DOI: 10.1093/nar/gkac1010
Include access date and version when available; cite original studies when discussing specific findings.
Website: https://www.ebi.ac.uk/gwas/
Documentation: https://www.ebi.ac.uk/gwas/docs
API v2 docs: https://www.ebi.ac.uk/gwas/rest/api/v2/docs (OpenAPI: https://www.ebi.ac.uk/gwas/rest/api/v2/rest-api-doc.yaml)
Summary statistics access: https://www.ebi.ac.uk/gwas/docs/methods/summary-statistics
Training materials: https://github.com/EBISPOT/GWAS_Catalog-workshop (Jupyter notebooks, Colab)
PGS Catalog (polygenic scores): https://www.pgscatalog.org/
Help and support: [email protected]
What SKILL.md sets; muted values are Claude Code's defaults
Not loaded · from alterlab-writing-tools
Claude Code won't load this skill
It ships in alterlab-writing-tools at skills/, but Claude Code only loads skills/<name>/SKILL.md and folders listed under skills in plugin.json. Installing the plugin doesn't add it.
Generated from the plugin's indexed repository (alterlab-ieu/alterlab-academic-skills) — no native marketplace selected
npx claudepluginhub p/alterlab-ieu-alterlab-writing-tools241 skills in this plugin
/alterlab-abm-mesaBuilds agent-based models of social systems with Mesa 3 — the current AgentSet API (model.agents.shuffle_do('step'), auto-assigned unique_id, mandatory super().__init__(rng=...)), cell spaces (mesa.discrete_space OrthogonalMooreGrid / classic mesa.space grids), the DataCollector, batch_run parameter sweeps, and SolaraViz — for emergence, segregation, diffusion, opinion dynamics, and cooperation models. It uses the Mesa 3.x API (the old mesa.time schedulers like RandomActivation are removed) and treats the model as a generative theory to be validated, not just run. Use when the request mentions an agent-based model, Mesa, simulating interacting agents, or emergent macro behavior from micro rules. For discrete-event (queueing/process) simulation prefer alterlab-simpy; for reinforcement learning prefer alterlab-stable-baselines3. Part of the AlterLab Academic Skills suite./alterlab-academic-careerPrepares academic career documents and professional-development materials for faculty and researchers. Use when drafting academic CVs, research statements, teaching philosophies, diversity statements, faculty-position cover letters, tenure dossiers, promotion narratives, academic portfolios, or mentorship statements, and when planning conference-networking strategy, building academic web presence, setting up ORCID profiles, or understanding impact metrics. Part of the AlterLab Academic Skills suite.2 plugins in one repository ship this exact skill · first indexed Nov 9, 2026
Other plugins' skills for the same job