Models

KEGG database models.

class bio2bel_kegg.models.Pathway(**kwargs)[source]

Pathway Table.

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.

kegg_id

KEGG id of the pathway

name

pathway name

serialize_to_pathway_node() → pybel.dsl.node_classes.BiologicalProcess[source]

Serialize to PyBEL node data dictionary.

get_gene_set() → Set[bio2bel_kegg.models.Protein][source]

Return the genes associated with the pathway (gene set).

Note this function restricts to HGNC symbols genes.

property resource_id

Return kegg identifier.

property url

Return url pointing to kegg pathway.

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

Genes Table.

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.

kegg_id

KEGG id of the protein

uniprot_id

uniprot id of the protein (there could be more than one)

hgnc_id

hgnc id of the protein

hgnc_symbol

hgnc symbol of the protein

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

Serialize to PyBEL node data dictionary.

get_uniprot_ids() → Optional[List[str]][source]

Return a list of uniprot ids.

get_pathways_ids() → Set[str][source]

Return the pathways associated with the protein.