COSIE.data_preprocessing.clr_normalize_each_cell

clr_normalize_each_cell(adata, inplace=True)[source]

Normalize each cell’s protein counts using Centered Log-Ratio (CLR) normalization, following the approach used in Seurat and SpatialGLUE.

Parameters

adataAnnData

Input AnnData object where .X stores raw count data (e.g., protein abundance).

inplacebool, optional

Whether to modify the input adata in place. If True, the normalization will overwrite adata.X. If False, a normalized copy of adata is returned. Default is True.

Returns

adataAnnData

The AnnData object with CLR-normalized .X. If inplace=True, returns the modified input object; if inplace=False, returns a new normalized copy.