Access ontologies: cell type, tissue, disease, phenotype#
When it comes to ontology defined vocabularies, such as cell type, tissue, disease, and phenotype, the entity class extends to have the ontology accessible via {entity}.ontology
import bionty as bt
All available ontologies and their versions can be printed with:
bt.display_available_sources()
The currently used versions can be shown with:
bt.display_currently_used_sources()
Cell Type#
Here we look at cell type as an example:
cell_type_bionty = bt.CellType()
df = cell_type_bionty.df()
df.head()
again you may look up the vocabulary using .lookup by tab completion
cell_type_bionty_lookup = bt.CellType().lookup()
cell_type_bionty_lookup.astrocyte
cell_type_bionty_lookup.astrocyte.definition
cell_type_bionty_lookup.astrocyte.synonyms
cell_type_bionty_lookup.astrocyte.children
pronto Ontology object is accessible via as .ontology
pronto_ontology = cell_type_bionty.ontology
pronto_ontology
tissue, disease, and phenotype work similary
Tissue#
tissue_bionty = bt.Tissue()
df = tissue_bionty.df()
df.head()
tissue_bionty_lookup = tissue_bionty.lookup()
tissue_bionty_lookup.kidney
Disease#
disease_bionty = bt.Disease()
df = disease_bionty.df()
df.head()
disease_bionty_lookup = disease_bionty.lookup()
disease_bionty_lookup.chronic_kidney_disease
Phenotype#
phenotype_bionty = bt.Phenotype()
df = phenotype_bionty.df()
df.head()
phenotype_bionty_lookup = phenotype_bionty.lookup()
phenotype_bionty_lookup.Abnormal_blood_glucose_concentration
Readout#
Readout
parses Experimental Factor Ontology to the following additonal categories for describing biological experiments:
molecule
instrument
measurement
readout_bionty = bt.Readout()
df = readout_bionty.df()
df.head()
readout_bionty_lookup = readout_bionty.lookup()
Look up a molecular readout:
readout_bionty_lookup.single_cell_RNA_sequencing
Lookup a phenotypic readout:
readout_bionty_lookup.tumor_size