sfaira.versions.metadata.OntologyUberon.add_extension

OntologyUberon.add_extension(dict_ontology: Dict[str, List[Dict[str, dict]]])

Extend ontology by additional edges and nodes defined in a dictionary.

Checks that DAG is not broken after graph assembly.

Parameters

dict_ontology

Dictionary of nodes and edges to add to ontology. Parsing:

  • keys: parent nodes (which must be in ontology)

  • values: children nodes (which can be in ontology), must be given as a dictionary in which keys are

    ontology IDs and values are node values.. If these are in the ontology, an edge is added, otherwise, an edge and the node are added.

Returns