Manager

Manager for Bio2BEL InterPro.

class bio2bel_interpro.manager.Manager(*args, **kwargs)[source]

Protein-family and protein-domain memberships.

pathway_model

alias of bio2bel_interpro.models.Entry

pathway_model_identifier_column

The InterPro identifier

protein_model

alias of bio2bel_interpro.models.Protein

namespace_model

alias of bio2bel_interpro.models.Entry

is_populated() → bool[source]

Check if the database is already populated.

count_interpros() → int[source]

Count the number of InterPro entries in the database.

list_interpros() → List[bio2bel_interpro.models.Entry][source]

List the InterPro entries in the database.

count_annotations() → int[source]

Count the number of protein-interpro associations.

count_proteins() → int[source]

Count the number of protein entries in the database.

list_proteins() → List[bio2bel_interpro.models.Protein][source]

List the proteins in the database.

count_go_terms() → int[source]

Count the GO terms in the database.

summarize() → Mapping[str, int][source]

Summarize the database.

get_type_by_name(name: str) → Optional[bio2bel_interpro.models.Type][source]

Get an InterPro entry type by its name if it exists.

get_interpro_by_interpro_id(interpro_id: str) → Optional[bio2bel_interpro.models.Entry][source]

Get a InterPro entry by its identifier if it exists.

get_go_by_go_identifier(go_id: str) → Optional[bio2bel_interpro.models.GoTerm][source]

Get a GO term by its identifier if it exists.

get_or_create_interpro(interpro_id: str, **kwargs) → bio2bel_interpro.models.Entry[source]

Get an InterPro entry by its identifier if it exists, or create one.

get_or_create_go_term(go_id: str, name=None) → bio2bel_interpro.models.GoTerm[source]

Get a GO term by its identifier if it exists, or create one.

populate(entries_url: Optional[str] = None, tree_url: Optional[str] = None, go_mapping_path: Optional[str] = None, populate_proteins: bool = False, proteins_url: Optional[str] = None) → None[source]

Populate the database.

Parameters
  • entries_url (Optional[str]) –

  • tree_url (Optional[str]) –

  • go_mapping_path (Optional[str]) –

  • proteins_url (Optional[str]) –

get_interpro_by_name(name: str) → Optional[bio2bel_interpro.models.Entry][source]

Get an InterPro family by name, if exists.

enrich_proteins(graph: pybel.struct.graph.BELGraph)[source]

Find UniProt entries and annotates their InterPro entries.

enrich_interpros(graph: pybel.struct.graph.BELGraph)[source]

Find InterPro entries and annotates their proteins.

to_bel() → pybel.struct.graph.BELGraph[source]

Get the InterPro hierarchy and annotations as BEL.