- class biocypher._translate.Translator(ontology: Ontology, strict_mode: bool = False)
Class responsible for exacting the translation process that is configured in the schema_config.yaml file. Creates a mapping dictionary from that file, and, given nodes and edges, translates them into BioCypherNodes and BioCypherEdges. During this process, can also filter the properties of the entities if the schema_config.yaml file specifies a property whitelist or blacklist.
Provides utility functions for translating between input and output labels and cypher queries.
- __init__(ontology: Ontology, strict_mode: bool = False)
leaves – Dictionary detailing the leaves of the hierarchy tree representing the structure of the graph; the leaves are the entities that will be direct components of the graph, while the intermediary nodes are additional labels for filtering purposes.
strict_mode – If True, the translator will raise an error if input data do not carry source, licence, and version information.
- param leaves:
Dictionary detailing the leaves of the hierarchy
Returns a dictionary of types that were not represented in the schema_config.
Converts a name in sentence case to pascal case.
Reverse translate a cypher query.
Reverse translate a single term.
Translate a cypher query.
Translates input edge representation to a representation that conforms to the schema of the given BioCypher graph.
Translates input node representation to a representation that conforms to the schema of the given BioCypher graph.
Translate a single term.