obo-relations icon indicating copy to clipboard operation
obo-relations copied to clipboard

Content negotiation for RO terms fails, allways redirects to OLS? no RDF support?

Open JervenBolleman opened this issue 10 months ago • 6 comments

curl -L --header "accept: text/turtle" 'http://purl.obolibrary.org/obo/RO_0001015'
curl -L --header "accept:application/rdf+xml" 'http://purl.obolibrary.org/obo/RO_0001015'

Give HTML view only, is this intentional or accidental or am I using a non supported mimetype?

JervenBolleman avatar Mar 13 '25 09:03 JervenBolleman

@JervenBolleman thanks for reaching out!

We have long since given up on the idea of obo wide content negotiation support; many ontologies redirect to ols or some custom site and don't support that anymore.

Out of curiosity- how were you using content negotiation in practice? I had heard of the idea but never seen an application actually making use.

matentzn avatar Mar 13 '25 10:03 matentzn

I just wanted the RDF content for a few terms so that I could quickly use it to get the "names" per identifier. With the aim of making some other RDF more readable on the fly by introducing prefixes.

@base <http://model.geneontology.org/>
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix GO:  <http://purl.obolibrary.org/obo/GO_> .
@prefix ro.enabled_by:  <http://purl.obolibrary.org/obo/RO_0002333> .
@prefix ro.provides_input_for: <http://purl.obolibrary.org/obo/RO_0002413> .
@prefix bfo.has_part:  <http://purl.obolibrary.org/obo/BFO_0000051> .
@prefix bfo.occurs_in:  <http://purl.obolibrary.org/obo/BFO_0000066> 


<67b1629100002167/67b1629100002207>
        a                       owl:NamedIndividual , GO:0047499;
        bfo.part_of:            <67b1629100002167/67b1629100002209>;
        bfo.occurs_in:          <67b1629100002167/67b1629100002210>;
        ro.enabled_by:          <67b1629100002167/67b1629100002208>;
        ro.provides_input_for:  <67b1629100002167/67b1629100002227>;

And not need to find and download each of these ontology files by hand.

The above is a lot easier to debug than:

<http://model.geneontology.org/67b1629100002167/67b1629100002207> <http://purl.obolibrary.org/obo/RO_0002333> <http://model.geneontology.org/67b1629100002167/67b1629100002208> ;
        <http://purl.obolibrary.org/obo/BFO_0000050> <http://model.geneontology.org/67b1629100002167/67b1629100002209> ;
        <http://purl.obolibrary.org/obo/BFO_0000066> <http://model.geneontology.org/67b1629100002167/67b1629100002210> ;
        <http://purl.obolibrary.org/obo/RO_0002413> <http://model.geneontology.org/67b1629100002167/67b1629100002227> ;
        a <http://www.w3.org/2002/07/owl#NamedIndividual> , <http://purl.obolibrary.org/obo/GO_0047499> ;

JervenBolleman avatar Mar 13 '25 11:03 JervenBolleman

I see, I think it would be feasible to add this for the ontologies that are maintained on github and are willing to enable a github action.

When I have a bit of time I will think about building such an action and how that should work with the obofoundry purl software.

JervenBolleman avatar Mar 13 '25 12:03 JervenBolleman

A premade prefix block for RO relations like shown above would be an interesting resource to have access to.

balhoff avatar Mar 13 '25 16:03 balhoff

@balhoff I think we can make something obofoundry wide.

JervenBolleman avatar Mar 13 '25 17:03 JervenBolleman

For ontology namespaces, we do have files like these already: https://github.com/OBOFoundry/OBOFoundry.github.io/blob/master/registry/obo_context.jsonld

balhoff avatar Mar 13 '25 17:03 balhoff