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 (Optional[Literal['ensembl', 'ncbitaxon']], default: None) –

The name of the source in the sources.yaml file.

Get available sources with .display_available_sources().

version: 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 (Optional[Literal['human', 'mouse', 'saccharomyces cerevisiae']], default: None) –

name of Organism entity. source: The name of the source in the sources.yaml file.

Get available sources with .display_available_sources().

version: 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 (Optional[Literal['human', 'mouse']], default: None) –

name of Organism entity. source: The name of the source in the sources.yaml file.

Get available sources with .display_available_sources().

version: 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 (Optional[Literal['human', 'mouse']], default: None) –

name of Organism entity. source: The name of the source in the sources.yaml file.

Get available sources with .display_available_sources().

version: 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 (Optional[Literal['all']], default: None) –

name of Organism entity. source: The name of the source in the sources.yaml file.

Get available sources with .display_available_sources().

version: 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 (Optional[Literal['all']], default: None) –

name of Organism entity. source: The name of the source in the sources.yaml file.

Get available sources with .display_available_sources().

version: 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 (Optional[Literal['all']], default: None) –

name of Organism entity. source: The name of the source in the sources.yaml file.

Get available sources with .display_available_sources().

version: 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 (Optional[Literal['all', 'human']], default: None) –

name of Organism entity. source: The name of the source in the sources.yaml file.

Get available sources with .display_available_sources().

version: 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 (Optional[Literal['human', 'all']], default: None) –

name of Organism entity. source: The name of the source in the sources.yaml file.

Get available sources with .display_available_sources().

version: 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 (Optional[Literal['all']], default: None) –

name of Organism entity. source: The name of the source in the sources.yaml file.

Get available sources with .display_available_sources().

version: 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 (Optional[Literal['efo']], default: None) –

The name of the source in the sources.yaml file.

Get available sources with .display_available_sources().

version: 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 (Optional[Literal['human', 'mouse']], default: None) –

name of Organism entity. source: The name of the source in the sources.yaml file.

Get available sources with .display_available_sources().

version: 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 (Optional[Literal['all']], default: None) –

name of Organism entity. source: The name of the source in the sources.yaml file.

Get available sources with .display_available_sources().

version: 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 (Optional[Literal['human']], default: None) –

name of Organism entity. source: The name of the source in the sources.yaml file.

Get available sources with .display_available_sources().

version: 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 (Optional[Literal['all']], default: None) –

name of Organism entity. source: The name of the source in the sources.yaml file.

Get available sources with .display_available_sources().

version: 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 (Optional[Literal['all']], default: None) –

name of Organism entity. source: The name of the source in the sources.yaml file.

Get available sources with .display_available_sources().

version: The version of the ontology. Typically a date or an actual version.

Get latest versions with .display_available_sources().