domains / research / clinpgx-api-query / clinpgx-database
The copies overlap heavily on the ClinPGx REST API endpoints and rate limits, but they disagree on the execution model and add different material steps. The Vibe-Skills and OpenClaw copies are near-identical, providing a detailed API reference with inline Python examples. The aipoch copy is a wrapper that mandates a specific packaged script (scripts/query_clinpgx.py), a different dependency version (requests>=2.31.0), and a specific retry/backoff implementation. Because the aipoch copy provides a distinct, more robust execution path (script-based with retries) while the others provide a direct API reference, crowning one would hide the alternative implementation strategy.
| Repository | Path |
|---|---|
| foryourhealth111-pixel/Vibe-Skills | bundled/skills/clinpgx-database/SKILL.md |
| aipoch/medical-research-skills | scientific-skills/Evidence Insight/clinpgx-database/SKILL.md |
| FreedomIntelligence/OpenClaw-Medical-Skills | skills/clinpgx-database/SKILL.md |
| Role | Repository | Path |
|---|---|---|
| peer | foryourhealth111-pixel/Vibe-Skills | bundled/skills/clinpgx-database/SKILL.md |
| peer | aipoch/medical-research-skills | scientific-skills/Evidence Insight/clinpgx-database/SKILL.md |
| peer | FreedomIntelligence/OpenClaw-Medical-Skills | skills/clinpgx-database/SKILL.md |
# ClinPGx Database Access
## Overview
ClinPGx is a comprehensive pharmacogenomics resource (successor to PharmGKB) providing gene-drug interactions, CPIC guidelines, and allele data.
## Setup
1. Install dependencies: `pip install "requests>=2.31.0"`
2. Set base URL: `https://api.clinpgx.org/v1/`
3. Respect rate limits: Max 2 requests/second.
## Execution Strategy
Choose one of the following approaches:
### Option A: Direct API Queries (Reference)
Use `requests` to query specific endpoints:
- **Genes**: `GET /gene/{symbol}` or `GET /gene?q={query}`
- **Drugs**: `GET /chemical/{id}` or `GET /chemical?name={name}`
- **Gene-Drug Pairs**: `GET /geneDrugPair?gene={gene}&drug={drug}`
- **Guidelines**: `GET /guideline/{id}` or `GET /guideline?source=CPIC`
- **Alleles**: `GET /allele/{allele}` or `GET /allele?gene={gene}`
### Option B: Packaged Script (Robust)
If using the `aipoch/medical-research-skills` package:
1. Navigate to the skill folder.
2. Run `python scripts/query_clinpgx.py`.
3. This script includes built-in exponential backoff for HTTP 429 errors and session management.
## Key Data Points
- **Pharmacogenes**: CYP450 (CYP2D6, CYP2C19), Transporters (SLCO1B1), HLA genes.
- **Guidelines**: CPIC, DPWG, FDA labels.
- **Allele Info**: Functional status, population frequencies, defining variants.
## Conflicts
- **Repository**: `aipoch/medical-research-skills` requires the use of a specific script and pinned dependencies, while `foryourhealth111-pixel/Vibe-Skills` and `FreedomIntelligence/OpenClaw-Medical-Skills` provide direct API usage examples without a script wrapper.