$npx -y skills add QSong-github/DrugClaw --skill drugrepobankQuery the DrugRepoBank drug repurposing evidence database. Use whenever the user asks about repurposing candidates, drug–disease–target repurposing evidence, or wants to look up any entity (drug name, DrugBank ID, ChEMBL ID, PubChem CID, TTD target ID, UniProt ID, disease name) i
| 1 | # DrugRepoBank Query Skill |
| 2 | |
| 3 | Search four linked tables (Drug, Target, DrugTargetInteraction, Literature) |
| 4 | for repurposing evidence. Auto-detects entity type by prefix: |
| 5 | |
| 6 | | Input Pattern | Detected As | Example | |
| 7 | |---|---|---| |
| 8 | | `DB00945` | DrugBank ID | exact on `DrugBank_ID` / `DrugID` | |
| 9 | | `T47101` | TTD Target ID | exact on `TargetID` | |
| 10 | | `FGFR1_HUMAN` | UniProt ID | exact on `UniprotID` | |
| 11 | | `CHEMBL2103749` | ChEMBL ID | exact on `ChEMBL ID` in Drug table | |
| 12 | | `16129704` (digits) | PubChem CID | exact on `PubChem_Compound_ID` / `PubChemID` | |
| 13 | | anything else | free text | substring on drug Name, TargetName, Disease, NewDisease | |
| 14 | |
| 15 | ## API |
| 16 | |
| 17 | | Function | Input | Returns | |
| 18 | |---|---|---| |
| 19 | | `load_all()` | — | `dict` with keys `drug`, `dti`, `lit`, `target` (lists of row-dicts) | |
| 20 | | `search(tables, entity)` | tables dict + single entity string | `dict` with keys `entity`, `entity_type`, `drug`, `target`, `dti`, `literature` | |
| 21 | | `search_batch(tables, entities)` | tables dict + list of entity strings | `dict[str, search_result]` | |
| 22 | | `summarize(result)` | single `search()` result | compact one-line LLM-readable text | |
| 23 | | `to_json(result)` | single `search()` result | JSON string (trimmed heavy fields) | |
| 24 | |
| 25 | ## Usage |
| 26 | |
| 27 | See `if __name__ == "__main__"` block in `42_DrugRepoBank.py` for runnable |
| 28 | examples covering: drug name, DrugBank ID, TTD target ID, UniProt ID, ChEMBL |
| 29 | ID, disease free-text, batch search, and JSON output. |
| 30 | |
| 31 | ## Data |
| 32 | |
| 33 | Four CSV tables in `DATA_DIR`: |
| 34 | |
| 35 | | File | Key Columns | Description | |
| 36 | |---|---|---| |
| 37 | | `Drug.csv` | DrugBank_ID, Name, Drug Groups, PubChem_Compound_ID, ChEMBL ID, SMILES | Drug identifiers & structures | |
| 38 | | `DrugTargetInteraction.csv` | UniprotID, PubchemID, TargetID, DrugID, Highest_status, MOA | Drug–target links with mechanism of action | |
| 39 | | `Literature.csv` | DrugName, DrugID, Target, Disease, NewDisease, Evidence, Insilico, Invitro, Invivo, Clinicaltrial, PMID | Repurposing evidence & literature references | |
| 40 | | `Targets.csv` | TargetID, UniprotID, TargetName, TargetGeneName, TargetType, Function | Target annotations & pathway memberships | |
| 41 | |
| 42 | - **Path**: `DATA_DIR` variable in `42_DrugRepoBank.py` |
| 43 | (`resources_metadata/drug_repurposing/DrugRepoBank`) |
| 44 | - **Source**: https://awi.cuhk.edu.cn/DrugRepoBank/php/index.php |
| 45 | - **Paper**: Huang et al., *Database* 2024, baae051. DOI:10.1093/database/baae051 |