This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Getting All Instances Of An Ontology Class In R

I have been exploring the R ontoCAT package from Bioconductor (http://www.bioconductor.org/packages/release/bioc/html/ontoCAT.html), but I noticed that there is no method for getting all of the instances of an ontology class.

Is there an R package that does this?

r ontology

1 answer

I'm not sure what you mean with instance.

As far as I understand, this package 'only' handles an ontology ( a graph of classes) but it is not designed to create some instances (e.g: http://en.wikipedia.org/wiki/Charles_Darwin is an instanceOf the class 'MY_ONTOLOGY:Human' )

If you only want to find all the terms in the ontology, the documentation says:

To find all ontology terms two functions can be used: getAllTerms

  • returns a list of OntologyTerm objects.

In turn, getAllTermIds

  • returns a list of term accessions.

> getAllTerms(biotop)

> getAllTermIds(efo)

Yes, this is what I have come to realize. Just surprised that there isn't a function for handling instances...

Log in to answer this question.