FlowCal.stats module

Functions to calculate statistics from the events in a FCSData object.

FlowCal.stats.cv(data, channels=None)

Calculate the Coeff. of Variation of the events in an FCSData object.

Parameters:
data : FCSData or numpy array

NxD flow cytometry data where N is the number of events and D is the number of parameters (aka channels).

channels : int or str or list of int or list of str, optional

Channels on which to calculate the statistic. If None, use all channels.

Returns:
float or numpy array

The Coefficient of Variation of the events in the specified channels of data.

Notes

The Coefficient of Variation (CV) of a dataset is defined as the standard deviation divided by the mean of such dataset.

FlowCal.stats.gcv(data, channels=None)

Calculate the geometric CV of the events in an FCSData object.

Parameters:
data : FCSData or numpy array

NxD flow cytometry data where N is the number of events and D is the number of parameters (aka channels).

channels : int or str or list of int or list of str, optional

Channels on which to calculate the statistic. If None, use all channels.

Returns:
float or numpy array

The geometric coefficient of variation of the events in the specified channels of data.

FlowCal.stats.gmean(data, channels=None)

Calculate the geometric mean of the events in an FCSData object.

Parameters:
data : FCSData or numpy array

NxD flow cytometry data where N is the number of events and D is the number of parameters (aka channels).

channels : int or str or list of int or list of str, optional

Channels on which to calculate the statistic. If None, use all channels.

Returns:
float or numpy array

The geometric mean of the events in the specified channels of data.

FlowCal.stats.gstd(data, channels=None)

Calculate the geometric std. dev. of the events in an FCSData object.

Parameters:
data : FCSData or numpy array

NxD flow cytometry data where N is the number of events and D is the number of parameters (aka channels).

channels : int or str or list of int or list of str, optional

Channels on which to calculate the statistic. If None, use all channels.

Returns:
float or numpy array

The geometric standard deviation of the events in the specified channels of data.

FlowCal.stats.iqr(data, channels=None)

Calculate the Interquartile Range of the events in an FCSData object.

Parameters:
data : FCSData or numpy array

NxD flow cytometry data where N is the number of events and D is the number of parameters (aka channels).

channels : int or str or list of int or list of str, optional

Channels on which to calculate the statistic. If None, use all channels.

Returns:
float or numpy array

The Interquartile Range of the events in the specified channels of data.

Notes

The Interquartile Range (IQR) of a dataset is defined as the interval between the 25% and the 75% percentiles of such dataset.

FlowCal.stats.mean(data, channels=None)

Calculate the mean of the events in an FCSData object.

Parameters:
data : FCSData or numpy array

NxD flow cytometry data where N is the number of events and D is the number of parameters (aka channels).

channels : int or str or list of int or list of str, optional

Channels on which to calculate the statistic. If None, use all channels.

Returns:
float or numpy array

The mean of the events in the specified channels of data.

FlowCal.stats.median(data, channels=None)

Calculate the median of the events in an FCSData object.

Parameters:
data : FCSData or numpy array

NxD flow cytometry data where N is the number of events and D is the number of parameters (aka channels).

channels : int or str or list of int or list of str, optional

Channels on which to calculate the statistic. If None, use all channels.

Returns:
float or numpy array

The median of the events in the specified channels of data.

FlowCal.stats.mode(data, channels=None)

Calculate the mode of the events in an FCSData object.

Parameters:
data : FCSData or numpy array

NxD flow cytometry data where N is the number of events and D is the number of parameters (aka channels).

channels : int or str or list of int or list of str, optional

Channels on which to calculate the statistic. If None, use all channels.

Returns:
float or numpy array

The mode of the events in the specified channels of data.

FlowCal.stats.rcv(data, channels=None)

Calculate the RCV of the events in an FCSData object.

Parameters:
data : FCSData or numpy array

NxD flow cytometry data where N is the number of events and D is the number of parameters (aka channels).

channels : int or str or list of int or list of str, optional

Channels on which to calculate the statistic. If None, use all channels.

Returns:
float or numpy array

The Robust Coefficient of Variation of the events in the specified channels of data.

Notes

The Robust Coefficient of Variation (RCV) of a dataset is defined as the Interquartile Range (IQR) divided by the median of such dataset.

FlowCal.stats.std(data, channels=None)

Calculate the standard deviation of the events in an FCSData object.

Parameters:
data : FCSData or numpy array

NxD flow cytometry data where N is the number of events and D is the number of parameters (aka channels).

channels : int or str or list of int or list of str, optional

Channels on which to calculate the statistic. If None, use all channels.

Returns:
float or numpy array

The standard deviation of the events in the specified channels of data.