biolink / ontobio

python library for working with ontologies and ontology associations
https://ontobio.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
119 stars 30 forks source link

Ontology.merge copies logical defs and property chain axioms #505

Closed dustine32 closed 3 years ago

dustine32 commented 3 years ago

For issue #504.

dustine32 commented 3 years ago

@cmungall Can you check out this PR to see if it makes sense?

It's code to pull all logical definitions and property chain axioms from ontology_b when doing ontology_a.merge(ontology_b). Or for my use case:

ontology = go_ontology.merge(ro_ontology)

This single "super"-ontology is then used by gocamgen in places like: https://github.com/biolink/ontobio/blob/af847c277cc33094972993e1aaa58ce7f9639ea9/ontobio/rdfgen/gocamgen/gocamgen.py#L753

dougli1sqrd commented 3 years ago

Tagging @kltm