Variant Gwas Associations
Researchvariant-gwas-associationsVariant Gwas Associations is an Agent Skill for research published in the SpectrAI-Initiative/InnoClaw repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Query EBI GWAS Catalog for GWAS statistical associations (p-value, effect size, risk allele) between a variant and traits/diseases.
QUICK START
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/SpectrAI-Initiative/InnoClaw/blob/HEAD/.claude/skills/variant-gwas-associations/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/variant-gwas-associations, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
EBI GWAS Catalog — Trait Associations
Usage
Tool Description
Query EBI GWAS Catalog REST API to get GWAS association information for a variant.
Database: EBI GWAS Catalog (https://www.ebi.ac.uk/gwas/)
API: GET https://www.ebi.ac.uk/gwas/rest/api/associations/search/findByRsId?rsId={rsid}
Args:
rs_id (str): dbSNP rsID (e.g. "rs7412")
Return:
associations (list): Each contains pvalue, risk allele, trait/disease, source study.
Query Example
import requests
rs_id = "rs7412"
url = f"https://www.ebi.ac.uk/gwas/rest/api/associations/search/findByRsId?rsId={rs_id}"
resp = requests.get(url, headers={"Accept": "application/json"}, timeout=30).json()
associations = resp.get("_embedded", {}).get("associations", [])
print(f"[GWAS Catalog] {rs_id} 关联数: {len(associations)}")
for i, assoc in enumerate(associations[:10]): # 展示前10条
pval = assoc.get("pvalue", "N/A")
beta = assoc.get("betaNum", "N/A")
risk_freq = assoc.get("riskFrequency", "N/A")
# 获取 trait 名称需要额外请求 _links
trait_link = assoc.get("_links", {}).get("efoTraits", {}).get("href", "")
if trait_link:
trait_resp = requests.get(trait_link, headers={"Accept": "application/json"}, timeout=15).json()
traits = [t.get("trait", "") for t in trait_resp.get("_embedded", {}).get("efoTraits", [])]
else:
traits = ["unknown"]
print(f" [{i+1}] p={pval}, beta={beta}, traits={traits}")