nfdi4plants/ARCtrl

[BUG] Broken EFO links due to wrong IRI generation

Closed this issue · 4 comments

Describe the bug
All EFO links seem to be broken and don't lead anywhere.

To Reproduce
Steps to reproduce the behavior:

  1. Open https://swate-alpha.nfdi4plants.org/
  2. Go to the ontology term search
  3. type in "efo"
  4. click the link of the first suggestion "EFO-27" (EFO:0006571)
    (check screenshot 1)

Expected behavior
I expected to be redirected to the entry in OLS4 (as this is the correct target redirect). Here, at the top you can see what the correct IRI should look like (check screenshot 2). This IRI is not based on http://purl.obolibrary.org/obo/ but rather on different persistent identifiers: http://www.ebi.ac.uk/efo/ . Since all ontologies we import are automatically rendered using the obolibrary IRI, this needs to be adjusted manually for this specific ontology. As far as I know this is handled here:

[<LiteralAttribute>]

A full example of how the IRIs for EFO need to be written is this:
out IRI: http://purl.obolibrary.org/obo/EFO_0006571
correct IRI: http://www.ebi.ac.uk/efo/EFO_0006571

Screenshots
grafik
Screenshot 1
grafik
Screenshot 2

OS and framework information (please complete the following information):

  • OS: Ubuntu 22.04 LTS

Additional informatioln
This issue is, to some degree, related to the issue #352 .

Hey @Hannah-Doerpholz, thanks for your input 👍

I think I already know where this issue comes from but it might be a bit tricky to fix. Will let you know when I get to it.

I've looked a bit into this and I think this is something that in the specific case you mentioned, this needs to be fixed in SWATE, not ARCtrl.

let oa = OntologyAnnotation(tan = "http://www.ebi.ac.uk/efo/EFO_0006571")

oa.TermAccessionNumber // http://www.ebi.ac.uk/efo/EFO_0006571
oa.TermAccessionOntobeeUrl // http://purl.obolibrary.org/obo/EFO_0006571
oa.TermAccessionAndOntobeeUrlIfShort // http://www.ebi.ac.uk/efo/EFO_0006571

Looking at the example above, using the TermAccessionAndOntobeeUrlIfShort property should suffice to retrieve the correct address of the object.


A little bit more difficult would be the case when the term was used as a header in a Table. Here you would only be left with the short-hand accession (EFO:0006571)

oa.TermAccessionShort // EFO:0006571

For this to be translated back to the correct URL, I only see hardcoding as a solution.


What do you think, @Freymaurer? Transfer to SWATE?

The thing is: Swate does not use any urls as TAN in the model. It just adds EFO:0006571. The link on the other hand is created using oa.TermAccessionAndOntobeeUrlIfShort or something similiar. So i need to match ontologies and decide which link to use. This should also be the case for DPBO (not sure tough).

Now i thought it would be good to have a generalized logic to know which ontology uses which url-prefix, thats why i wanted this issue in ARCtrl.

Something like oa.AsRefURL, then match tan-local-space to "EFO" and use the correct link.

It would be the same for DPBO. I have to check if any other ontologies are also affected and use something other than the purl.obolibrary url-prefixes.