dynamo.pp.scale

dynamo.pp.scale(adata, layers=None, scale_to_layer=None, scale_to=1000000.0)[source]

Scale layers to a particular total expression value, similar to normalize_expr_data function.

Parameters
  • adata (AnnData) – an AnnData object.

  • layers (Union[List[str], str, None]) – the layers to scale. Defaults to None.

  • scale_to_layer (Optional[str]) – use which layer to calculate a global scale factor. If None, calculate each layer’s own scale factor and scale all layers to same total value. Defaults to None.

  • scale_to (float) – the total expression value that layers are scaled to. Defaults to 1e6.

Return type

AnnData

Returns

The scaled AnnData object.