Bio2BEL InterPro

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.

Models

SQLAlchemy database models for Bio2BEL InterPro.

class bio2bel_interpro.models.Type(**kwargs)[source]

InterPro Entry Type.

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

name

The InterPro entry type

class bio2bel_interpro.models.Protein(**kwargs)[source]

Represents proteins that are annotated to InterPro families.

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

uniprot_id

UniProt identifier

as_bel() → pybel.dsl.node_classes.Protein[source]

Return this protein as a PyBEL node.

class bio2bel_interpro.models.GoTerm(**kwargs)[source]

Represents a GO term.

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

go_id

Gene Ontology identifier

name

Label

class bio2bel_interpro.models.Entry(**kwargs)[source]

Represents families, domains, etc. in InterPro.

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

interpro_id

The InterPro identifier

name

The InterPro entry name

as_bel() → pybel.dsl.node_classes.Protein[source]

Return this InterPro entry as a PyBEL node.

class bio2bel_interpro.models.Annotation(**kwargs)[source]

Mapping of InterPro to protein.

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

start

Starting position on reference sequence of annotation

end

Ending position on reference sequence of annotation

Indices and tables