Ontology sources configuration

import bionty.base as bt

Display sources

The currently active and available ontologies can also be printed with:

  • bionty.base.display_currently_used_sources

  • bionty.base.display_available_sources

bt.display_currently_used_sources()
organism source version
entity
Organism vertebrates ensembl release-112
Organism bacteria ensembl release-57
Organism fungi ensembl release-57
Organism metazoa ensembl release-57
Organism plants ensembl release-57
Organism all ncbitaxon 2023-06-20
Gene human ensembl release-112
Gene mouse ensembl release-112
Gene saccharomyces cerevisiae ensembl release-112
Protein human uniprot 2024-03
Protein mouse uniprot 2024-03
CellMarker human cellmarker 2.0
CellMarker mouse cellmarker 2.0
CellLine all clo 2022-03-21
CellType all cl 2024-05-15
Tissue all uberon 2024-05-13
Disease all mondo 2024-06-04
Disease human doid 2024-05-29
ExperimentalFactor all efo 3.66.0
Phenotype human hp 2024-04-26
Phenotype mammalian mp 2024-06-18
Phenotype zebrafish zp 2024-04-18
Phenotype all pato 2024-03-28
Pathway all go 2024-06-17
BFXPipeline all lamin 1.0.0
Drug all dron 2024-08-05
DevelopmentalStage human hsapdv 2020-03-10
DevelopmentalStage mouse mmusdv 2020-03-10
Ethnicity human hancestro 3.0
BioSample all ncbi 2023-09
bt.display_available_sources()
source organism version url md5 source_name source_website
entity
Organism ensembl vertebrates release-112 https://ftp.ensembl.org/pub/release-112/specie... 0ec37e77f4bc2d0b0b47c6c62b9f122d Ensembl https://www.ensembl.org
Organism ensembl vertebrates release-111 https://ftp.ensembl.org/pub/release-111/specie... 2846df83899eaa61f8043db4c036e883 Ensembl https://www.ensembl.org
Organism ensembl vertebrates release-110 https://ftp.ensembl.org/pub/release-110/specie... f3faf95648d3a2b50fd3625456739706 Ensembl https://www.ensembl.org
Organism ensembl vertebrates release-109 https://ftp.ensembl.org/pub/release-109/specie... 7595bb989f5fec07eaca5e2138f67bd4 Ensembl https://www.ensembl.org
Organism ensembl vertebrates release-108 https://ftp.ensembl.org/pub/release-108/specie... d97c1ee302e4072f5f5c7850eff0b642 Ensembl https://www.ensembl.org
... ... ... ... ... ... ... ...
Drug dron all 2023-03-10 https://data.bioontology.org/ontologies/DRON/s... 75e86011158fae76bb46d96662a33ba3 Drug Ontology https://bioportal.bioontology.org/ontologies/DRON
DevelopmentalStage hsapdv human 2020-03-10 http://aber-owl.net/media/ontologies/HSAPDV/11... 52181d59df84578ed69214a5cb614036 Human Developmental Stages https://github.com/obophenotype/developmental-...
DevelopmentalStage mmusdv mouse 2020-03-10 http://aber-owl.net/media/ontologies/MMUSDV/9/... 5bef72395d853c7f65450e6c2a1fc653 Mouse Developmental Stages https://github.com/obophenotype/developmental-...
Ethnicity hancestro human 3.0 https://github.com/EBISPOT/hancestro/raw/3.0/h... 76dd9efda9c2abd4bc32fc57c0b755dd Human Ancestry Ontology https://github.com/EBISPOT/hancestro
BioSample ncbi all 2023-09 s3://bionty-assets/df_all__ncbi__2023-09__BioS... 918db9bd1734b97c596c67d9654a4126 NCBI BioSample attributes https://www.ncbi.nlm.nih.gov/biosample/docs/at...

91 rows × 7 columns

Initialize a Bionty model

When initializing a PublicOntology class, default source is used:

public = bt.CellType()

public
PublicOntology
Entity: CellType
Organism: all
Source: cl, 2024-05-15
#terms: 2931

You may specify a different source or version:

public = bt.CellType(source="cl", version="2022-08-16")

public
PublicOntology
Entity: CellType
Organism: all
Source: cl, 2022-08-16
#terms: 2672

You may also specify a organism for multi-organism models:

public = bt.Gene()

public
PublicOntology
Entity: Gene
Organism: human
Source: ensembl, release-112
#terms: 75829
public = bt.Gene(organism="mouse")

public
PublicOntology
Entity: Gene
Organism: mouse
Source: ensembl, release-112
#terms: 57510

Public bionty sources

Bionty maintains a sources.yaml listing public sources of each entity.

These sources are curated (biony-assets) and stored at s3://bionty-assets to provide fast and reliable access.

Cached sources files are stored at your local bionty/bionty/_dynamic/ directory.

Local bionty sources

File $home:/.lamin/bionty/sources.local.yaml stores all locally available ontologies.

The content of this file is identical to the public sources.yaml for a freshly-installed Bionty.

Users may edit this file in order to configure customized sources.

Format of the sources yaml file

entity: # Bionty entity class name, e.g. CellType
  source: # short name of the source, (CURIE prefix for ontologies) e.g. cl
    organism: # organism common name, (if none applied, use 'all') e.g. human
      version: # version of the source
        url: "link to the source file"
        md5: "md5 of the source file"

Configure default ontologies and versions

For each entity, the first source and its maximum version in sources.local.yaml is used as default.

To set your own default ontology and version, shift the order of entries.

For example, in the following “doid” used when “organism” is specified as “human”:

(highlighted sources are considered the default)

Disease:
  mondo:
    all:
      2023-02-06:
        source: http://purl.obolibrary.org/obo/mondo/releases/2023-02-06/mondo.owl
        md5: 2b7d479d4bd02a94eab47d1c9e64c5db
      2022-10-11:
        source: http://purl.obolibrary.org/obo/mondo/releases/2022-10-11/mondo.owl
        md5: 04b808d05c2c2e81430b20a0e87552bb
    name: Mondo Disease Ontology
    website: https://mondo.monarchinitiative.org/
  doid:
    human:
      2023-01-30:
        source: http://purl.obolibrary.org/obo/doid/releases/2023-01-30/doid.obo
        md5: 9f0c92ad2896dda82195e9226a06dc36
    name: Human Disease Ontology
    website: https://disease-ontology.org/
  inhouse_diseases:
    human:
      2000-01-01:
        source: http://download-my-diseases.com/releases/2000-01-01/mydiseases.owl
        md5: md5 if available or leave out this row
    name: My in-house Disease Ontology
    website: http://my-website.com

We may change the default to “inhouse_diseases” when “organism” is specified as “human”, by the following:

Note: changing the order of versions won’t have an effect, as most recent version is taken as default.

Disease:
  mondo:
    all:
      2022-10-11:
        source: http://purl.obolibrary.org/obo/mondo/releases/2022-10-11/mondo.owl
        md5: 04b808d05c2c2e81430b20a0e87552bb
      2023-02-06:
        source: http://purl.obolibrary.org/obo/mondo/releases/2023-02-06/mondo.owl
        md5: 2b7d479d4bd02a94eab47d1c9e64c5db
    name: Mondo Disease Ontology
    website: https://mondo.monarchinitiative.org/
  inhouse_diseases:
    human:
      2000-01-01:
        source: http://download-my-diseases.com/releases/2000-01-01/mydiseases.owl
        md5: md5 if available or leave out this row
    name: My in-house Disease Ontology
    website: http://my-website.com
  doid:
    human:
      2023-01-30:
        source: http://purl.obolibrary.org/obo/doid/releases/2023-01-30/doid.obo
        md5: 9f0c92ad2896dda82195e9226a06dc36
    name: Human Disease Ontology
    website: https://disease-ontology.org/