Add deductive inference step
A few different categories
Trivial:
- owl:Symmetric. E.g.
a interacts-with b <=> b interacts-with a - owl:inverseOf. E.g.
a phosphorylates b <=> b phosphorylated a
"joins":
- property chains
- non-recursive horn rules
"closures"
- e.g. inferring
g1 expressed-in a2fromg1 expressed-in a1, a1 (subclass_of|part_of)* a2
There are two patterns for storing the results:
- new edges with provenance edge properties (to be aligned with what we do in e.g. robot)
- closure patterns
closure/golr pattern
Extend biolink to have 3 new properties:
- inferred_subject
- inferred_predicate
- inferred_object
Each of these would be a list
Any reading <<s p o >> would be valid where s in inf_S and p in inf_P and o in inf_O
These would all be inferred from standard rules, eg transitivity of subclass, property chains
the closure pattern is obviously more compact, and has proven to work well with monarch/go/etc
implementation: the trivial ones can be done via streaming in KGX
note: owlstar should be used here. if we have <<a part-of b>> interp allSome we do not have <<b has-part a>> interp allSome
once we get to more complex patterns we may want to explore using Arachne or a fast RL ABox reasoner (@balhoff ). However, having some level of inference would be preferable to none.
See also:
- https://github.com/biolink/biolink-model/issues/624
- https://github.com/biolink/biolink-model/issues/320
This would help with https://github.com/Knowledge-Graph-Hub/kg-covid-19/issues/328
Glad to help implement this
linkml datalog or arachne downstream of KGX.