grassp.pp.normalize_total

grassp.pp.normalize_total#

normalize_total(data, 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).

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 | None

Returns:

  • If inplace=True, modifies the input AnnData object and returns None.

  • If inplace=False, returns a new AnnData object with normalized values.

Notes

This function normalizes each sample (column) to have the same total intensity. This function serves as a convenient wrapper around normalize_total(), automatically handling the transposition required to work with subcellular protein data (where proteins are rows rather than columns as in typical single-cell data).