bionty.base¶
Access to public ontologies.
bionty.base is the read-only interface for public ontology that underlies bionty and doesn’t require a lamindb instance.
Import the package:
import bionty.base as bt_base
Access public ontologies:
genes = bt_base.Gene()
Get a DataFrame of all available values:
genes.to_dataframe()
Sources & settings¶
- bionty.base.display_sources()¶
Displays all available sources.
Example:
import bionty.base as bt_base bt.display_sources()
- Return type:
DataFrame
- bionty.base.display_currently_used_sources(mute=False)¶
Displays all currently used sources.
Active version is unique for entity + organism.
Example:
import bionty.base as bt_base bt.display_currently_used_sources()
- Return type:
DataFrame
- bionty.base.settings = <bionty.base._settings.Settings object>¶
Base class¶
Pronto Ontology objects can be accessed via {entity}.to_pronto().
- class bionty.base.PublicOntology(source=None, version=None, organism=None, *, include_id_prefixes=None, include_rel=None, entity=None, ols_supported=True, filter_prefix=True)¶
PublicOntology object.
- class bionty.base.PublicOntologyField(parent, name)¶
Field of a PublicOntology model.
Entities¶
- class bionty.base.Organism(taxa=None, source=None, version=None, **kwargs)¶
Organism.
1. NCBItaxon Ontology obophenotype/ncbitaxon
2. Organism ontology https://www.ensembl.org/index.html
- Parameters:
source (
Literal['ensembl','ncbitaxon'] |None, default:None) – The name of the source in the sources.yaml file. Get available sources with.display_available_sources().version (
Literal['2025-03-13','2023-06-20','release-112','release-57'] |None, default:None) – The version of the ontology. Typically a date or an actual version. Get latest versions with.display_available_sources().
- class bionty.base.Gene(organism=None, source=None, version=None, **kwargs)¶
Gene.
1. Ensembl https://www.ensembl.org/
- Parameters:
organism (
Literal['human','mouse','saccharomyces cerevisiae'] |None, default:None) –nameofOrganismentity.source (
Literal['ensembl'] |None, default:None) – The name of the source in the sources.yaml file. Get available sources with.display_available_sources().version (
Literal['release-112','release-111','release-110','release-109'] |None, default:None) – The version of the ontology. Typically a date or an actual version. Get latest versions with.display_available_sources().
Notes
Biotypes: https://www.ensembl.org/info/genome/genebuild/biotypes.html Gene Naming: https://www.ensembl.org/info/genome/genebuild/gene_names.html
- class bionty.base.Protein(organism=None, source=None, version=None, **kwargs)¶
Protein.
1. Uniprot https://www.uniprot.org/
- Parameters:
organism (
Literal['human','mouse'] |None, default:None) –nameofOrganismentity.source (
Literal['uniprot'] |None, default:None) – The name of the source in the sources.yaml file. Get available sources with.display_available_sources().version (
Literal['2024-03','2023-03','2023-02'] |None, default:None) – The version of the ontology. Typically a date or an actual version. Get latest versions with.display_available_sources().
- class bionty.base.CellMarker(organism=None, source=None, version=None, **kwargs)¶
Cell markers.
1. Cell Marker Ontology http://bio-bigdata.hrbmu.edu.cn/CellMarker/
- Parameters:
organism (
Literal['human','mouse'] |None, default:None) –nameofOrganismentity.source (
Literal['cellmarker'] |None, default:None) – The name of the source in the sources.yaml file. Get available sources with.display_available_sources().version (
Literal['2.0'] |None, default:None) – The version of the ontology. Typically a date or an actual version. Get latest versions with.display_available_sources().
- class bionty.base.CellType(organism=None, source=None, version=None, **kwargs)¶
Cell type ontologies.
1. Cell ontology obophenotype/cell-ontology
- Parameters:
organism (
Literal['all'] |None, default:None) –nameofOrganismentity.source (
Literal['cl'] |None, default:None) – The name of the source in the sources.yaml file. Get available sources with.display_available_sources().version (
Literal['2025-04-10','2024-08-16','2024-05-15','2024-04-05','2024-02-13','2024-01-04','2023-08-24','2023-04-20','2023-02-15','2022-08-16'] |None, default:None) – The version of the ontology. Typically a date or an actual version. Get latest versions with.display_available_sources().
- class bionty.base.CellLine(organism=None, source=None, version=None, **kwargs)¶
Cell line.
1. Cell Line Ontology CLO-ontology/CLO
2. DepMap https://depmap.org
- Parameters:
organism (
Literal['all'] |None, default:None) –nameofOrganismentity.source (
Literal['clo','depmap'] |None, default:None) – The name of the source in the sources.yaml file. Get available sources with.display_available_sources().version (
Literal['2023-03-28','2022-03-212024-Q2'] |None, default:None) – The version of the ontology. Typically a date or an actual version. Get latest versions with.display_available_sources().
- class bionty.base.Tissue(organism=None, source=None, version=None, **kwargs)¶
Tissue.
1. Uberon obophenotype/uberon
- Parameters:
organism (
Literal['all'] |None, default:None) –nameofOrganismentity.source (
Literal['uberon'] |None, default:None) – The name of the source in the sources.yaml file. Get available sources with.display_available_sources().version (
Literal['2025-05-28','2024-08-07','2024-05-13','2024-03-22','2024-02-20','2024-01-18','2023-09-05','2023-04-19','2023-02-14','2022-08-19'] |None, default:None) – The version of the ontology. Typically a date or an actual version. Get latest versions with.display_available_sources().
- class bionty.base.Disease(organism=None, source=None, version=None, **kwargs)¶
Disease ontologies.
1. Mondo Edits of terms are coordinated and reviewed on: monarch-initiative/mondo
2. Human Disease Ontology Edits of terms are coordinated and reviewed on: DiseaseOntology/HumanDiseaseOntology
3. International Classification of Diseases (ICD) Edits of terms are coordinated and reviewed on: https://www.who.int/standards/classifications/classification-of-diseases
- Parameters:
organism (
Literal['all','human'] |None, default:None) –nameofOrganismentity.source (
Literal['mondo','doid','icd'] |None, default:None) – The name of the source in the sources.yaml file. Get available sources with.display_available_sources().version (
Literal['2025-06-03','2024-08-06','2024-06-04','2024-05-08','2024-02-06','2024-01-03','2023-08-02','2023-04-04','2023-02-06','2022-10-11','2025-05-30','2024-05-29','2024-01-31','2023-03-31','2023-01-30','icd-9-2011','icd-10-2020','icd-10-2024','icd-11-2023'] |None, default:None) – The version of the ontology. Typically a date or an actual version. Get latest versions with.display_available_sources().
- class bionty.base.Phenotype(organism=None, source=None, version=None, **kwargs)¶
Phenotype.
1. Human Phenotype Ontology https://hpo.jax.org/app/
2. PATO - the Phenotype And Trait Ontology pato-ontology/pato
3.Phecodes ICD10 map https://phewascatalog.org/phecodes_icd10
3. PATO - Phenotype And Trait Ontology https://obofoundry.org/ontology/pato.html
- Parameters:
organism (
Literal['all','human'] |None, default:None) –nameofOrganismentity.source (
Literal['hp','phe','pato'] |None, default:None) – The name of the source in the sources.yaml file. Get available sources with.display_available_sources().version (
Literal['2025-05-06','2024-04-26','2024-03-06','2023-06-17','2023-04-05','2023-01-27','2025-05-14','2024-03-28','2023-05-18','1.2'] |None, default:None) – The version of the ontology. Typically a date or an actual version. Get latest versions with.display_available_sources().
- class bionty.base.Pathway(organism=None, source=None, version=None, **kwargs)¶
Pathway.
1. Gene Ontology https://bioportal.bioontology.org/ontologies/GO/?p=summary
2. Pathway Ontology https://bioportal.bioontology.org/ontologies/PW/?p=summary
- Parameters:
organism (
Literal['all'] |None, default:None) –nameofOrganismentity.source (
Literal['go','pw'] |None, default:None) – The name of the source in the sources.yaml file. Get available sources with.display_available_sources().version (
Literal['2024-11-03','2024-06-17','2023-05-10','7.84'] |None, default:None) – The version of the ontology. Typically a date or an actual version. Get latest versions with.display_available_sources().
- class bionty.base.ExperimentalFactor(organism=None, source=None, version=None, **kwargs)¶
Experimental Factor.
1. Experimental Factor Ontology https://www.ebi.ac.uk/ols/ontologies/efo
- Parameters:
source (
Literal['efo'] |None, default:None) – The name of the source in the sources.yaml file. Get available sources with.display_available_sources().version (
Literal['3.78.0','3.70.0','3.69.0','3.66.0','3.65.0','3.63.0','3.62.0','3.57.0','3.48.0'] |None, default:None) – The version of the ontology. Typically a date or an actual version. Get latest versions with.display_available_sources().
- class bionty.base.DevelopmentalStage(organism=None, source=None, version=None, **kwargs)¶
Developmental Stage.
1. Developmental Stage Ontology obophenotype/developmental-stage-ontologies
- Parameters:
organism (
Literal['human','mouse'] |None, default:None) –nameofOrganismentity.source (
Literal['hsapdv','mmusdv'] |None, default:None) – The name of the source in the sources.yaml file. Get available sources with.display_available_sources().version (
Literal['2025-01-23','2024-05-28','2020-03-10'] |None, default:None) – The version of the ontology. Typically a date or an actual version. Get latest versions with.display_available_sources().
- class bionty.base.Drug(organism=None, source=None, version=None, **kwargs)¶
Drug ontologies.
1. DRON Edits of terms are coordinated and reviewed on: https://bioportal.bioontology.org/ontologies/DRON/
2. CHEBI https://www.ebi.ac.uk/chebi/
- Parameters:
organism (
Literal['all'] |None, default:None) –nameofOrganismentity.source (
Literal['dron','chebi'] |None, default:None) – The name of the source in the sources.yaml file. Get available sources with.display_available_sources().version (
Literal['2025-04-18','2024-08-05','2023-03-10','2024-07-27','2024-03-02'] |None, default:None) – The version of the ontology. Typically a date or an actual version. Get latest versions with.display_available_sources().
- class bionty.base.Ethnicity(organism=None, source=None, version=None, **kwargs)¶
Ethnicity.
1. Human Ancestry Ontology EBISPOT/hancestro
- Parameters:
organism (
Literal['human'] |None, default:None) –nameofOrganismentity.source (
Literal['hancestro'] |None, default:None) – The name of the source in the sources.yaml file. Get available sources with.display_available_sources().version (
Literal['3.0','2025-04-01'] |None, default:None) – The version of the ontology. Typically a date or an actual version. Get latest versions with.display_available_sources().
- class bionty.base.BFXPipeline(organism=None, source=None, version=None, **kwargs)¶
Bioinformatics pipelines.
- Parameters:
organism (
Literal['all'] |None, default:None) –nameofOrganismentity.source (
Literal['lamin'] |None, default:None) – The name of the source in the sources.yaml file. Get available sources with.display_available_sources().version (
Literal['1.0.0'] |None, default:None) – The version of the ontology. Typically a date or an actual version. Get latest versions with.display_available_sources().
- class bionty.base.BioSample(organism=None, source=None, version=None, **kwargs)¶
BioSample attributes.
1. NCBI BioSample Attributes https://www.ncbi.nlm.nih.gov/biosample/docs/attributes
- Parameters:
organism (
Literal['all'] |None, default:None) –nameofOrganismentity.source (
Literal['ncbi'] |None, default:None) – The name of the source in the sources.yaml file. Get available sources with.display_available_sources().version (
Literal['2023-09'] |None, default:None) – The version of the ontology. Typically a date or an actual version. Get latest versions with.display_available_sources().