cytoflow.operations.i_operation#
i_operation contains just one class:
IOperation – an traits.has_traits.Interface that all operation classes must implement.
- class cytoflow.operations.i_operation.IOperation[source]#
Bases:
InterfaceThe basic interface for an operation on cytometry data.
- id#
a unique identifier for this class. prefix:
cytoflow.operations- Type:
Str
- friendly_id#
The operation’s human-readable id (like
ThresholdorK-means). Used for UI implementations.- Type:
Str
- name#
The name of this IOperation instance (like
Debris_Filter). Useful for UI implementations; sometimes used for naming gates’ metadata- Type:
Str
- estimate(experiment, subset=None)[source]#
Estimate this operation’s parameters from some data.
For operations that are data-driven (for example, a mixture model), estimate the operation’s parameters from an experiment.
- Parameters:
experiment (
Experiment) – theExperimentto use in the estimation.subset (Str (optional)) – a string passed to
pandas.DataFrame.queryto select the subset of data on which to run the parameter estimation.
- Raises:
CytoflowOpException – If the operation can’t be be completed because of bad op parameters.
- apply(experiment)[source]#
Apply an operation to an experiment.
- Parameters:
experiment (
Experiment) – theExperimentto apply this op to- Returns:
the old
Experimentwith this operation applied- Return type:
- Raises:
CytoflowOpException – If the operation can’t be be completed because of bad op parameters.
- default_view(**kwargs)[source]#
Many operations have a “default” view. This can either be a diagnostic for the operation’s
estimatemethod, an interactive for setting gates, etc. Frequently it makes sense to link the properties of the view to the properties of theIOperation; sometimes,default_viewis the only way to get the view (ie, it’s not useful when it doesn’t reference anIOperationinstance.)