obo-behavior / behavior-ontology

Neuro Behaviour Ontology: an ontology for human and animal behaviour processes and behaviour phenotypes
25 stars 15 forks source link

treat-xrefs-as-equivalent #193

Closed DitchingIt closed 10 months ago

DitchingIt commented 10 months ago

@gouttegd pointed out recently on Slack that this notation treats entries as exact matches whether or not we want them to be. I am gradually introducing changes to cross referencing in parts of NBO, with skos:exactMatch being my preferred form of exact referencing.

Recently I noticed that our basic ontology information notes: treat-xrefs-as-equivalent GO

I am not comfortable assuming every GO Xref in NBO is an exact match. I suggest that we remove the general equivalence and only assert exact cross references case by case, using a skos:exactMatch annotation.

Assuming no disagreement, I don't know how to do this and would appreciate some advice @pmidford @sbello @matentzn @gouttegd

gouttegd commented 10 months ago

Related to this issue: I believe there is something wrong NBO’s GO xrefs.

There is only one such proper cross-reference: NBO:0000415 oboInOwl:hasDbXref "GO:0060082".

All the other “cross-references” to GO are using a oboInOwl:xref annotation property, which as far as I know is not correct and will be ignored by most tools (contrary to oboInOwl:hasDbXref).

DitchingIt commented 10 months ago
gouttegd commented 10 months ago

Do you have a solution which can convert all these incorrect annotation properties in one go?

For this kind of things, there’s hardly anything more efficient than a good old search-and-replace with any text editor you’re familiar with. Just replace any instance of oboInOwl:xref by oboInOwl:hasDbXref. The only caveat to be aware of is that you need to “re-serialise” the file with ROBOT afterwards.

To do everything on the command line:

sed 's/oboInOwl:xref/oboInOwl:hasDbXref/g' nbo-edit.owl > tmp.owl
robot convert -i tmp.owl -f ofn -o nbo-edit.owl
DitchingIt commented 10 months ago

@gouttegd Thanks. I have next to no experience of using the command line.

I'd be happier with the manual approach but would be grateful for a quick (and probably obvious) basic walk through including:

matentzn commented 10 months ago

Dealt with xref issue here: https://github.com/obo-behavior/behavior-ontology/pull/194

DitchingIt commented 10 months ago

@matentzn Is removing the treat-xrefs-as-equivalent statement just as easy? It only pointed to GO which I would rather specifiy on a case by case basis.

DitchingIt commented 10 months ago

Issues fixed by #194 and #197