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_versions()
Available versions ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━━┳━━━━━━━┓ ┃ Ontology ┃ URL ┃ Bion… ┃ Datab… ┃ All … ┃ ┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━━╇━━━━━━━┩ │ Ensembl │ https://www.ensembl.org/index.html │ Spec… │ ensem… │ rele… │ │ │ │ │ │ │ │ Ensembl │ https://www.ensembl.org/index.html │ Gene │ ensem… │ rele… │ │ │ │ │ │ │ │ Ensembl │ https://www.ensembl.org/index.html │ Gene │ ensem… │ rele… │ │ │ │ │ │ rele… │ │ │ │ │ │ │ │ Uniprot │ https://www.uniprot.org/ │ Prot… │ unipr… │ 2022… │ │ │ │ │ │ │ │ Uniprot │ https://www.uniprot.org/ │ Prot… │ unipr… │ 2022… │ │ │ │ │ │ 2022… │ │ │ │ │ │ │ │ CellMarker │ http://bio-bigdata.hrbmu.edu.cn/CellMarker/ │ Cell… │ cellm… │ 2.0 │ │ │ │ │ │ │ │ Cell Line Ontology │ https://bioportal.bioontology.org/ontologies/CLO │ Cell… │ clo │ 2022… │ │ │ │ │ │ │ │ Cell Ontology │ https://obophenotype.github.io/cell-ontology/ │ Cell… │ cl │ 2023… │ │ │ │ │ │ │ │ Cell Ontology │ https://obophenotype.github.io/cell-ontology/ │ Cell… │ cl │ 2023… │ │ │ │ │ │ 2022… │ │ │ │ │ │ │ │ Human Cell Atlas Ontology │ https://github.com/HumanCellAtlas/ontology │ Cell… │ ca │ 2022… │ │ │ │ │ │ │ │ Uberon multi-species anatomy … │ http://obophenotype.github.io/uberon/ │ Tiss… │ uberon │ 2023… │ │ │ │ │ │ │ │ Uberon multi-species anatomy … │ http://obophenotype.github.io/uberon/ │ Tiss… │ uberon │ 2023… │ │ │ │ │ │ 2022… │ │ │ │ │ │ │ │ Mondo Disease Ontology │ https://mondo.monarchinitiative.org/ │ Dise… │ mondo │ 2023… │ │ │ │ │ │ │ │ Mondo Disease Ontology │ https://mondo.monarchinitiative.org/ │ Dise… │ mondo │ 2023… │ │ │ │ │ │ 2022… │ │ │ │ │ │ │ │ Human Disease Ontology │ https://disease-ontology.org/ │ Dise… │ doid │ 2023… │ │ │ │ │ │ │ │ The Experimental Factor Ontol… │ https://bioportal.bioontology.org/ontologies/EFO │ Read… │ efo │ 3.48… │ │ │ │ │ │ │ │ Human Phenotype Ontology │ https://hpo.jax.org/ │ Phen… │ hp │ 2023… │ │ │ │ │ │ │ │ Pathway Ontology │ https://www.ebi.ac.uk/ols/ontologies/pw │ Path… │ pw │ 7.78 │ │ │ │ │ │ │ │ Pathway Ontology │ https://www.ebi.ac.uk/ols/ontologies/pw │ Path… │ pw │ 7.78 │ │ │ │ │ │ 7.74 │ │ │ │ │ │ │ │ Bioinformatics Pipeline │ https://lamin.ai │ BFXP… │ lamin │ 1.0.0 │ │ │ │ │ │ │ │ Drug Ontology │ https://bioportal.bioontology.org/ontologies/DRON/?p… │ Drug │ dron │ 2023… │ │ │ │ │ │ │ └────────────────────────────────┴───────────────────────────────────────────────────────┴───────┴────────┴───────┘
The currently used versions can be shown with:
bt.display_active_versions()
Currently used versions in ._current.yaml ┏━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━┓ ┃ Bionty class ┃ Database ┃ Version ┃ ┡━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━┩ │ Species │ ensembl │ release-108 │ │ Gene │ ensembl │ release-108 │ │ Protein │ uniprot │ 2022-04 │ │ CellMarker │ cellmarker │ 2.0 │ │ CellLine │ clo │ 2022-03-21 │ │ CellType │ cl │ 2023-02-15 │ │ Tissue │ uberon │ 2023-02-14 │ │ Disease │ mondo │ 2023-02-06 │ │ Readout │ efo │ 3.48.0 │ │ Phenotype │ hp │ 2023-01-27 │ │ Pathway │ pw │ 7.78 │ │ BFXPipeline │ lamin │ 1.0.0 │ │ Drug │ dron │ 2023-03-10 │ └──────────────┴────────────┴─────────────┘
Cell Type#
Here we look at cell type as an example:
ct = bt.CellType()
df = ct.df()
df.head()
name | definition | synonyms | children | |
---|---|---|---|---|
ontology_id | ||||
CL:0000000 | cell | A Material Entity Of Anatomical Origin (Part O... | None | [CL:0001034, CL:0000003, CL:0001061] |
CL:0000001 | primary cultured cell | A Cultured Cell That Is Freshly Isolated From ... | primary cell culture cell|unpassaged cultured ... | [] |
CL:0000003 | native cell | A Cell That Is Found In A Natural Setting, Whi... | None | [CL:0000039, CL:0000325, CL:0011115, CL:000021... |
CL:0000005 | fibroblast neural crest derived | Any Fibroblast That Is Deriived From The Neura... | None | [] |
CL:0000006 | neuronal receptor cell | None | neuronal receptor cell (sensu Animalia) | [CL:0000204, CL:0000376, CL:1000082, CL:000021... |
again you may look up the vocabulary using .lookup by tab completion
lookup = bt.CellType().lookup()
lookup.astrocyte
cell_type(ontology_id='CL:0000127', name='astrocyte', definition="A Class Of Large Neuroglial (Macroglial) Cells In The Central Nervous System - The Largest And Most Numerous Neuroglial Cells In The Brain And Spinal Cord. Astrocytes (From 'Star' Cells) Are Irregularly Shaped With Many Long Processes, Including Those With 'End Feet' Which Form The Glial (Limiting) Membrane And Directly And Indirectly Contribute To The Blood-Brain Barrier. They Regulate The Extracellular Ionic And Chemical Environment, And 'Reactive Astrocytes' (Along With Microglia) Respond To Injury.", synonyms='astrocytic glia', children=array(['CL:0000683', 'CL:0002603', 'CL:0002605', 'CL:0012000',
'CL:0000645', 'CL:0002604', 'CL:0002626', 'CL:0002627',
'CL:0000644', 'CL:0002606'], dtype=object))
lookup.astrocyte.definition
"A Class Of Large Neuroglial (Macroglial) Cells In The Central Nervous System - The Largest And Most Numerous Neuroglial Cells In The Brain And Spinal Cord. Astrocytes (From 'Star' Cells) Are Irregularly Shaped With Many Long Processes, Including Those With 'End Feet' Which Form The Glial (Limiting) Membrane And Directly And Indirectly Contribute To The Blood-Brain Barrier. They Regulate The Extracellular Ionic And Chemical Environment, And 'Reactive Astrocytes' (Along With Microglia) Respond To Injury."
lookup.astrocyte.synonyms
'astrocytic glia'
lookup.astrocyte.children
array(['CL:0000683', 'CL:0002603', 'CL:0002605', 'CL:0012000',
'CL:0000645', 'CL:0002604', 'CL:0002626', 'CL:0002627',
'CL:0000644', 'CL:0002606'], dtype=object)
pronto Ontology object is accessible via as .ontology
pronto_ontology = ct.ontology
pronto_ontology
Ontology('/home/runner/work/bionty/bionty/.nox/build-package-bionty/lib/python3.9/site-packages/bionty/_dynamic/human___cl___2023-02-15___CellType', timeout=100)
tissue, disease, and phenotype work similary
Tissue#
tissue = bt.Tissue()
df = tissue.df()
df.head()
name | definition | synonyms | children | |
---|---|---|---|---|
ontology_id | ||||
UBERON:0000000 | processual entity | An Occurrent [Span:Occurrent] That Exists In T... | None | [UBERON:0000104, UBERON:0035943, UBERON:0000105] |
UBERON:0000002 | uterine cervix | Lower, Narrow Portion Of The Uterus Where It J... | neck of uterus|cervix uteri|caudal segment of ... | [] |
UBERON:0000003 | naris | Orifice Of The Olfactory System. The Naris Is ... | None | [UBERON:0010425, UBERON:0005928, UBERON:0005931] |
UBERON:0000004 | nose | The Olfactory Organ Of Vertebrates, Consisting... | peripheral olfactory organ|nasal sac|nose | [] |
UBERON:0000005 | chemosensory organ | None | chemosensory sensory organ | [UBERON:0003212] |
lookup = tissue.lookup()
lookup.kidney
tissue(ontology_id='UBERON:0002113', name='kidney', definition='A Paired Organ Of The Urinary Tract Which Has The Production Of Urine As Its Primary Function.', synonyms=None, children=array(['UBERON:0004538', 'UBERON:0000081', 'UBERON:0004539',
'UBERON:0000082', 'UBERON:0002120', 'UBERON:0000080'], dtype=object))
Disease#
disease = bt.Disease()
df = disease.df()
df.head()
name | definition | synonyms | children | |
---|---|---|---|---|
ontology_id | ||||
MONDO:0000001 | disease or disorder | A Disease Is A Disposition To Undergo Patholog... | medical condition|other disease|disorders|dise... | [MONDO:0100336, MONDO:0005583, MONDO:0700096] |
MONDO:0000004 | adrenocortical insufficiency | An Endocrine Or Hormonal Disorder That Occurs ... | hypocortisolemia|adrenal cortical insufficienc... | [MONDO:0043370, MONDO:0015129] |
MONDO:0000005 | alopecia, isolated | None | None | [MONDO:0007082, MONDO:0007184, MONDO:0010410, ... |
MONDO:0000009 | inherited bleeding disorder, platelet-type | None | bleeding disorder, platelet-type | [MONDO:0008552, MONDO:0012354, MONDO:0014078, ... |
MONDO:0000014 | colorblindness, partial | None | None | [MONDO:0010564] |
lookup = disease.lookup()
lookup.chronic_kidney_disease
disease(ontology_id='MONDO:0005300', name='chronic kidney disease', definition='Impairment Of The Renal Function Secondary To Chronic Kidney Damage Persisting For Three Or More Months.', synonyms='renal failure - chronic|chronic renal disease|kidney disease, chronic|CKD|chronic kidney disease|CKD - chronic kidney disease', children=array(['MONDO:0001184', 'MONDO:0004375', 'MONDO:0001110', 'MONDO:0005016',
'MONDO:0024327'], dtype=object))
Phenotype#
phenotype = bt.Phenotype()
df = phenotype.df()
df.head()
name | definition | synonyms | children | |
---|---|---|---|---|
ontology_id | ||||
HP:0000001 | All | None | None | [HP:0040279, HP:0012823, HP:0032443, HP:000011... |
HP:0000002 | Abnormality of body height | Deviation From The Norm Of Height With Respect... | Abnormality of body height | [HP:0004322, HP:0012772, HP:0000098] |
HP:0000003 | Multicystic kidney dysplasia | Multicystic Dysplasia Of The Kidney Is Charact... | Multicystic dysplastic kidney|Multicystic kidn... | [] |
HP:0000005 | Mode of inheritance | The Pattern In Which A Particular Genetic Trai... | Inheritance | [HP:0001442, HP:0034335, HP:0001426, HP:003434... |
HP:0000006 | Autosomal dominant inheritance | A Mode Of Inheritance That Is Observed For Tra... | monoallelic_autosomal|Autosomal dominant | [] |
lookup = phenotype.lookup()
lookup.Abnormal_blood_glucose_concentration
phenotype(ontology_id='HP:0011015', name='Abnormal blood glucose concentration', definition='An Abnormality Of The Concentration Of Glucose In The Blood.', synonyms='Abnormality of blood glucose concentration', children=array(['HP:0001943', 'HP:0003074'], dtype=object))
Readout#
Readout
parses Experimental Factor Ontology to the following additonal categories for describing biological experiments:
molecule
instrument
measurement
readout = bt.Readout()
df = readout.df()
df.head()
name | definition | synonyms | children | molecule | instrument | measurement | |
---|---|---|---|---|---|---|---|
ontology_id | |||||||
EFO:0011021 | BRCA1 mutation carier status | Determination Of The Presence Or Absence Of Kn... | BRCA1 carrier status|BRCA1 mutation status | [] | None | None | carrier status |
EFO:0011022 | BRCA2 mutation carier statu | Determination Of The Presence Or Absence Of Kn... | BRCA2 carrier status|BRCA2 mutation status | [] | None | None | carrier status |
EFO:0700000 | spatial proteomics | An Assay That Allows For Visualization And Qua... | None | [EFO:0700001, EFO:0700002] | protein assay | None | None |
EFO:0700001 | PhenoCycler-Fusion | A Spatial Discovery System Where Whole-Slide S... | None | [] | protein assay | None | None |
EFO:0700002 | PhenoCycler | An Automated Fluidics System That Uses Oligonu... | None | [] | protein assay | None | None |
lookup = readout.lookup()
Look up a molecular readout:
lookup.single_cell_RNA_sequencing
readout(ontology_id='EFO:0008913', name='single-cell RNA sequencing', definition='A Protocol That Provides The Expression Profiles Of Single Cells Via The Isolation And Barcoding Of Single Cells And Their Rna, Reverse Transcription, Amplification, Library Generation And Sequencing.', synonyms='single-cell RNA-seq|single cell RNA sequencing|scRNA-seq|single-cell transcriptome sequencing', children=array(['EFO:0008441', 'EFO:0030059', 'EFO:0005684', 'EFO:0700003',
'EFO:0008440', 'EFO:0700004', 'EFO:0030060', 'EFO:0005685'],
dtype=object), molecule='RNA assay', instrument='single cell sequencing', measurement=None)
Lookup a phenotypic readout:
lookup.tumor_size
readout(ontology_id='EFO:0004134', name='tumor size', definition='The Physical Size Of A Tumor.', synonyms='size of tumor', children=array([], dtype=object), molecule=None, instrument=None, measurement='tumor size')