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-108
Gene human ensembl release-108
Gene mouse ensembl release-108
Protein human uniprot 2022-04
Protein mouse uniprot 2022-04
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 md5 source_name source_website
entity
BFXPipeline lamin all 1.0.0 Bioinformatics Pipeline https://lamin.ai
CellLine clo all 2022-03-21 ea58a1010b7e745702a8397a526b3a33 Cell Line Ontology https://bioportal.bioontology.org/ontologies/CLO
CellMarker cellmarker mouse, human 2.0 CellMarker http://bio-bigdata.hrbmu.edu.cn/CellMarker/
CellType cl all 2022-08-16, 2023-02-15 9331a6a029cb1863bd0584ab41508df7 Cell Ontology https://obophenotype.github.io/cell-ontology/
Disease mondo human, all 2023-01-30, 2022-10-11, 2023-02-06 2b7d479d4bd02a94eab47d1c9e64c5db Mondo Disease Ontology https://mondo.monarchinitiative.org/
Drug dron all 2023-03-10 Drug Ontology https://bioportal.bioontology.org/ontologies/D...
Gene ensembl mouse, human release-107, release-108 Ensembl https://www.ensembl.org/index.html
Pathway go all 7.79, 2023-05-10 Gene Ontology http://geneontology.org/docs/download-ontology/
Phenotype hp human 2023-01-27 ceeb3ada771908deef620d74cd8e6b0f Human Phenotype Ontology https://hpo.jax.org/
Protein uniprot mouse, human 2022-03, 2022-04 Uniprot https://www.uniprot.org/
Readout efo all 3.48.0 3367e9a9ae3dee9113024e5108c49091 The Experimental Factor Ontology https://bioportal.bioontology.org/ontologies/EFO
Species ensembl all release-108 Ensembl https://www.ensembl.org/index.html
Tissue uberon all 2023-02-14, 2022-08-19 3f94e22fae4cdde88a555c5cd59c47da Uberon multi-species anatomy ontology http://obophenotype.github.io/uberon/

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 ontology terms
๐ŸŽฏ CellType.fuzzy_match(): fuzzy match against ontology 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 ontology terms
๐ŸŽฏ CellType.fuzzy_match(): fuzzy match against ontology 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-108

๐Ÿ“– Gene.df(): ontology reference table
๐Ÿ”Ž Gene.lookup(): autocompletion of ontology terms
๐ŸŽฏ Gene.fuzzy_match(): fuzzy match against ontology 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-108

๐Ÿ“– Gene.df(): ontology reference table
๐Ÿ”Ž Gene.lookup(): autocompletion of ontology terms
๐ŸŽฏ Gene.fuzzy_match(): fuzzy match against ontology 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/