Skip to content
Back to skills

Variant Gwas Associations

ASecurity

Query EBI GWAS Catalog for GWAS statistical associations (p-value, effect

  • 170 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 11, 2026
datapythonapidatabase

Works with

  • api

Security analysis

A100/100

Scanned September 11, 2026

npx -y skills add InternScience/DrClaw --skill variant-gwas-associations --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Variant Gwas Associations?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Variant Gwas Associations
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/internscience-variant-gwas-associations/badge)](https://www.skillsdirectory.com/skills/internscience-variant-gwas-associations)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: variant-gwas-associations
description: Query EBI GWAS Catalog for GWAS statistical associations (p-value, effect
  size, risk allele) between a variant and traits/diseases.
license: MIT license
metadata:
  skill-author: PJLab
i18n:
  zh:
    description: 查询变异与性状的GWAS关联。
---

# EBI GWAS Catalog — Trait Associations

## Usage

### Tool Description

```tex
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

```python
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}")
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in data →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.