scmorph.pp.scale

Contents

scmorph.pp.scale#

scmorph.pp.scale(adata, treatment_key=None, control=None, chunked=False)#

Scale data to unit variance per feature while maintaining a low memory footprint (operates in-place).

Parameters:
  • adata (AnnData) – Annotated data matrix.

  • batch_key – Name of the column in the AnnData object that contains the batch information.

  • treatment_key (Optional[str] (default: None)) – Name of column used to delinate treatments. This is used when computing batch effects across drug-treated plates. In that case, we compute batch effects only on untreated cells and then apply the correction factors to all cells. If using, please also see control.

  • chunked (bool (default: False)) – Whether to save memory by processing in chunks. This is slower but less memory intensive.

Return type:

None