domains / science / string-ppi-query / string-database
Both skills describe the same task (querying the STRING database for PPIs and enrichment) and reference the same underlying files (`scripts/string_api.py`, `references/string_reference.md`). However, they disagree on the specific API surface: the first copy uses a `StringClient` class with methods like `map_id` and `get_network_image`, while the second copy uses standalone functions like `string_map_ids` and `string_network`. The second copy also provides significantly more detail on parameters (e.g., `required_score` thresholds, `network_flavor` options) and use cases. Because the code interfaces are incompatible and the second copy contains material steps/constraints (specific thresholds, flavors) missing from the first, crowning one would hide the alternative implementation or lose critical parameter details.
| Repository | Path |
|---|---|
| aipoch/medical-research-skills | scientific-skills/Evidence Insight/string-database/SKILL.md |
| FreedomIntelligence/OpenClaw-Medical-Skills | skills/string-database/SKILL.md |
| Role | Repository | Path |
|---|---|---|
| peer | aipoch/medical-research-skills | scientific-skills/Evidence Insight/string-database/SKILL.md |
| peer | FreedomIntelligence/OpenClaw-Medical-Skills | skills/string-database/SKILL.md |
---
name: string-database
description: Query the STRING database for protein-protein interactions, ID mapping, enrichment, and visualization.
---
# STRING Database Skill
## Overview
Access the STRING REST API to map identifiers, retrieve PPI networks, run enrichment, and generate visualizations. The skill provides Python helpers in `scripts/string_api.py` and documentation in `references/string_reference.md`.
## Dependencies
- Python >= 3.8
- `requests`, `pandas`
## Implementation Note
The specific API surface may vary between versions of this skill. Check `scripts/string_api.py` to determine if the interface is class-based (`StringClient`) or function-based (`string_*`).
## Core Operations
### 1. Identifier Mapping
Convert gene/protein names to STRING identifiers.
- **Class-based**: `client.map_id(identifier="TP53", species=9606)`
- **Function-based**: `string_map_ids('TP53', species=9606)`
- **Parameters**: `species` (NCBI taxon ID), `limit` (matches per query).
### 2. Network Retrieval
Fetch interaction edges with confidence scores.
- **Class-based**: `client.get_network_image(...)` or similar network methods.
- **Function-based**: `string_network(proteins, species=9606, required_score=400)`
- **Parameters**:
- `required_score`: Confidence threshold (0-1000). Recommended: 400 (medium), 700 (high).
- `network_type`: `'functional'` (default) or `'physical'`.
- `add_nodes`: Expand network by N neighbors (0-10).
### 3. Interaction Partners
Find top interaction partners for a protein.
- **Function-based**: `string_interaction_partners('TP53', species=9606, limit=10, required_score=700)`
### 4. Enrichment Analysis
Run GO/KEGG/Reactome/Pfam enrichment.
- **Class-based**: `client.get_ppi_enrichment(identifiers=[...])`
- **Function-based**: `string_enrichment(...)` (check `scripts/string_enrichment.py` or `string_api.py` for exact function name).
### 5. Visualization
Generate static network images (PNG/SVG).
- **Class-based**: `client.get_network_image(identifiers=[...], output_file="net.png", add_color_nodes=10)`
- **Function-based**: `string_network_image(proteins, species=9606, network_flavor='evidence')`
- **Flavors** (if supported): `'evidence'` (default), `'confidence'`, `'actions'`.
## Best Practices
- Always map identifiers first to ensure canonical STRING IDs.
- Use `caller_identity` (class-based) or appropriate headers to identify your application.
- Filter by `required_score` to balance sensitivity and specificity.