rapids_singlecell.pp.normalize_total#
- rapids_singlecell.pp.normalize_total(adata, *, target_sum=None, layer=None, inplace=True, copy=False)[source]#
Normalizes rows in matrix so they sum to
target_sum
- Parameters:
- adata AnnData
AnnData object
- target_sum int | None (default:
None
) If
None
, after normalization, each observation (cell) has a total count equal to the median of total counts for observations (cells) before normalization.- layer int | str (default:
None
) Layer to normalize instead of
X
. IfNone
,X
is normalized.- inplace bool (default:
True
) Whether to update
adata
or return the matrix.- copy bool (default:
False
) Whether to return a copy or update
adata
. Not compatible with inplace=False.
- Return type:
AnnData | sparse.csr_matrix | cp.ndarray | None
- Returns:
Returns a normalized copy or updates
adata
with a normalized version of the originaladata.X
andadata.layers['layer']
, depending oninplace
.