Source code for ts_ids_components.flow_cytometry.population

from uuid import UUID

from ts_ids_core.annotations import Nullable
from ts_ids_core.base.ids_element import IdsElement
from ts_ids_core.base.ids_field import IdsField


[docs] class Population(IdsElement): """A population representing a subset of cells selected by gating in flow cytometry. Populations are created by applying gates to samples and can be hierarchical. Each population references its parent sample and the gate method used to define it. """ pk: UUID = IdsField(description="Primary key UUID for this population.") name: Nullable[str] = IdsField( description="The name of the cellular/particle population (e.g., CD4+, CD8+, etc)." ) count_: Nullable[int] = IdsField( description="The number of events (cells/particles) in this population." ) analysis_path: Nullable[str] = IdsField( description="The full hierarchical path to this population (e.g., 'Lymphocytes/CD4+/CD8-')." ) parent_analysis_path: Nullable[str] = IdsField( description="The analysis path of the parent population." ) fk_sample: UUID = IdsField( description="Foreign key UUID linking to the sample this population belongs to." ) fk_method_gate: Nullable[UUID] = IdsField( description="Foreign key UUID linking to the gate method used to define this population." )