INDRA BioOntology (indra.ontology.bio_ontology)¶
Module containing the implementation of an IndraOntology for the general biology use case.
-
class
indra.ontology.bio.BioOntology[source]¶ Represents the ontology used for biology applications.
-
initialize(rebuild=False)[source]¶ Initialize the ontology by adding nodes and edges.
By convention, ontologies are implemented such that the constructor does not add all the nodes and edges, which can take a long time. This function is called automatically when any of the user-facing methods ot IndraOntology is called. This way, the ontology is only fully constructed if it is used.
-
-
class
indra.ontology.bio.ontology.BioOntology[source]¶ Represents the ontology used for biology applications.
-
initialize(rebuild=False)[source]¶ Initialize the ontology by adding nodes and edges.
By convention, ontologies are implemented such that the constructor does not add all the nodes and edges, which can take a long time. This function is called automatically when any of the user-facing methods ot IndraOntology is called. This way, the ontology is only fully constructed if it is used.
-
Generating and caching the BioOntology¶
The BioOntology is built and cached automatically during runtime. If a cached version already exists, it is loaded from the cache.
To control the build and clean up caches if necessary, one can call
python -m indra.ontology.bio <operation>
to build or clean up the INDRA bio ontology. The script takes a single operation argument which can be as follows:
- build: build the ontology and cache it
- clean: delete the current version of the ontology from the cache
- clean-old: delete all versions of the ontology except the current one
- clean-all: delete all versions of the bio ontology from the cache