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

GO-CAM translation should convert 'transports or maintains localization of' and other relations #613

Closed dustine32 closed 2 years ago

dustine32 commented 2 years ago

Originating from https://github.com/geneontology/go-ontology/issues/22721#issuecomment-1022371319. Specifically:

MOD imports - add new rule to convert 'transports or maintains localization of' , 'imports', 'exports' to 'has primary input' or 'has primary output' during import

This shakes down to, when emitting annotation extensions, converting these relations:

@vanaukenk @ukemi Are we going to be converting anything to "has primary output" (RO:0004008)? Feel free to edit above if needed.

dustine32 commented 2 years ago

Note to self: implementing this conversion/replacement just requires adding lines for "old_relation_label" -> "new_relation_CURIE" here: https://github.com/biolink/ontobio/blob/34924740c19fc92403ee1dcfa3e34c6725a276ec/ontobio/rdfgen/gocamgen/gocamgen.py#L68-L76 For example:

"transports_or_maintains_localization_of": "RO:0004009",

We also need to add relations exports, has_primary_input, and has_primary_output missing in relations.py lookup:

"exports": "http://purl.obolibrary.org/obo/RO_0002345",
"has_primary_input": "http://purl.obolibrary.org/obo/RO_0004009",
"has_primary_output": "http://purl.obolibrary.org/obo/RO_0004008",
dustine32 commented 2 years ago

As @vanaukenk referenced in a 2022-03-01 email, the PR https://github.com/geneontology/go-ontology/issues/22962 indicates that all three relations transports or maintains localization of, imports, and exports can be converted to has primary_input (RO:0004009). This is reflected in commit https://github.com/biolink/ontobio/commit/6c292715a03aa7fbc0e5d4dfd0d6343b8eeebd33.

dustine32 commented 2 years ago

This has been implemented and working in the MOD import to GO-CAM translations since late March.