Ontology sources configuration#

import bionty as bt

Display sources#

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

bt.display_currently_used_sources()
species source version
entity
Species all ensembl release-109
Gene human ensembl release-109
Gene mouse ensembl release-109
Protein human uniprot 2023-02
Protein mouse uniprot 2023-02
CellMarker human cellmarker 2.0
CellMarker mouse cellmarker 2.0
CellLine all clo 2022-03-21
CellType all cl 2023-02-15
Tissue all uberon 2023-02-14
Disease all mondo 2023-02-06
Disease human doid 2023-01-30
Readout all efo 3.48.0
Phenotype human hp 2023-01-27
Pathway all go 2023-05-10
BFXPipeline all lamin 1.0.0
Drug all dron 2023-03-10
bt.display_available_sources()
source species version url md5 source_name source_website
entity
Species ensembl all release-109 https://ftp.ensembl.org/pub/release-109/specie... Ensembl https://www.ensembl.org
Species ensembl all release-108 https://ftp.ensembl.org/pub/release-108/specie... Ensembl https://www.ensembl.org
Gene ensembl human release-109 s3://bionty-assets/human_ensembl_release-109_G... Ensembl https://www.ensembl.org
Gene ensembl mouse release-109 s3://bionty-assets/mouse_ensembl_release-109_G... Ensembl https://www.ensembl.org
Protein uniprot human 2023-02 s3://bionty-assets/human_uniprot_2023-02_Prote... Uniprot https://www.uniprot.org
Protein uniprot mouse 2023-02 s3://bionty-assets/mouse_uniprot_2023-02_Prote... Uniprot https://www.uniprot.org
CellMarker cellmarker human 2.0 s3://bionty-assets/human_cellmarker_2.0_CellMa... CellMarker http://bio-bigdata.hrbmu.edu.cn/CellMarker
CellMarker cellmarker mouse 2.0 s3://bionty-assets/mouse_cellmarker_2.0_CellMa... CellMarker http://bio-bigdata.hrbmu.edu.cn/CellMarker
CellLine clo all 2022-03-21 https://data.bioontology.org/ontologies/CLO/su... ea58a1010b7e745702a8397a526b3a33 Cell Line Ontology https://bioportal.bioontology.org/ontologies/CLO
CellType cl all 2023-02-15 http://purl.obolibrary.org/obo/cl/releases/202... 9331a6a029cb1863bd0584ab41508df7 Cell Ontology https://obophenotype.github.io/cell-ontology
CellType cl all 2022-08-16 http://purl.obolibrary.org/obo/cl/releases/202... d0655766574e63f3fe5ed56d3c030880 Cell Ontology https://obophenotype.github.io/cell-ontology
Tissue uberon all 2023-02-14 http://purl.obolibrary.org/obo/uberon/releases... 3f94e22fae4cdde88a555c5cd59c47da Uberon multi-species anatomy ontology http://obophenotype.github.io/uberon
Tissue uberon all 2022-08-19 http://purl.obolibrary.org/obo/uberon/releases... c7c958a1ee48fdce146f2c1763eed27e Uberon multi-species anatomy ontology http://obophenotype.github.io/uberon
Disease mondo all 2023-02-06 http://purl.obolibrary.org/obo/mondo/releases/... 2b7d479d4bd02a94eab47d1c9e64c5db Mondo Disease Ontology https://mondo.monarchinitiative.org
Disease mondo all 2022-10-11 http://purl.obolibrary.org/obo/mondo/releases/... 04b808d05c2c2e81430b20a0e87552bb Mondo Disease Ontology https://mondo.monarchinitiative.org
Disease doid human 2023-01-30 http://purl.obolibrary.org/obo/doid/releases/2... 9f0c92ad2896dda82195e9226a06dc36 Human Disease Ontology https://disease-ontology.org
Readout efo all 3.48.0 http://www.ebi.ac.uk/efo/releases/v3.48.0/efo.owl 3367e9a9ae3dee9113024e5108c49091 The Experimental Factor Ontology https://bioportal.bioontology.org/ontologies/EFO
Phenotype hp human 2023-01-27 https://github.com/obophenotype/human-phenotyp... ceeb3ada771908deef620d74cd8e6b0f Human Phenotype Ontology https://hpo.jax.org
Pathway go all 2023-05-10 https://data.bioontology.org/ontologies/GO/sub... Gene Ontology http://geneontology.org
Pathway pw all 7.79 https://data.bioontology.org/ontologies/PW/sub... 02e2337bb1ab7cc4332ef6acc4cbdfa6 Pathway Ontology https://www.ebi.ac.uk/ols/ontologies/pw
BFXPipeline lamin all 1.0.0 s3://bionty-assets/bfxpipelines.json Bioinformatics Pipeline https://lamin.ai
Drug dron all 2023-03-10 https://data.bioontology.org/ontologies/DRON/s... Drug Ontology https://bioportal.bioontology.org/ontologies/DRON

Initialize a Bionty model#

When initializing a Bionty class, default source is used:

celltype_bionty = bt.CellType()

celltype_bionty
CellType
Species: all
Source: cl, 2023-02-15

๐Ÿ“– CellType.df(): ontology reference table
๐Ÿ”Ž CellType.lookup(): autocompletion of terms
๐ŸŽฏ CellType.search(): free text search of terms
๐Ÿง CellType.inspect(): check if identifiers are mappable
๐Ÿ‘ฝ CellType.map_synonyms(): map synonyms to standardized names
๐Ÿ”— CellType.ontology: Pronto.Ontology object

You may specify a different source or version:

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

celltype_bionty


CellType
Species: all
Source: cl, 2022-08-16

๐Ÿ“– CellType.df(): ontology reference table
๐Ÿ”Ž CellType.lookup(): autocompletion of terms
๐ŸŽฏ CellType.search(): free text search of terms
๐Ÿง CellType.inspect(): check if identifiers are mappable
๐Ÿ‘ฝ CellType.map_synonyms(): map synonyms to standardized names
๐Ÿ”— CellType.ontology: Pronto.Ontology object

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

gene_bionty = bt.Gene()

gene_bionty
Gene
Species: human
Source: ensembl, release-109

๐Ÿ“– Gene.df(): ontology reference table
๐Ÿ”Ž Gene.lookup(): autocompletion of terms
๐ŸŽฏ Gene.search(): free text search of terms
๐Ÿง Gene.inspect(): check if identifiers are mappable
๐Ÿ‘ฝ Gene.map_synonyms(): map synonyms to standardized names
๐Ÿ”— Gene.ontology: Pronto.Ontology object
gene_bionty = bt.Gene(species="mouse")

gene_bionty


Gene
Species: mouse
Source: ensembl, release-109

๐Ÿ“– Gene.df(): ontology reference table
๐Ÿ”Ž Gene.lookup(): autocompletion of terms
๐ŸŽฏ Gene.search(): free text search of terms
๐Ÿง Gene.inspect(): check if identifiers are mappable
๐Ÿ‘ฝ Gene.map_synonyms(): map synonyms to standardized names
๐Ÿ”— Gene.ontology: Pronto.Ontology object

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
    species: # species 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 โ€œspeciesโ€ 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 โ€œspeciesโ€ 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/