owlcollab / oboformat

Automatically exported from code.google.com/p/oboformat
5 stars 2 forks source link

Question about using terms from external obo ontologies #118

Closed fanavarro closed 5 years ago

fanavarro commented 5 years ago

Hi all, I am dealing with a problem in obo regarding the use of external terms. In my case, I have an ontology that contains upper level terms, on one hand, and another ontology that has more concrete terms, on the other hand. I will show this situation with the following taxonomic example:

image

In this example Ontology A contains the upper elements of a taxonomic hierarchy, which includes from Animalia to Primate and Carnivora. Then, I have Ontology B keeping the hierarchy for primates and Ontology B keeping the hierarchy for carnivora.

According this scenario, how can I specify that Hominide is a Primate and Canidae is a Carnivora? Should exist the terms Primate and Carnivora in Ontology B and C, respectively, in order to add the is-a relationship from Hominide to Primate and from Canidae to Carnivora? Could I write is-a relations to terms that are not included in the current ontology?

I know that in RDF you only have to include the triple hild owl:subClassOf parent and parent could not be present, but I am not sure about obo.

I would like to be as obo compliant as I can.

Thanks for your time, Francisco Abad.

althonos commented 5 years ago

According this scenario, how can I specify that Hominide is a Primate and Canidae is a Carnivora? Should exist the terms Primate and Carnivora in Ontology B and C, respectively, in order to add the is-a relationship from Hominide to Primate and from Canidae to Carnivora

The easiest way would be to add A as an import in B and C, this way your B or C ontology would be aware of the extern terms from A.

Could I write is-a relations to terms that are not included in the current ontology?

Yes you can, but you have to make sure the identifiers resolve correctly. For instance, if you have ontology A in http://example.com/a and ontology B in http://example.com/b, you'd add the following to your ontology B:

[Term]
id: http://example.com/b#Hominide
is_a: http://example.com/a#Primate

Or, with an ID space to avoid repeating yourself:

idspace: B http://example.com/b#
idspace: A http://example.com/a#

[Term]
id: B:Hominide
is_a: A:Primate
fanavarro commented 5 years ago

Thanks for your answer, @althonos. I think I get it now.

Regards.