scmorph.pp.scale_by_batch#
- scmorph.pp.scale_by_batch(adata, batch_key, treatment_key=None, control=None, chunked=False)[source]#
Scale data to zero-center and unit variance per batch in-place.
- Parameters:
- adata
AnnData Annotated data matrix.
- batch_key
str Name of the column in the AnnData object that contains the batch information.
- treatment_key
str|None(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.- control
str|None(default:None) Name of control treatment. Must be valid value in
treatment_key.- chunked
bool(default:False) Whether to save memory by processing in chunks. This is slower but less memory intensive.
- adata
- Return type:
None