cytonormpy._normalization.Spline#
- class cytonormpy._normalization.Spline(batch, cluster, channel, spline_calc_function=<class 'scipy.interpolate._cubic.CubicHermiteSpline'>, extrapolate='linear', limits=None)#
Class to perform the spline calculations.
- Parameters:
batch (
Union[float,str]) – The batch of which the spline functions are calculated.cluster (
Union[float,str]) – The cluster of which the spline function is calculated.channel (
str) – The channel that is calculatedspline_calc_function (
Callable) – The spline function that is used for the spline calculation. Defaults to CubicHermiteSpline as in the original CytoNorm implementation in R.extrapolate (
Union[Literal['linear','spline'],bool]) – How to extrapolate data points outside of the spline range. Defaults to linear as implemented in the R stats::splinefun() function. If False, values are not extrapolated and result in NaN values. If spline, use the spline function for extrapolation.limits (
Optional[Union`[:py:class:`list[float],ndarray]]) – A list or array of fixed intensity values. These values will be appended to the calculated quantiles and included to calculate the spline functions. By default, the spline functions are extrapolated linearly outside the observed data range, using the slope at the last data point as the slope for the extrapolation. Use limits to further control the behaviour outside the data range.
Methods