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