bc_get_string_id
Convert protein identifiers or gene names to STRING database IDs for reliable API interactions. Specify protein symbols and optional species taxonomy to retrieve accurate STRING IDs or preferred names.
Instructions
Map a protein identifier to STRING database IDs.
This function helps resolve common gene names, synonyms, or UniProt identifiers to the STRING-specific identifiers. Using STRING IDs in subsequent API calls improves reliability and performance.
Args:
protein_symbol (str): The name of the protein to search for (e.g., "TP53").
species (str): The species taxonomy ID (e.g., "9606" for human). Optional.
return_field (str): The field to return. Either stringId
or preferredName
(default: stringId).
limit (int): Limit the number of matches returned per query (default: 1).
Returns: str: The STRING ID or preferred name if found, otherwise an error message.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
limit | No | Limit the number of matches returned | |
protein_symbol | Yes | The name of the protein to search for (e.g., 'TP53') | |
return_field | No | Which field to return. Either `stringId` (default) or `preferredName`. | stringId |
species | No | The species taxonomy ID (e.g., '9606' for human) |