tacco.utils.scale_counts¶
- scale_counts(adata, rescaling_factors, counts_location=None, round=False)[source]¶
Scales the count matrix in an
AnnData
in various locations inplace.- Parameters:
adata – The
AnnData
with the counts to scalerescaling_factors – The gene-wise rescaling factors
counts_location – A string or tuple specifying where the count matrix is stored, e.g. ‘X’, (‘raw’,’X’), (‘raw’,’obsm’,’my_counts_key’), (‘layer’,’my_counts_key’), … For details see
counts()
.round – Whether to round the result to integer values
- Returns:
None. This is an inplace operation.