tdm.preprocess.ki67.transform_ki67#
- tdm.preprocess.ki67.transform_ki67(single_cell_df: DataFrame, typical_noise: float = 0.5, ki67_col: str = 'ki67', cell_type_col: str = 'cell_type')[source]#
Return a single-cell dataframe with standardized Ki67 values above noise, the transformed distributions should have similar shapes.
- Parameters:
single_cell_df (pd.DataFrame) – dataframe with row per cell, columns for cell type and Ki67 values.
typical_noise (float, optional) – magnitude of typical noise in the data. See example plot for finding the typical noise
:param in tutorial 01.: :param ki67_col: name of the column with Ki67 values. :type ki67_col: str :param cell_type_col: name of the column with cell types. :type cell_type_col: str
Note
The transformed values should have similar distributions accross different cell types. To plot the transformed values:
from tdm.preprocess.ki67 import transform_ki67, plot_marker_distributions transformed_ki67_single_cell_df = transform_ki67(single_cell_df) plot_marker_distributions(transformed_ki67_single_cell_df, ki67_col)
- Returns:
_description_
- Return type:
_type_