$npx -y skills add QSong-github/DrugClaw --skill dgidbQuery the DGIdb (Drug-Gene Interaction Database) for drug-gene interactions, gene druggability categories, and drug target information. Use whenever the user asks about drug targets, druggable genes, gene-drug interactions, or wants to look up any entity (gene name, drug name, dr
| 1 | # DGIdb Query Skill |
| 2 | |
| 3 | Search DGIdb records by any entity. Auto-detects type by naming convention: |
| 4 | |
| 5 | | Input Pattern | Detected As | Example | |
| 6 | |---|---|---| |
| 7 | | ALL-CAPS ≤15 chars | Gene | `EGFR`, `BRAF`, `TP53` | |
| 8 | | Known category keyword | Druggability category | `clinically actionable`, `kinase` | |
| 9 | | Anything else | Drug | `imatinib`, `erlotinib` | |
| 10 | |
| 11 | Supported category keywords: `clinically actionable`, `drug resistance`, `druggable genome`, `tumor suppressor`, `transcription factor`, `kinase`, `g protein coupled receptor`, `hormone activity`, `ion channel`, `protease`, `dna repair`. |
| 12 | |
| 13 | ## API |
| 14 | |
| 15 | | Function | Input | Returns | |
| 16 | |---|---|---| |
| 17 | | `search(entity)` | single entity string | `list[dict]` | |
| 18 | | `search_batch(entities)` | list of entity strings | `dict[str, list[dict]]` | |
| 19 | | `summarize(results, entity)` | result list + label | compact text for LLM | |
| 20 | | `to_json(results)` | result list | `list[dict]` (passthrough) | |
| 21 | |
| 22 | ## Key Fields |
| 23 | |
| 24 | **Gene result**: `name`, `long_name`, `categories`, `interaction_count`, `interactions[]` (each with `drug`, `drug_concept_id`, `score`, `types`, `directionality`, `attributes`, `pmids`, `sources`). |
| 25 | |
| 26 | **Drug result**: `name`, `concept_id`, `approval_ratings`, `interaction_count`, `interactions[]` (each with `gene`, `gene_long_name`, `score`, `types`, `directionality`, `attributes`, `pmids`, `sources`). |
| 27 | |
| 28 | **Category result**: `category`, `gene_count`, `genes[]` (each with `name`, `long_name`). |
| 29 | |
| 30 | ## Usage |
| 31 | |
| 32 | See `if __name__ == "__main__"` block in `16_DGIdb.py` for runnable examples covering: single gene, single drug, category, batch (mixed types), and JSON output. |
| 33 | |
| 34 | ## Data Source |
| 35 | |
| 36 | - **Database**: DGIdb v5.0 — Drug-Gene Interaction Database |
| 37 | - **Endpoint**: `https://dgidb.org/api/graphql` (GraphQL, no API key) |
| 38 | - **Coverage**: 40+ source databases, ~100 k drug-gene interactions |
| 39 | - **Paper**: Freshour et al., *Nucleic Acids Res.* 2024; 52(D1):D1227-D1235. DOI: [10.1093/nar/gkac1046](https://doi.org/10.1093/nar/gkac1046) |