spac.data_utils.add_rescaled_features(adata, min_quantile, max_quantile, layer)[source]

Clip and rescale the features matrix.

The results will be added into a new layer in the AnnData object.

Parameters:
  • adata (anndata.AnnData) – The AnnData object.

  • min_quantile (float) – The minimum quantile to rescale to zero.

  • max_quantile (float) – The maximum quantile to rescale to one.

  • layer (str) – The name of the new layer to add to the anndata object.