RatioTransform Class
- class flowkit.transforms.RatioTransform(transform_id, dim_ids, param_a, param_b, param_c)
Parametrized ratio transformation, implemented as defined in the GatingML 2.0 specification:
fratio(x, y, A, B, C) = A * ((x - B) / (y - C))
Note: The RatioTransform does not have an inverse method.
- Parameters:
transform_id – A string identifying the transform
dim_ids – A list of length 2 specifying which dimension IDs to use for the ratio transformation. The 1st ID indicates the dimension to use for the numerator, the 2nd ID will be the dimension used for the denominator.
param_a – parameter for scaling the ratio transform
param_b – parameter for the numerator dimension offset
param_c – parameter for the denominator dimension offset
- apply(sample)
Apply RatioTransform to given ‘raw’ events in a Sample.
The RatioTransform is different from other transform types in that it references 2 distinct channels of event data. Since the indices of those channels could vary across different FCS files, we need the Sample instance to introspect for the correct channels. All other Transform subclasses take an events array as the argument to the apply method.
- Parameters:
sample – Sample instance from which event data should be extracted
- Returns:
NumPy array of transformed events