tdm.preprocess.ki67.is_dividing#
- tdm.preprocess.ki67.is_dividing(single_cell_df: DataFrame, typical_noise: float, ki67_threshold: float, ki67_col: str) Series [source]#
Compute a binary division label for each cell.
Computes a cutoff for each cell-type:
\[\begin{split}\\text{cutoff} = K \cdot \sigma + N\end{split}\]Where \(K\) is the ki67 threshold, \(N\) is the typical noise level and \(\sigma\) is the standard deviation of ki67 values above typical noise, after subtracting the noise level.
- Parameters:
single_cell_df (pd.DataFrame) – dataframe with row per cell, columns for cell type and Ki67 values.
typical_noise (float) – magnitude of typical noise in the data. See example plot for finding the typical noise
:param in tutorial 01.: :param ki67_threshold: fraction of standard deviation above noise to use as the cutoff for division. :type ki67_threshold: float :param ki67_col: name of the column with Ki67 values. :type ki67_col: str
- Returns:
boolean series with True for dividing cells.
- Return type:
pd.Series