#!/usr/bin/env python # coding: utf-8 # 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 # In[12]: ancs = ont.descendants('PATO:0001374') ancs # In[14]: ["{} '{}'".format(x, ont.label(x)) for x in ont.descendants('PATO:0001374')] # In[15]: ont.subsets() ## Issues remote call; Jupyter may show '*' for ~1s # 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] # In[ ]: