biocontext_kb.core.stringdb
===========================

.. py:module:: biocontext_kb.core.stringdb


Functions
---------

.. autoapisummary::

   biocontext_kb.core.stringdb.get_string_id
   biocontext_kb.core.stringdb.get_string_interactions
   biocontext_kb.core.stringdb.get_string_network_image
   biocontext_kb.core.stringdb.get_string_similarity_scores


Package Contents
----------------

.. py:function:: 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.
   :rtype: str or dict


.. py:function:: 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.
   :rtype: list or dict


.. py:function:: 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.
   :rtype: Image or dict


.. py:function:: 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.
   :rtype: list or dict


