$npx -y skills add QSong-github/DrugClaw --skill stitchQuery the STITCH chemical-protein interaction database. Use whenever the user asks about chemical-protein interactions, drug-target binding, compound action modes, or wants to look up any entity (chemical name, STITCH CID, STRING protein ID) in STITCH.
| 1 | # STITCH Query Skill |
| 2 | |
| 3 | Search STITCH for chemical–protein interactions via REST API. Auto-detects input type: |
| 4 | |
| 5 | | Input Pattern | Detected As | Example | |
| 6 | |---|---|---| |
| 7 | | `CIDm00002244` / `CIDs00002244` | STITCH chemical ID | direct lookup | |
| 8 | | `9606.ENSP00000352121` | STRING protein ID | direct lookup | |
| 9 | | anything else | free text | resolved via `/resolve` first | |
| 10 | |
| 11 | ## API |
| 12 | |
| 13 | | Function | Input | Returns | |
| 14 | |---|---|---| |
| 15 | | `resolve(name, species)` | chemical / protein name | `list[dict]` with stringId, preferredName | |
| 16 | | `resolve_batch(names, species)` | list of names | `list[dict]` (via `/resolveList`) | |
| 17 | | `get_interactors(id, species, limit, required_score)` | single ID | `list[dict]` with partner IDs + scores | |
| 18 | | `get_actions(id, species, limit, required_score)` | single ID | `list[dict]` with mode (activation/inhibition/binding…) | |
| 19 | | `get_interactions(ids, species, required_score)` | list of IDs | `list[dict]` pairwise interactions among inputs | |
| 20 | | `search(entity, species, limit, required_score)` | single entity (any type) | `dict` with resolved_id, interactors, actions | |
| 21 | | `search_batch(entities, species, limit, required_score)` | list or comma-separated string | `dict[str, dict]` | |
| 22 | | `summarize(result, entity)` | search() result + label | compact text | |
| 23 | | `to_json(result)` | any result | JSON string | |
| 24 | |
| 25 | ## Key Fields |
| 26 | |
| 27 | **Interactors** — `stringId_A`, `stringId_B`, `preferredName_A`, `preferredName_B`, `score`, `nscore`, `fscore`, `pscore`, `ascore`, `escore`, `dscore`, `tscore` |
| 28 | |
| 29 | **Actions** — `stringId_A`, `stringId_B`, `preferredName_A`, `preferredName_B`, `mode` (activation / inhibition / binding / catalysis / reaction / expression / ptmod), `action`, `is_directional`, `a_is_acting`, `score` |
| 30 | |
| 31 | ## Score Channels |
| 32 | |
| 33 | | Abbrev | Meaning | |
| 34 | |---|---| |
| 35 | | nscore | neighborhood (genomic context) | |
| 36 | | fscore | gene fusion | |
| 37 | | pscore | phylogenetic co-occurrence | |
| 38 | | ascore | co-expression | |
| 39 | | escore | experimental evidence | |
| 40 | | dscore | curated database evidence | |
| 41 | | tscore | text mining | |
| 42 | | score | combined score (0–1000; 400=medium, 700=high, 900=highest) | |
| 43 | |
| 44 | ## Usage |
| 45 | |
| 46 | See `if __name__ == "__main__"` block in `45_STITCH.py` for runnable examples covering: free-text name, STITCH CID, batch search, and JSON output. |
| 47 | |
| 48 | ## Data Source |
| 49 | |
| 50 | - **Provider**: STITCH / STRING Consortium (EMBL, CPR, SIB, KU) |
| 51 | - **Primary URL**: `http://stitch.embl.de/api` |
| 52 | - **Fallback URL**: `https://string-db.org/api` (STITCH data merged into STRING 12+) |
| 53 | - **Auth**: None (public API; rate-limited — avoid parallel bulk requests) |
| 54 | - **Species**: Default 9606 (Homo sapiens); pass NCBI taxonomy ID for other organisms |