bionty.Source

class bionty.Source(entity: str, organism: str, name: str, version: str, currently_used: bool, description: str | None, url: str | None, md5: str | None, source_website: str | None)

Bases: Record, TracksRun, TracksUpdates

Versions of ontology sources.

Warning

Do not modify the records unless you know what you are doing!

Simple fields

uid: str

A universal id (hash of selected field).

entity: str

Entity class name.

organism: str

Organism name, use ‘all’ if unknown or none applied.

name: str

Source name, short form, CURIE prefix for ontologies.

version: str

Version of the source.

in_db: bool

Whether this ontology has be added to the database.

currently_used: bool

Whether this record is currently used.

description: str | None

Source full name, long form.

url: str | None

URL of the source file.

md5: str | None

Hash md5 of the source file.

source_website: str | None

Website of the source.

created_at: datetime

Time of creation of record.

updated_at: datetime

Time of last update to record.

Methods

set_as_currently_used()

Set this record as the currently used source.

Examples

>>> record = bionty.Source.filter(uid="...").one()
>>> record.set_as_currently_used()