$npx -y skills add QSong-github/DrugClaw --skill adrecsQuery the ADReCS (Adverse Drug Reaction Classification System) v3.3 database. Use whenever the user asks about adverse drug reactions, drug safety profiles, ADR classification, ADR severity/frequency, or wants to look up any entity (drug name, BADD Drug ID, DrugBank ID, ATC code,
| 1 | # ADReCS Query Skill |
| 2 | |
| 3 | Search ADReCS v3.3 records by any entity. Auto-detects type by prefix: |
| 4 | |
| 5 | | Input Pattern | Detected As | Example | |
| 6 | |---|---|---| |
| 7 | | `BADD_D00142` | BADD Drug ID | exact on drug_id column | |
| 8 | | `DB00945` | DrugBank ID | resolved via Drug_information | |
| 9 | | `A02BC01` | ATC code | resolved via Drug_information | |
| 10 | | `50-78-2` | CAS RN | resolved via Drug_information | |
| 11 | | `CID2244` or bare digits | PubChem CID | resolved via Drug_information | |
| 12 | | `D00109` (5-digit) | KEGG ID | resolved via Drug_information | |
| 13 | | `08.06.02.001` | ADReCS ID | substring on ADReCS_ID column | |
| 14 | | `10003781` (8-digit) | MedDRA code | resolved via ADR_ontology | |
| 15 | | `D######` (6+ digit) | MeSH ID | resolved via ADR_ontology | |
| 16 | | anything else | free text | substring on drug_name OR ADR_term | |
| 17 | |
| 18 | ## API |
| 19 | |
| 20 | | Function | Input | Returns | |
| 21 | |---|---|---| |
| 22 | | `load_drug_adr(path)` | txt path | DataFrame (Drug–ADR pairs) | |
| 23 | | `load_drug_info(path)` | xlsx path | DataFrame (drug metadata) | |
| 24 | | `load_adr_ontology(path)` | xlsx path | DataFrame (ADR hierarchy) | |
| 25 | | `search(entity)` | single entity string | DataFrame of matching Drug–ADR rows | |
| 26 | | `search_batch(entities)` | list of entity strings | dict[str, DataFrame] | |
| 27 | | `summarize(hits, entity)` | DataFrame + label | compact LLM-readable text | |
| 28 | | `to_json(hits)` | DataFrame | list[dict] | |
| 29 | |
| 30 | ## Usage |
| 31 | |
| 32 | See `if __name__ == "__main__"` block in `62_ADReCS.py` for runnable examples covering: drug name lookup, BADD Drug ID, DrugBank ID, ADR term, ADReCS ID prefix, batch search, and JSON output. |
| 33 | |
| 34 | ## Data |
| 35 | |
| 36 | - **Source**: ADReCS v3.3 — [https://www.bio-add.org/ADReCS/](https://www.bio-add.org/ADReCS/) |
| 37 | - **Primary file**: `Drug_ADR_v3.3.txt` (drug–ADR association pairs) |
| 38 | - **Drug metadata**: `Drug_information_v3.3.xlsx` (name, synonyms, DrugBank/KEGG/PubChem/ATC/CAS cross-refs) |
| 39 | - **ADR hierarchy**: `ADR_ontology_v3.3.xlsx` (ADReCS ID, ADR term, MedDRA code, MeSH ID, 4-level classification) |
| 40 | - **Path**: `DATA_DIR` variable in `62_ADReCS.py` |
| 41 | |
| 42 | ## Citation |
| 43 | |
| 44 | Cai MC et al. (2015) ADReCS: an ontology database for aiding standardization and hierarchical classification of adverse drug reaction terms. *Nucleic Acids Research* 43(D1):D907–D913. |