$npx -y skills add QSong-github/DrugClaw --skill tarkgQuery canonical TarKG drug-target triplets. Use when the user asks about drug-target interactions, relation labels, disease/pathway context, or quick lookups for drugs/targets in TarKG.
| 1 | # TarKG Query Skill |
| 2 | |
| 3 | Query the canonical packaged TarKG TSV output. |
| 4 | |
| 5 | ## Data |
| 6 | |
| 7 | - Path: `resources_metadata/dti/TarKG/tarkg.tsv` |
| 8 | - Columns: `drug`, `target`, `relation`, `disease`, `pathway` |
| 9 | |
| 10 | ## API |
| 11 | |
| 12 | | Function | Input | Returns | |
| 13 | |---|---|---| |
| 14 | | `load_tarkg(path)` | TSV path | `list[dict]` | |
| 15 | | `query_entity(entity, rows, limit)` | single entity string | `dict` | |
| 16 | | `query_entities(entities, path, limit)` | list of entity strings | `list[dict]` | |
| 17 | |
| 18 | `query_entity` returns keys used by `retrieve.py`: `matched`, `node_info`, |
| 19 | `outgoing_edges`, `incoming_edges`, `candidates`. |
| 20 | |
| 21 | ## Usage |
| 22 | |
| 23 | Run `example.py` directly for demo queries against the canonical TSV. |