bionty.Ethnicity

class bionty.Ethnicity(name: str, ontology_id: str | None, abbr: str | None, synonyms: str | None, description: str | None, parents: list[Ethnicity], public_source: PublicSource | None)

Bases: BioRegistry, TracksRun, TracksUpdates

Ethnicity - Human Ancestry Ontology.

Notes

For more info, see tutorials Manage biological registries and Ethnicity.

Bulk create Ethnicity records via from_values.

Examples

>>> record = bionty.Ethnicity.from_public(name="European")
>>> record.save()

Fields

run ForeignKey

Last run that created or updated the record. Run

id AutoField

Internal id, valid only in one DB instance.

uid CharField

A universal id (hash of selected field).

name CharField

Name of the ethnicity.

ontology_id CharField

Ontology ID of the ethnicity.

abbr CharField

A unique abbreviation of ethnicity.

synonyms TextField

Bar-separated (|) synonyms that correspond to this ethnicity.

description TextField

Description of the ethnicity.

public_source ForeignKey

PublicSource this ethnicity associates with.

previous_runs ManyToManyField

Sequence of runs that created or updated the record.

parents ManyToManyField

Parent ethnicity records.

artifacts ManyToManyField

Artifacts linked to the ethnicity.

created_at DateTimeField

Time of creation of record.

created_by ForeignKey

Creator of record. User

updated_at DateTimeField

Time of last update to record.

Methods