biolink / ontobio

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

Convert relations to has_primary_input for #613 #617

Closed dustine32 closed 2 years ago

dustine32 commented 2 years ago

For #613.

kltm commented 2 years ago

Why are "transports_or_maintains_localization_of": "RO:0004009", and "has primary input": "http://purl.obolibrary.org/obo/RO_0004009", so different?

kltm commented 2 years ago

More discussion on ticket. Will merge.

dustine32 commented 2 years ago

@kltm Noting that the first line "transports_or_maintains_localization_of": "RO:0004009", is in a dictionary lookup used to transform relations to different relations, e.g. transports_or_maintains_localization_of -> has_primary_input, in a gocamgen annotation-to-model translation context. Whereas the second line "has primary input": "http://purl.obolibrary.org/obo/RO_0004009", is the dictionary lookup in ontobio used for storing the actual relation label -> CURIE data (essentially, a subset copy of RO). Adding these relations to the latter lookup green-lights their acceptance by the ontobio parsers/writers that use relations.py.

dustine32 commented 2 years ago

Linking to explanation about why both imports and exports are being converted to has_primary_input: https://github.com/biolink/ontobio/issues/613#issuecomment-1061204878