About
OntoWeaver is a tool for importing table data in Semantic Knowledge Graphs (SKG) databases and ontologies.
OntoWeaver allows writing a simple declarative mapping to express how columns from a Pandas table are to be converted as typed nodes or edges in an SKG.
It provides a simple layer of abstraction on top of Biocypher, which remains responsible for doing the ontology alignment, supporting several graph database backends, and allowing reproducible & configurable builds.
With OntoWeaver, you just have to express a mapping in YAML, looking like:
row: # The meaning of an entry in the input table.
map:
column: cohort_code
to_subject: patient
transformers: # How to map cells to nodes and edges.
- map: # Map a column to a node.
column: cancer_type
to_object: disease
via_relation: has_disease
- map: # Map a column to a property.
column: patinet_age
to_property: age
for_object: patient
metadata: # Optional properties added to every node and edge.
- source: "My OntoWeaver adapter"
- version: "v1.2.3"
And you can easily have a graph looking like: