pip install reasoner-transpiler
from reasoner_transpiler.cypher import get_query
qgraph = {
"nodes": {
"diabetes": {
"ids": ["MONDO:0005148"],
},
"phenotype": {
"categories": ["biolink:PhenotypicFeature"],
},
},
"edges": {
"has phenotype": {
"subject": "diabetes",
"predicates": ["biolink:has_phenotype"],
"object": "phenotype",
},
},
}
cypher = get_query(qgraph)
This package uses the Biolink Model Toolkit to access the Biolink Model. Optionally, choose a specific version of the Biolink Model with the environment variable BL_VERSION. Otherwise, the latest version used by the Biolink Model Toolkit will be used.
export BL_VERSION=4.1.6