Alterlab string db

From AlterLab-IEU/AlterLab-Academic-Skills · View interactive version

Alterlab string db is an AI agent skill from the GitHub repository AlterLab-IEU/AlterLab-Academic-Skills. 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, expandi

How to use this skill

Skill file

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:

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

  1. Python helper functions (scripts/string_api.py) for all STRING REST API

operations.

  1. 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

  1. Map identifiers first — string_map_ids() converts gene/protein names to

STRING IDs (format 9606.ENSP00000269305); always do this for speed and

accuracy.

  1. 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.

  1. 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).

  1. Compare / extend — string_homology() for family/paralog analysis;

repeat with other species for cross-species comparison.

  1. Record version — string_version() for reproducibility.

The eight helper operations and five composed analysis workflows are documented

in the references below.

Key Parameters

medium/default, 700 = high/conservative, 900 = highest/very stringent. Lower =

higher recall (more false positives); higher = higher precision.

biology) or 'physical' (direct binding only — complexes, structural work).

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

  1. Always map identifiers first with string_map_ids().
  2. Prefer STRING IDs (9606.ENSP00000269305) over gene names.
  3. Specify species for networks > 10 proteins.
  4. Respect rate limits — wait ~1 second between API calls.
  5. 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.

  1. Handle errors gracefully — check for an "Error:" prefix in returned strings.
  2. Match the confidence threshold to your analysis goals.

Routing Guidance

functional enrichment, PPI enrichment, homology, version)?** Read

references/operations.md.

cross-species, or network expansion)?** Read references/analysis-workflows.md.

details, advanced features, error handling, or tool integration (Cytoscape, R,

Python)?** Read references/string_reference.md.

References

usage, parameters, output columns, and interpretation guidance.

analysis, single-protein investigation, pathway-centric analysis, cross-species

comparison, and network expansion/discovery.

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)

for typos.

verify species.

review the confidence threshold.

See references/string_reference.md for the full troubleshooting section.

Additional Resources

https://string-db.org

https://string-db.org/cgi/download

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).

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.