Stars Coverage pypi


Public biological ontologies for data scientists: look up, search, inspect, validate, and standardize terms.

To make it easy to customize and extend ontologies in a simple database backend, Bionty plugs into LaminDB: see this guide.


Check out sources.yaml for details.

Didn’t see your favorite source or version? Bionty is extendable!


Bionty is a Python package available for pyversions

pip install bionty

Usage overview & quickstart#

import bionty as bt

Look up terms with auto-complete#

lookup = bt.ExperimentalFactor().lookup()
# access via Python-friendly keys

# access via dictionary
lookup_dict = lookup.dict()
lookup_dict["single-cell RNA sequencing"]

Search ontology terms#

celltype_bionty = bt.CellType()
# Free text search against a field"gamma delta T cell")

Validate, inspect & standardize terms#

gene_bionty = bt.Gene()
# Validate against a field of reference
gene_bionty.validate(["A1BG", "FANCD1"], gene_bionty.symbol)
# Run full inspection on the gene symbols
gene_bionty.inspect(["A1BG", "FANCD1"], gene_bionty.symbol)
# Convert synonyms to standardized gene symbols
gene_bionty.standardize(["A1BG", "FANCD1"])

Access a reference DataFrame#

# Reference table of the human genes
df = bt.Gene(species="human").df()

Track ontology sources#

# Display currently used sources

# Display all managed sources

# Local yaml file specifying all managed sources

# Access to the Mondo ontology
disease = bt.Disease(source="mondo")

# Access to the Human Disease ontology
disease = bt.Disease(source="doid", version="2023-01-30")