STRING Database
Overview
STRING is a comprehensive database of known and predicted protein-protein
interactions covering 59.3M proteins and 20B+ interactions across 12,535 organisms
(v12.0, the version the default API serves as of 2026-09; a version-12-5
subdomain also answers — check string_version() before comparing results).
Query interaction networks, perform functional enrichment, and discover partners
via the REST API for systems biology and pathway analysis.
When to Use This Skill
Use this skill when:
- Retrieving protein-protein interaction networks for single or multiple proteins
- Performing functional enrichment (GO, KEGG, Pfam) on protein lists
- Discovering interaction partners and expanding protein networks
- Testing if proteins form significantly enriched functional modules
- Generating network visualizations with evidence-based coloring
- Analyzing homology and protein family relationships
- Conducting cross-species protein interaction comparisons
- Identifying hub proteins and network connectivity patterns
Does NOT Trigger
| Scenario |
Use Instead |
| Curated pathway maps, reactions, KEGG orthology |
alterlab-kegg |
| Reactome pathway over-representation with the reaction hierarchy |
alterlab-reactome |
| Protein sequences, function annotation, or accession mapping |
alterlab-uniprot |
| Graph algorithms on your own network (centrality, communities) |
alterlab-networkx |
| Domain/family classification of the proteins |
alterlab-interpro |
Hand-off rule. When the request matches a row above, open your answer by naming that skill by its exact id (for example alterlab-kegg) and saying in one line why it fits better, then stop applying this skill's procedure. Name it even when you also need to ask for missing input. If only part of the request is out of scope, name the skill for that part and do only the in-scope part. A brief general pointer is fine; the named skill does the work.
What This Skill Provides
- Python helper functions (
scripts/string_api.py) for all STRING REST API
operations.
- Comprehensive reference documentation (
references/string_reference.md) with
detailed endpoint and parameter specifications.
When a user requests STRING data, determine which operation is needed and use
the appropriate function from scripts/string_api.py, or its command line (stdlib only,
retries 429/5xx with backoff):
python scripts/string_api.py map TP53 BRCA1 ATM # names -> STRING IDs
python scripts/string_api.py network TP53 BRCA1 ATM --required-score 700 \
--base-url https://version-12-0.string-db.org/api # pinned v12.0
python scripts/string_api.py partners TP53 --limit 20 --required-score 700
python scripts/string_api.py ppi-enrichment TP53 MDM2 ATM CHEK2 BRCA1
python scripts/string_api.py enrichment TP53 MDM2 ATM CHEK2 BRCA1
python scripts/string_api.py image TP53 MDM2 ATM -o network.png
Pin the version with --base-url, not an environment-variable prefix
(STRING_BASE_URL=... python ... is not a python command, so the skill's
Bash(python:*) grant does not cover it). From Python, assign
string_api.STRING_BASE_URL before calling the functions.
Core Workflow
- Map identifiers first —
string_map_ids() converts gene/protein names to
STRING IDs (format 9606.ENSP00000269305); always do this for speed and
accuracy.
- Retrieve the network or partners —
string_network() for tabular
interaction data, string_interaction_partners() to expand from seeds,
string_network_image() for a PNG figure.
- Test and interpret —
string_ppi_enrichment() checks whether the network
has more edges than chance; string_enrichment() runs GO/KEGG/Pfam enrichment
(FDR < 0.05 = significant).
- Compare / extend —
string_homology() for family/paralog analysis;
repeat with other species for cross-species comparison.
- Record version —
string_version() for reproducibility.
The eight helper operations and five composed analysis workflows are documented
in the references below.
Key Parameters
required_score (confidence, 0-1000): 150 = low/exploratory, 400 =
medium/default, 700 = high/conservative, 900 = highest/very stringent. Lower =
higher recall (more false positives); higher = higher precision.
network_type: 'functional' (all evidence, default — pathway/systems
biology) or 'physical' (direct binding only — complexes, structural work).
species: NCBI taxon ID (9606 human, 10090 mouse, 7227 fly, 4932 yeast,
6239 C. elegans, 7955 zebrafish, …). Required for networks > 10 proteins. Full
list: https://string-db.org/cgi/input?input_page_active_form=organisms
API Best Practices
- Always map identifiers first with
string_map_ids().
- Prefer STRING IDs (
9606.ENSP00000269305) over gene names.
- Specify
species for networks > 10 proteins.
- Respect rate limits — wait ~1 second between API calls.
- Pin a version for reproducibility — pass
--base-url with a stable
subdomain (e.g. https://version-12-0.string-db.org/api), or set
string_api.STRING_BASE_URL in Python; see string_reference.md.
- Handle errors gracefully — check for an
"Error:" prefix in returned strings.
- Match the confidence threshold to your analysis goals.
Routing Guidance
- Need the exact code for one operation (ID mapping, network, image, partners,
functional enrichment, PPI enrichment, homology, version)? Read
references/operations.md.
- Running an end-to-end analysis (protein-list, single-protein, pathway-centric,
cross-species, or network expansion)? Read
references/analysis-workflows.md.
- Need endpoint specs, output formats (TSV/JSON/XML/PSI-MI), evidence-channel
details, advanced features, error handling, or tool integration (Cytoscape, R,
Python)? Read
references/string_reference.md.
References
references/operations.md — The eight scripts/string_api.py operations with
usage, parameters, output columns, and interpretation guidance.
references/analysis-workflows.md — Five composed workflows: protein-list
analysis, single-protein investigation, pathway-centric analysis, cross-species
comparison, and network expansion/discovery.
references/string_reference.md — Complete API endpoint specifications, all
output formats, evidence channels and confidence-score details, advanced
features (bulk upload, values/ranks enrichment), error handling, tool
integration, and data license/citation.
Troubleshooting (Quick)
- No proteins found — verify
species matches identifiers; map first; check
for typos.
- Empty network — lower
required_score; confirm the proteins interact;
verify species.
- Timeout / slow — reduce input size; use STRING IDs; batch large queries.
- "Species required" error — add
species for networks > 10 proteins.
- Unexpected results — check
string_version(); verify network_type;
review the confidence threshold.
See references/string_reference.md for the full troubleshooting section.
Additional Resources
Data License and Citation
STRING data is freely available under Creative Commons BY 4.0 (free for
academic and commercial use, attribution required). When publishing, cite the
most recent STRING publication — currently Szklarczyk D et al. (2025) "The STRING
database in 2025: protein networks with directionality of regulation", Nucleic
Acids Research 53(D1):D730–D737, doi:10.1093/nar/gkae1113 — and state the STRING
version you queried (list: https://string-db.org/cgi/about).
1---2name: alterlab-string-db3description: Query the STRING API for protein-protein interactions (59M proteins, 20B+ interactions across 12,500+ organisms), building interaction networks, discovering functional partners, and running GO/KEGG/Pfam enrichment on protein lists. Use when constructing a protein-protein interaction network, expanding from seed proteins to functional partners, or running PPI-based enrichment for systems biology; for curated metabolic pathway maps and reactions prefer alterlab-kegg, and for protein sequences, annotations, or accession ID mapping prefer alterlab-uniprot instead. Part of the AlterLab Academic Skills suite.4license: MIT5allowed-tools: Read WebFetch Bash(curl:*) Bash(python:*)6compatibility: Keyless STRING REST API (no authentication required); default API serves STRING v12.0 as of 2026-09 — pin with `python scripts/string_api.py --base-url https://version-12-0.string-db.org/api ...`7metadata:8 source: https://skillmd.com/skills/alterlab-ieu/alterlab-string-db9 skill-author: AlterLab10 version: "1.1.0"11 last_updated: "2026-10-23"12---1314# STRING Database1516## Overview1718STRING is a comprehensive database of known and predicted protein-protein19interactions covering 59.3M proteins and 20B+ interactions across 12,535 organisms20(v12.0, the version the default API serves as of 2026-09; a `version-12-5`21subdomain also answers — check `string_version()` before comparing results).22Query interaction networks, perform functional enrichment, and discover partners23via the REST API for systems biology and pathway analysis.2425## When to Use This Skill2627Use this skill when:2829- Retrieving protein-protein interaction networks for single or multiple proteins30- Performing functional enrichment (GO, KEGG, Pfam) on protein lists31- Discovering interaction partners and expanding protein networks32- Testing if proteins form significantly enriched functional modules33- Generating network visualizations with evidence-based coloring34- Analyzing homology and protein family relationships35- Conducting cross-species protein interaction comparisons36- Identifying hub proteins and network connectivity patterns3738### Does NOT Trigger3940| Scenario | Use Instead |41|----------|-------------|42| Curated pathway maps, reactions, KEGG orthology | `alterlab-kegg` |43| Reactome pathway over-representation with the reaction hierarchy | `alterlab-reactome` |44| Protein sequences, function annotation, or accession mapping | `alterlab-uniprot` |45| Graph algorithms on your own network (centrality, communities) | `alterlab-networkx` |46| Domain/family classification of the proteins | `alterlab-interpro` |4748**Hand-off rule.** When the request matches a row above, open your answer by naming that skill by its exact id (for example `alterlab-kegg`) and saying in one line why it fits better, then stop applying this skill's procedure. Name it even when you also need to ask for missing input. If only part of the request is out of scope, name the skill for that part and do only the in-scope part. A brief general pointer is fine; the named skill does the work.4950## What This Skill Provides51521. Python helper functions (`scripts/string_api.py`) for all STRING REST API53 operations.542. Comprehensive reference documentation (`references/string_reference.md`) with55 detailed endpoint and parameter specifications.5657When a user requests STRING data, determine which operation is needed and use58the appropriate function from `scripts/string_api.py`, or its command line (stdlib only,59retries 429/5xx with backoff):6061```bash62python scripts/string_api.py map TP53 BRCA1 ATM # names -> STRING IDs63python scripts/string_api.py network TP53 BRCA1 ATM --required-score 700 \64 --base-url https://version-12-0.string-db.org/api # pinned v12.065python scripts/string_api.py partners TP53 --limit 20 --required-score 70066python scripts/string_api.py ppi-enrichment TP53 MDM2 ATM CHEK2 BRCA167python scripts/string_api.py enrichment TP53 MDM2 ATM CHEK2 BRCA168python scripts/string_api.py image TP53 MDM2 ATM -o network.png69```7071Pin the version with `--base-url`, not an environment-variable prefix72(`STRING_BASE_URL=... python ...` is not a `python` command, so the skill's73`Bash(python:*)` grant does not cover it). From Python, assign74`string_api.STRING_BASE_URL` before calling the functions.7576## Core Workflow77781. **Map identifiers first** — `string_map_ids()` converts gene/protein names to79 STRING IDs (format `9606.ENSP00000269305`); always do this for speed and80 accuracy.812. **Retrieve the network or partners** — `string_network()` for tabular82 interaction data, `string_interaction_partners()` to expand from seeds,83 `string_network_image()` for a PNG figure.843. **Test and interpret** — `string_ppi_enrichment()` checks whether the network85 has more edges than chance; `string_enrichment()` runs GO/KEGG/Pfam enrichment86 (FDR < 0.05 = significant).874. **Compare / extend** — `string_homology()` for family/paralog analysis;88 repeat with other `species` for cross-species comparison.895. **Record version** — `string_version()` for reproducibility.9091The eight helper operations and five composed analysis workflows are documented92in the references below.9394## Key Parameters9596- **`required_score`** (confidence, 0-1000): 150 = low/exploratory, 400 =97 medium/default, 700 = high/conservative, 900 = highest/very stringent. Lower =98 higher recall (more false positives); higher = higher precision.99- **`network_type`**: `'functional'` (all evidence, default — pathway/systems100 biology) or `'physical'` (direct binding only — complexes, structural work).101- **`species`**: NCBI taxon ID (9606 human, 10090 mouse, 7227 fly, 4932 yeast,102 6239 C. elegans, 7955 zebrafish, …). Required for networks > 10 proteins. Full103 list: https://string-db.org/cgi/input?input_page_active_form=organisms104105## API Best Practices1061071. Always map identifiers first with `string_map_ids()`.1082. Prefer STRING IDs (`9606.ENSP00000269305`) over gene names.1093. Specify `species` for networks > 10 proteins.1104. Respect rate limits — wait ~1 second between API calls.1115. Pin a version for reproducibility — pass `--base-url` with a stable112 subdomain (e.g. `https://version-12-0.string-db.org/api`), or set113 `string_api.STRING_BASE_URL` in Python; see `string_reference.md`.1146. Handle errors gracefully — check for an `"Error:"` prefix in returned strings.1157. Match the confidence threshold to your analysis goals.116117## Routing Guidance118119- **Need the exact code for one operation (ID mapping, network, image, partners,120 functional enrichment, PPI enrichment, homology, version)?** Read121 `references/operations.md`.122- **Running an end-to-end analysis (protein-list, single-protein, pathway-centric,123 cross-species, or network expansion)?** Read `references/analysis-workflows.md`.124- **Need endpoint specs, output formats (TSV/JSON/XML/PSI-MI), evidence-channel125 details, advanced features, error handling, or tool integration (Cytoscape, R,126 Python)?** Read `references/string_reference.md`.127128## References129130- `references/operations.md` — The eight `scripts/string_api.py` operations with131 usage, parameters, output columns, and interpretation guidance.132- `references/analysis-workflows.md` — Five composed workflows: protein-list133 analysis, single-protein investigation, pathway-centric analysis, cross-species134 comparison, and network expansion/discovery.135- `references/string_reference.md` — Complete API endpoint specifications, all136 output formats, evidence channels and confidence-score details, advanced137 features (bulk upload, values/ranks enrichment), error handling, tool138 integration, and data license/citation.139140## Troubleshooting (Quick)141142- **No proteins found** — verify `species` matches identifiers; map first; check143 for typos.144- **Empty network** — lower `required_score`; confirm the proteins interact;145 verify species.146- **Timeout / slow** — reduce input size; use STRING IDs; batch large queries.147- **"Species required" error** — add `species` for networks > 10 proteins.148- **Unexpected results** — check `string_version()`; verify `network_type`;149 review the confidence threshold.150151See `references/string_reference.md` for the full troubleshooting section.152153## Additional Resources154155- Web app (proteome upload, complete network + function prediction):156 https://string-db.org157- Bulk downloads (interactions, annotations, pathway mappings):158 https://string-db.org/cgi/download159160## Data License and Citation161162STRING data is freely available under **Creative Commons BY 4.0** (free for163academic and commercial use, attribution required). When publishing, cite the164most recent STRING publication — currently Szklarczyk D et al. (2025) "The STRING165database in 2025: protein networks with directionality of regulation", Nucleic166Acids Research 53(D1):D730–D737, doi:10.1093/nar/gkae1113 — and state the STRING167version you queried (list: https://string-db.org/cgi/about).