biocontext_kb.core.interpro#

Functions#

get_interpro_entry(interpro_id[, ...])

Get InterPro entry details (family, domain, or functional site). Returns metadata from member databases like PFAM, PROSITE.

get_protein_domains(protein_id[, source_db, ...])

Get protein domain architecture and InterPro matches. Returns all InterPro domains, functional sites, and domain architecture.

search_interpro_entries([query, entry_type, ...])

Search InterPro entries by name, type, database, GO term, or species. Returns matching entries with metadata.

Package Contents#

biocontext_kb.core.interpro.get_interpro_entry(interpro_id, include_interactions=False, include_pathways=False, include_cross_references=False)#

Get InterPro entry details (family, domain, or functional site). Returns metadata from member databases like PFAM, PROSITE.

Returns:

Entry metadata including name, type, description, member databases, optionally interactions/pathways/cross-references or error message.

Return type:

dict

Parameters:
  • interpro_id (Annotated[str, Field(description="InterPro ID (e.g., 'IPR000001')")])

  • include_interactions (Annotated[bool, Field(description='Include protein-protein interactions data')])

  • include_pathways (Annotated[bool, Field(description='Include pathway information')])

  • include_cross_references (Annotated[bool, Field(description='Include cross-references to other databases')])

biocontext_kb.core.interpro.get_protein_domains(protein_id, source_db='uniprot', include_structure_info=False, species_filter=None)#

Get protein domain architecture and InterPro matches. Returns all InterPro domains, functional sites, and domain architecture.

Returns:

Protein metadata with interpro_matches array, interpro_match_count, domain_architecture, optionally structure data or error message.

Return type:

dict

Parameters:
  • protein_id (Annotated[str, Field(description="UniProt ID/accession (e.g., 'P04637' or 'CYC_HUMAN')")])

  • source_db (Annotated[str, Field(description="Database source ('uniprot', 'reviewed', or 'unreviewed')")])

  • include_structure_info (Annotated[bool, Field(description='Include structural information')])

  • species_filter (Annotated[Optional[str], Field(description="Taxonomy ID filter (e.g., '9606' for human)")])

biocontext_kb.core.interpro.search_interpro_entries(query=None, entry_type=None, source_database=None, go_term=None, species_filter=None, page_size=20)#

Search InterPro entries by name, type, database, GO term, or species. Returns matching entries with metadata.

Returns:

Search results with results array (InterPro entries), count, total_available, search_criteria or error message.

Return type:

dict

Parameters:
  • query (Annotated[Optional[str], Field(description='Search term for entry names/descriptions')])

  • entry_type (Annotated[Optional[str], Field(description='family, domain, homologous_superfamily, repeat, conserved_site, binding_site, active_site, or ptm')])

  • source_database (Annotated[Optional[str], Field(description='pfam, prosite, panther, smart, cdd, hamap, pirsf, prints, etc.')])

  • go_term (Annotated[Optional[str], Field(description="GO term filter (e.g., 'GO:0006122')")])

  • species_filter (Annotated[Optional[str], Field(description="Taxonomy ID filter (e.g., '9606')")])

  • page_size (Annotated[int, Field(description='Results per page (max 200)')])