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

Run GO rule 20 (obsolete term repair) before GO rule 28 (term aspect check) #576

Open dustine32 opened 3 years ago

dustine32 commented 3 years ago

Originating from https://github.com/geneontology/pipeline/issues/242#issuecomment-861114921.

Use case here is converting a GPAD, which lacks aspect column, into GAF. For most annotations the null aspect is correctly filled in from the ontology term property hasOBONamespace. But this property is missing for obsolete terms (like GO:0044212), so the resulting GAF line will have a blank aspect column. To fix:

we want to aim to repair the obsoleted term (via GO rule 20) before attempting to extract the aspect in GO rule 28. This way the correct term (GO:0000976) is in place for aspect extraction.

So far, this reordering of rules just looks to involve moving up a few code lines in gpadparser.py. We may want to also do this in gafparser.py for consistency even though it's likely a non-issue for GAF inputs since the aspects are already explicitly set?

kltm commented 3 years ago

@dustine32 I guess this was a problem for https://github.com/geneontology/pipeline/issues/242 , right? Just to keep everybody at the same place, we can bump go-site master to 2.7.6 for ontobio and then have the test branches catch up there.

sierra-moxon commented 3 years ago

updated ZFIN branch and rerunning.