In [4]:
from ontobio.ontol_factory import OntologyFactory
ofactory = OntologyFactory()
ont = ofactory.create("pato") ## Connect remotely to PATO over SPARQL
##
## Note: Jupyter may show '*' to indicate kernel busy while this is being
## fetched - should only take a few seconds. Wait before proceeding
In [6]:
cls = ont.node('PATO:0001374')
cls
Out[6]:
In [12]:
ancs = ont.descendants('PATO:0001374')
ancs
Out[12]:
In [14]:
["{} '{}'".format(x, ont.label(x)) for x in ont.descendants('PATO:0001374')]
Out[14]:
In [15]:
ont.subsets() ## Issues remote call; Jupyter may show '*' for ~1s
Out[15]:
In [16]:
slim = ont.extract_subset('absent_slim') ## Issues remote call; Jupyter may show '*' for ~1s
In [18]:
["{} '{}'".format(x, ont.label(x)) for x in slim]
Out[18]:
In [ ]: