$npx -y skills add QSong-github/DrugClaw --skill dilirankQuery the DILIrank/FDA Liver Toxicity Knowledge Base (LTKB). Use whenever the user asks about drug-induced liver injury (DILI) risk, hepatotoxicity classification, or wants to look up any drug (by name, LTKB ID, or DILIst ID) in the DILIrank or DILIst datasets.
| 1 | # LTKB Query Skill |
| 2 | |
| 3 | Search FDA LTKB records (DILIrank 2.0 + DILIst) by any entity. Auto-detects type by pattern: |
| 4 | |
| 5 | | Input Pattern | Detected As | Searched In | |
| 6 | |---|---|---| |
| 7 | | `LT00040` | LTKB ID | DILIrank only | |
| 8 | | `2` (digits) | DILIst ID | DILIst only | |
| 9 | | anything else | drug name | both datasets (substring) | |
| 10 | |
| 11 | ## Datasets |
| 12 | |
| 13 | **DILIrank 2.0** — 1,036 FDA-approved drugs ranked by DILI concern: |
| 14 | |
| 15 | | vDILI-Concern | Meaning | |
| 16 | |---|---| |
| 17 | | vMOST-DILI-concern | Strong evidence of causing DILI | |
| 18 | | vLess-DILI-concern | Some evidence of causing DILI | |
| 19 | | vNo-DILI-concern | No credible evidence | |
| 20 | | vAmbiguous-DILI-concern | Conflicting/insufficient evidence | |
| 21 | |
| 22 | Columns: `LTKBID`, `CompoundName`, `SeverityClass`, `LabelSection`, `vDILI-Concern`, `Comment` |
| 23 | |
| 24 | **DILIst** — 1,279 drugs classified by DILI severity: |
| 25 | |
| 26 | | Classification | Meaning | |
| 27 | |---|---| |
| 28 | | 1 | DILI-positive | |
| 29 | | 0 | DILI-negative | |
| 30 | |
| 31 | Columns: `DILIST_ID`, `CompoundName`, `DILIst Classification`, `Routs of Administration` |
| 32 | |
| 33 | ## API |
| 34 | |
| 35 | | Function | Input | Returns | |
| 36 | |---|---|---| |
| 37 | | `load_all(rank_path, list_path)` | Excel paths | `{"dilirank": [...], "dilist": [...]}` | |
| 38 | | `search(data, entity)` | data dict + entity string | `{"entity", "type", "dilirank": [], "dilist": []}` | |
| 39 | | `search_batch(data, entities)` | data dict + list of strings | `{entity: search_result}` | |
| 40 | | `summarize(result, entity)` | search result + label | compact text | |
| 41 | | `to_json(result)` | search result | JSON string | |
| 42 | |
| 43 | ## Usage |
| 44 | |
| 45 | See `if __name__ == "__main__"` block in `48_LTKB.py` for runnable examples covering: drug name, LTKB ID, DILIst ID, batch search, and JSON output. |
| 46 | |
| 47 | ## Data |
| 48 | |
| 49 | - **Source**: FDA LTKB — <https://www.fda.gov/science-research/bioinformatics-tools/liver-toxicity-knowledge-base-ltkb> |
| 50 | - **Files**: `Drug Induced Liver Injury Rank (DILIrank 2.0) Dataset FDA.xlsx`, `DILIst Supplementary Table.xlsx` |
| 51 | - **Path**: `DATA_DIR` variable in `48_LTKB.py` |