SynBioDex / tyto

Use ontology terms in your Python application

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow relation checks via ontology object

jakebeal opened this issue · comments

Right now, one can do relationship checks (e.g. is_ancestor_of via either a term or an endpoint.
For example:

# By term:
SO.promoter.is_ancestor_of(SO.RNApol_III_promoter)
# By endpoint:
ancestors = EBIOntologyLookupService.get_ancestors(NCBITaxon, NCBITaxon.Escherichia_coli)
self.assertIn(NCBITaxon.Bacteria, ancestors)

It would be good to allow the intermediate as well, in which one checks against an ontology, which would allow things like this:

NCBITaxon.is_ancestor_of(taxon_uri_X, taxon_uri_Y)

May be related to #26