Search code examples
ontology

How to retrieve database cross references linked to definitions in OBO ontologies using ROBOT?


Some entities in OBO ontologies are documented with a database_cross_reference --> PMID as reference for an entry. For example, https://ontobee.org/ontology/CL?iri=http://purl.obolibrary.org/obo/CL_0000742 has the definition A round chondrocyte that first differentiates in the late embryonic growth plate of bone. [database_cross_reference: PMID:15951842]

I am currently using the following snippet to retrieve a table of entities in an ontology:

robot export --input data/$1.owl \
  --header "ID|LABEL|IAO_0000115|hasDbXref|subClassOf [ID]" \
  --export data/$1.csv

Is there a way to also retrieve these cross references linked to definitions? In the .owl file it looks like:

<owl:Axiom>
        <owl:annotatedSource rdf:resource="http://purl.obolibrary.org/obo/CL_0000742"/>
        <owl:annotatedProperty rdf:resource="http://purl.obolibrary.org/obo/IAO_0000115"/>
        <owl:annotatedTarget rdf:datatype="http://www.w3.org/2001/XMLSchema#string">A round chondrocyte that first differentiates in the late embryonic growth plate of bone.</owl:annotatedTarget>
        <oboInOwl:hasDbXref rdf:datatype="http://www.w3.org/2001/XMLSchema#string">PMID:15951842</oboInOwl:hasDbXref>
    </owl:Axiom>

Solution

  • ROBOT doesn't support retrieval of axiom annotations using the export command, so the only way to do this in ROBOT is with a custom SPARQL query over the OWL reification model, as this is the way cross references linked to definitions are stored in the Cell Ontology (CL) and many other ontologies.

    Note that other ontologies such as the Ontology of Biomedical Investigations (OBI) do this in a different way, using a plain entity annotation, this is retrievable using ROBOT export. Always remember that ontologies use annotations in a heterogeneous fashion, so approaches that work on one may not work on another (see this issue for context and discussion of unifying these styles).

    If you are willing to consider a different approach, OAK can be used to retrieve definitions alongside axiom annotations, bridging across the different modeling styles in different ontologies, see this example.