pegasus.normalize
- pegasus.normalize(data, norm_count=100000.0, base_matrix=None, target_matrix=None, select=True)[source]
Normalize each cell by total count.
- Parameters
data (
pegasusio.MultimodalData) – Use current selected modality in data, which should contain one RNA expression matrix.norm_count (
int, optional, default:1e5.) – Total counts of one cell after normalization.base_matrix (
str, optional, default:None.) – The key name of the matrix to perform normalize. If None, the current matrix.target_matrix (
str, optional, default:None.) – The key name of the matrix to store the normalize results. If None, base_matrix + “.norm”.select (
bool, optional, default:None.) – Select the normalized matrix as the current matrix (can be accessed via data.X).
- Return type
None- Returns
NoneAdd the normalized matrix to
data.matrices. Add the normalization scale vector todata.obs["scale"]andnorm_countparameter todata.uns["norm_count"].Note that if the detected base_matrix`==`X, we’ll change the name to counts instead.
Examples
>>> pg.normalize(data)