spac.transformations.z_score_normalization(adata, output_layer, input_layer=None, **kwargs)[source]

Compute z-scores for the provided AnnData object.

Parameters:
  • adata (anndata.AnnData) – The AnnData object containing the data to normalize.

  • output_layer (str) – The name of the layer to store the computed z-scores.

  • input_layer (str, optional) – The name of the layer in the AnnData object to normalize. If None, the main data matrix .X is used.

  • **kwargs (dict, optional) – Additional arguments to pass to scipy.stats.zscore.