Bio2BEL GO

Bio2BEL GO.

Enrichment

Manager for Bio2BEL GO.

bio2bel_go.manager.add_parents(go, identifier: str, graph: pybel.struct.graph.BELGraph, child: pybel.dsl.node_classes.BaseEntity)[source]

Add parents to the network.

Parameters:
  • go – GO Network
  • identifier – GO Identifier of the child
  • graph – A BEL graph
  • child – A BEL node
bio2bel_go.manager.normalize_go_id(identifier: str) → str[source]

If a GO term does not start with the GO: prefix, add it.

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

Biological process multi-hierarchy.

namespace_model

alias of bio2bel_go.models.Term

is_populated() → bool[source]

Check if the database is already populated.

get_term_by_id(go_id: str) → Optional[bio2bel_go.models.Term][source]

Get a GO entry by its identifier.

get_term_by_name(name: str) → Optional[bio2bel_go.models.Term][source]

Get a GO entry by name.

populate(path=None, force_download=False) → None[source]

Populate the database.

Parameters:
  • path – Path to the GO OBO file
  • force_download
count_terms() → int[source]

Count the number of entries in GO.

count_synonyms() → int[source]

Count the number of synonyms in GO.

count_hierarchies() → int[source]

Count the number of synonyms in GO.

list_hierarchies() → List[bio2bel_go.models.Hierarchy][source]

List hierarchy entries.

count_annotations() → int[source]

Count the number of annotations.

list_annotations() → List[bio2bel_go.models.Annotation][source]

List annotation entries.

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

Return a summary dictionary over the content of the database.

lookup_term(node: pybel.dsl.node_classes.BaseEntity) → Optional[bio2bel_go.models.Term][source]

Guess the identifier from a PyBEL node data dictionary.

iter_terms(graph: pybel.struct.graph.BELGraph, use_tqdm: bool = False) → Iterable[Tuple[pybel.dsl.node_classes.BaseEntity, bio2bel_go.models.Term]][source]

Iterate over nodes in the graph that can be looked up.

normalize_terms(graph: pybel.struct.graph.BELGraph, use_tqdm: bool = False) → None[source]

Add identifiers to all GO terms.

enrich_bioprocesses(graph: pybel.struct.graph.BELGraph, use_tqdm: bool = False) → None[source]

Enrich a BEL graph’s biological processes.

get_release_date() → str[source]

Convert the OBO release date to a ISO 8601 version.

Example: ‘releases/2017-03-26’

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

Convert Gene Ontology to BEL, with given strategies.

Constants

Constants for Bio2BEL GO.

bio2bel_go.constants.GO_OBO_URL = 'http://purl.obolibrary.org/obo/go/go-basic.obo'

The web location of the GO OBO file

bio2bel_go.constants.GO_OBO_PATH = '/home/docs/.bio2bel/go/go-basic.obo'

The local cache location where the GO OBO file is stored

bio2bel_go.constants.GO_OBO_PICKLE_PATH = '/home/docs/.bio2bel/go/go-basic.obo.gpickle'

The local cache location where the parsed and pickled GO OBO file is stored

bio2bel_go.constants.GAF_COLUMNS = ['db', 'db_id', 'db_symbol', 'qualifier', 'go_id', 'provenance', 'evidence_code', 'modifications', 'aspect', 'db_label', 'db_synonym', 'db_type', 'taxonomy_id', 'date', 'assigned_by', 'annotation_extensions', 'gene_product_id']

GAF columns, see: http://geneontology.org/docs/go-annotation-file-gaf-format-2.1/

Indices and tables