$npx -y skills add QSong-github/DrugClaw --skill siderCategory: Drug-centric | Type: DB | Subcategory: Adverse Drug Reaction (ADR) Link: http://sideeffects.embl.de/ | Paper: https://doi.org/10.1093/nar/gkv1075
| 1 | # SIDER - Side Effect Resource |
| 2 | |
| 3 | **Category:** Drug-centric | **Type:** DB | **Subcategory:** Adverse Drug Reaction (ADR) |
| 4 | **Link:** http://sideeffects.embl.de/ | **Paper:** https://doi.org/10.1093/nar/gkv1075 |
| 5 | |
| 6 | SIDER contains marketed medicines and their recorded adverse drug reactions, mined from public documents and package inserts. |
| 7 | |
| 8 | ## Entity Type Auto-Detection |
| 9 | |
| 10 | | Input Pattern | Detected As | Example | |
| 11 | |---|---|---| |
| 12 | | `CIDxxxxxxxxx` | STITCH ID | `CID100000085` | |
| 13 | | `Cxxxxxxx` (8-char, digits after C) | UMLS CUI | `C0011849` | |
| 14 | | `X##XX##` (7-char ATC pattern) | ATC code | `N05BA01` | |
| 15 | | anything else | free text | `aspirin`, `headache` | |
| 16 | |
| 17 | Free text first attempts exact/substring match on drug names; if no drug is matched, it searches side-effect and indication names. |
| 18 | |
| 19 | ## API |
| 20 | |
| 21 | | Function | Input | Returns | |
| 22 | |---|---|---| |
| 23 | | `search(entity)` | single entity string | `dict` with drug_name, stitch_ids, atc_codes, side_effects, indications, freq | |
| 24 | | `search_batch(entities)` | list of entity strings | `dict[str, dict]` | |
| 25 | | `summarize(result)` | one result dict | compact text string | |
| 26 | | `to_json(result)` | one result dict | same dict (pipeline passthrough) | |
| 27 | |
| 28 | ## Usage |
| 29 | |
| 30 | ```python |
| 31 | from 14_SIDER import search, search_batch, summarize |
| 32 | |
| 33 | # Single query — drug name |
| 34 | result = search("aspirin") |
| 35 | print(summarize(result)) |
| 36 | |
| 37 | # Single query — STITCH ID |
| 38 | result = search("CID100000085") |
| 39 | print(summarize(result)) |
| 40 | |
| 41 | # Single query — side-effect text |
| 42 | result = search("headache") |
| 43 | print(summarize(result)) |
| 44 | |
| 45 | # Batch query — mixed entity types |
| 46 | results = search_batch(["metformin", "ibuprofen", "C0011849"]) |
| 47 | for entity, r in results.items(): |
| 48 | print(summarize(r)) |
| 49 | ``` |
| 50 | |
| 51 | ## Data Files |
| 52 | |
| 53 | All pre-downloaded and extracted under: |
| 54 | `resources_metadata/adr/SIDER` |
| 55 | |
| 56 | | File | Content | |
| 57 | |---|---| |
| 58 | | `drug_names.tsv` | STITCH flat ID → drug name | |
| 59 | | `drug_atc.tsv` | STITCH flat ID → ATC code | |
| 60 | | `meddra_all_se.tsv` | All side effects (STITCH, UMLS, MedDRA type, SE name) | |
| 61 | | `meddra_all_indications.tsv` | All indications (STITCH, UMLS, method, MedDRA name) | |
| 62 | | `meddra_freq.tsv` | Side effects with frequency info | |
| 63 | |
| 64 | The loader auto-detects `.tsv` / `.tsv.gz` variants. Results are capped at 50 records per category for readability. |