grassp.pp.normalize_total

grassp.pp.normalize_total#

normalize_total(data, copy=False, inplace=True, **kwargs)[source]#

Normalize expression values for each sample to sum to a constant value.

Parameters:
data AnnData

The annotated data matrix with proteins as observations (rows).

copy bool (default: False)

Whether to modify data in place or return a copy.

inplace bool (default: True)

Whether to modify data in place or return normalization factors.

**kwargs

Additional arguments to pass to scanpy.pp.normalize_total.

Return type:

AnnData | dict[str, ndarray] | None

Returns:

AnnData or dict or None If copy=True, returns a copy of the AnnData object. If inplace=False, returns dictionary containing normalization factors. If inplace=True, returns None and modifies input data.

Notes

This function normalizes each sample (column) to have the same total counts. By default, after normalization each sample will sum to 1e6.