biocontext_kb.core.stringdb#
Functions#
|
Map protein identifiers (gene names, synonyms, UniProt IDs) to STRING database IDs. Using STRING IDs improves reliability. |
|
Retrieve protein-protein interactions for a given protein with scores above threshold. Always provide species parameter. |
|
Generate protein-protein interaction network image from STRING database. Always provide species parameter. |
|
Retrieve protein homology similarity scores from STRING database based on Smith-Waterman bit scores. Only scores above 50 reported. |
Package Contents#
- biocontext_kb.core.stringdb.get_string_id(protein_symbol, species='', return_field='stringId', limit=1)#
Map protein identifiers (gene names, synonyms, UniProt IDs) to STRING database IDs. Using STRING IDs improves reliability.
- Returns:
STRING ID string (e.g., ‘9606.ENSP00000269305’) or dict with error message.
- Return type:
- Parameters:
protein_symbol (Annotated[str, Field(description="Protein name or identifier (e.g., 'TP53')")])
species (Annotated[str, Field(description="Species taxonomy ID (e.g., '9606' for human)")])
return_field (Annotated[str, Field(description="Field to return: 'stringId' or 'preferredName'")])
limit (Annotated[int, Field(description='Maximum number of matches to return')])
- biocontext_kb.core.stringdb.get_string_interactions(protein_symbol, species, min_score=700)#
Retrieve protein-protein interactions for a given protein with scores above threshold. Always provide species parameter.
- Returns:
Protein interactions array with stringId_A, stringId_B, preferredName_A/B, score, evidence channels or error message.
- Return type:
- Parameters:
- biocontext_kb.core.stringdb.get_string_network_image(protein_symbol, species, flavor='confidence', min_score=700)#
Generate protein-protein interaction network image from STRING database. Always provide species parameter.
- Returns:
Network visualization as PNG image object or error message.
- Return type:
Image or dict
- Parameters:
protein_symbol (Annotated[str, Field(description="Protein name to search for (e.g., 'TP53')")])
species (Annotated[str, Field(description="Species taxonomy ID (e.g., '10090' for mouse)")])
flavor (Annotated[str, Field(description="Network flavor (e.g., 'confidence', 'evidence', 'actions')")])
min_score (Annotated[int, Field(description='Minimum combined score threshold (0-1000)', ge=0, le=1000)])
- biocontext_kb.core.stringdb.get_string_similarity_scores(protein_symbol, protein_symbol_comparison, species='')#
Retrieve protein homology similarity scores from STRING database based on Smith-Waterman bit scores. Only scores above 50 reported.
- Returns:
Similarity scores array with stringId_A, stringId_B, bitscore or error message.
- Return type:
- Parameters: