Query the STRING database to retrieve protein-protein interactions with comprehensive confidence scores.
python
from open_biomed.tools.tool_registry import TOOLS
# Query STRING for interaction partners
tool = TOOLS["ppi_string_request"]
results, _ = tool.run(uniprot_id="P04637") # TP53
# Access results
for interaction in results:
print(f"{interaction['partner_gene']}: {interaction['combined_score']}")
python
# High confidence interactions only, limit to 20
results, _ = tool.run(
uniprot_id="P04637",
species=9606, # Human (default)
required_score=700, # High confidence (default)
limit=20 # Max interactors
)
ParameterTypeDefaultDescriptionuniprot_idstrrequiredUniProt accession (e.g., P04637)speciesint9606NCBI taxonomy ID (9606=human)required_scoreint700Min confidence (150/400/700/900)limitint50Max interactors to return
ScoreLevelUse Case150LowExploratory analysis400MediumBalanced retrieval700HighReliable interactions (default)900HighestVery confident only
json
[
{
"query_protein": "TP53",
"partner_string_id": "9606.ENSP00000340989",
"partner_gene": "SFN",
"combined_score": 0.999,
"scores": {
"experimental": 0.981,
"text_mining": 0.859,
"database": 0.75,
"coexpression": 0.0,
"phylogenetic": 0.0,
"gene_fusion": 0.0,
"neighborhood": 0.0
},
"ncbi_taxon_id": 9606
}
]
Score TypeSourceRangecombined_scoreWeighted combination0-1experimentalWet-lab experiments0-1text_miningLiterature co-occurrence0-1databaseCurated databases (BioGRID, etc.)0-1coexpressionExpression correlation0-1phylogeneticPhylogenetic profiles0-1gene_fusionFusion events0-1neighborhoodGenomic proximity0-1
ErrorSolutionNo interactions foundLower required_score thresholdUniProt ID not recognizedVerify ID format (e.g., P04637)Rate limitedWait and retry; STRING allows ~5 req/secWrong speciesCheck NCBI taxonomy ID
OrganismTaxonomy IDHuman9606Mouse10090Rat10116E. coli83333S. cerevisiae4932
examples/basic_query.py - Complete example scriptreferences/score_details.md - Detailed score methodology