scientific-skills/Evidence Insights/gwas-database/SKILL.md
Query the NHGRI-EBI GWAS Catalog to retrieve SNP–trait associations, study metadata, and (when available) summary statistics when you need evidence for a variant, trait/disease, gene, or genomic region.
npx skillsauth add aipoch/medical-research-skills gwas-databaseInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill when you need to:
https://www.ebi.ac.uk/gwas/rest/apihttps://www.ebi.ac.uk/gwas/summary-statistics/apipage, size, and _links navigation).requests >= 2.31.0pandas >= 2.0.0 (optional; for tabular outputs)The following script is a complete, runnable example that:
import time
import requests
import pandas as pd
GWAS_REST_BASE = "https://www.ebi.ac.uk/gwas/rest/api"
def fetch_trait_associations(efo_id: str, page_size: int = 100, max_pages: int = 50):
"""
Fetch associations for a given EFO trait ID from the GWAS Catalog REST API.
Returns a list of association JSON objects.
"""
url = f"{GWAS_REST_BASE}/efoTraits/{efo_id}/associations"
headers = {"Accept": "application/json"}
all_assocs = []
for page in range(max_pages):
params = {"page": page, "size": page_size}
r = requests.get(url, params=params, headers=headers, timeout=60)
r.raise_for_status()
data = r.json()
assocs = data.get("_embedded", {}).get("associations", [])
if not assocs:
break
all_assocs.extend(assocs)
time.sleep(0.1) # be polite to the public API
return all_assocs
def to_table(assocs, p_threshold: float = 5e-8) -> pd.DataFrame:
rows = []
for a in assocs:
p = a.get("pvalue")
try:
p_float = float(p) if p is not None else None
except (TypeError, ValueError):
p_float = None
if p_float is None or p_float > p_threshold:
continue
rows.append({
"rsId": a.get("rsId"),
"trait": a.get("efoTrait") or a.get("mappedLabel"),
"pvalue": p_float,
"strongestAllele": a.get("strongestAllele"),
"orPerCopyNum": a.get("orPerCopyNum"),
"betaNum": a.get("betaNum"),
"pubmedId": a.get("pubmedId"),
"studyAccession": a.get("studyAccession"),
})
df = pd.DataFrame(rows).drop_duplicates()
if not df.empty:
df = df.sort_values("pvalue", ascending=True).reset_index(drop=True)
return df
if __name__ == "__main__":
# Example: Type 2 diabetes (EFO_0001360)
efo_id = "EFO_0001360"
assocs = fetch_trait_associations(efo_id)
df = to_table(assocs, p_threshold=5e-8)
print(df.head(20).to_string(index=False))
print(f"\nSignificant associations: {len(df)}")
if not df.empty:
print(f"Unique variants: {df['rsId'].nunique()}")
GCST... (e.g., GCST001234)rs... (e.g., rs7903146)EFO_0001360)APOE, TCF7L2)GET /studies/{GCST}GET /singleNucleotidePolymorphisms/{rsId}GET /singleNucleotidePolymorphisms/{rsId}/associationsGET /efoTraits/{EFO}/associationssize: number of records per page (commonly 20–100)page: zero-based page index_embedded.associations is empty, ormax_pages safety limit.pvalue into a numeric type; handle missing or non-numeric values safely.https://www.ebi.ac.uk/gwas/summary-statistics/apihttp://ftp.ebi.ac.uk/pub/databases/gwas/summary_statistics/tools
Generates complete conventional oncology bulk-transcriptome biomarker and hub-gene research designs from a user-provided cancer type and study direction. Always use this skill whenever a user wants to design, plan, or build a tumor bioinformatics study centered on differential expression, prognostic filtering or risk modeling, PPI-based hub-gene prioritization, diagnostic/prognostic evaluation, clinical association, immune infiltration context, methylation context, and optional tissue or cell validation. Covers five study patterns (signature-first prognostic workflow, hub-gene-first biomarker workflow, hybrid signature-to-hub workflow, immune-context biomarker workflow, translational validation workflow) and always outputs four workload configs (Lite / Standard / Advanced / Publication+) with recommended primary plan, step-by-step workflow, figure plan, validation strategy, minimal executable version, publication upgrade path...
development
Generates complete conventional non-oncology bioinformatics research designs from a user-provided disease context, process-related gene family or biological theme, and validation direction. Use when a study centers on multi-dataset bulk transcriptome integration, DEG analysis, process-gene intersection, enrichment analysis, GSEA, PPI hub-gene prioritization, TF/miRNA regulatory networks, ROC-based biomarker evaluation, and immune infiltration analysis. Covers five study patterns (process-DEG discovery, enrichment/GSEA interpretation, hub-gene prioritization, regulatory-network and immune interpretation, multi-layer public validation) and always outputs Lite / Standard / Advanced / Publication+ with a recommended primary plan, stepwise workflow, figure plan, validation hierarchy, minimal executable version, publication upgrade path, and strictly verified literature retrieval.
tools
Plans confounder control, variable adjustment logic, and bias mitigation strategies at the protocol stage for clinical, epidemiologic, translational, observational, and biomarker studies. Always use this skill when a user needs to identify major confounders, decide which variables should or should not be adjusted for, compare matching/stratification/weighting approaches, anticipate selection or measurement bias, or pressure-test a study design before execution. Focus on bias sensing, causal structure awareness, variable-role classification, and critical design review rather than generic statistical advice.
testing
Generates complete comparative network-toxicology research designs from a user-provided exposure pair, shared toxic phenotype, and validation direction. Use when a study centers on two related exposures under one outcome and needs target collection, shared-vs-specific target decomposition, enrichment, PPI hub prioritization, docking, optional transcriptomic cross-checks, and conservative mechanistic synthesis. Covers five study patterns and always outputs Lite / Standard / Advanced / Publication+ with a recommended primary plan, stepwise workflow, figure plan, validation hierarchy, minimal executable version, publication upgrade path, and strictly verified literature retrieval.