Source code for ts_ids_components.flow_cytometry.gate

from typing import List
from uuid import UUID

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


[docs] class Gate(IdsElement): """A gate definition used in flow cytometry gating strategies. Gates define regions on flow cytometry plots to select cell populations. Gates can be hierarchical, with child gates referencing parent gates via parent_gate_id. Gate types include PolygonGate, RectangleGate, EllipsoidGate, and others. """ pk: UUID = IdsField(description="Primary key UUID for this gate.") id_: Nullable[str] = IdsField( alias="id", description="The unique identifier of the gate from the source system.", ) parent_gate_id: Nullable[str] = IdsField( description="The identifier of the parent gate, establishing the gating hierarchy." ) type_: Nullable[str] = IdsField( description="The type of gate (e.g., 'PolygonGate', 'RectangleGate', 'EllipsoidGate')." ) x_axis_name: Nullable[str] = IdsField( description="The name of the x-axis parameter used for this gate." ) y_axis_name: Nullable[str] = IdsField( description="The name of the y-axis parameter used for this gate." ) minimum_x_coordinate: Nullable[float] = IdsField( description="The minimum x-coordinate boundary of the gate (for rectangle gates)." ) maximum_x_coordinate: Nullable[float] = IdsField( description="The maximum x-coordinate boundary of the gate (for rectangle gates)." ) minimum_y_coordinate: Nullable[float] = IdsField( description="The minimum y-coordinate boundary of the gate (for rectangle gates)." ) maximum_y_coordinate: Nullable[float] = IdsField( description="The maximum y-coordinate boundary of the gate (for rectangle gates)." ) vertices_x: List[float] = IdsField( default=[], description="List of x-coordinates for polygon and ellipsoid gate vertices.", ) vertices_y: List[float] = IdsField( default=[], description="List of y-coordinates for polygon and ellipsoid gate vertices.", ) ellipsoid_focal_points_x: List[float] = IdsField( default=[], description="List of x-coordinates for ellipsoid gate focal points.", ) ellipsoid_focal_points_y: List[float] = IdsField( default=[], description="List of y-coordinates for ellipsoid gate focal points.", ) distance: Nullable[DecimalNumber] = IdsField( description="The distance parameter of the ellipsoid gate." )