Skip to main content

Bionty: Data model generator for biology.

Project description

Stars Coverage pypi

Bionty: Basic biological entities

Access public & custom ontologies with auto-complete. Map synonyms with ease.

To manage in-house bioregistries along with ontologies, see lnschema_bionty.

Out-of-the-box ontologies

Check out sources.yaml for details.

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

Installation

Bionty is a Python package available for pyversions

pip install bionty

Look up ontology records with auto-complete

import bionty as bt

gene_bionty_lookup = bt.Gene().lookup()
gene_bionty_lookup.LNMA

Inspect & map identifiers

import bionty as bt

gene_bionty = bt.Gene()
# Inspect if the gene symbols are mappable onto the reference
gene_bionty.inspect(["A1BG", "FANCD1"], gene_bionty.symbol)
# Map synonyms of gene symbols
gene_bionty.map_synonyms(["A1BG", "FANCD1"], gene_bionty.symbol)

celltype_bionty = bt.CellType()
# Fuzzy string matching of a cell type name
celltype_bionty.fuzzy_match("gamma delta T cell", celltype_bionty.name)

Reference tables of ontologies

import bionty as bt

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

Track ontology sources

# Display currently used sources
bt.display_currently_used_sources()

# Display all managed sources
bt.display_available_sources()

# Local yaml file specifying all managed sources
bt.LOCAL_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")

Documentation

Read the docs.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bionty-0.20.0.tar.gz (108.3 kB view hashes)

Uploaded Source

Built Distribution

bionty-0.20.0-py2.py3-none-any.whl (50.9 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page