dotools_py.pp.log_normalize

Contents

dotools_py.pp.log_normalize#

dotools_py.pp.log_normalize(adata, target_sum=10000, log_data=True)[source]#

Apply LogNormalization.

The data in X will be log-normalize to 10,000 reads per cell. The shifted logarithm works beneficial for stabilizing variance for subsequent dimensionality reduction and identification of differentially expressed genes. The returned anndata object will contain 3 layers: * counts: contains the raw un-normalized counts * logcounts: contains the log-normalize counts Additionally, the log-normalize counts will also be saved under the X attribute. If log_data is set to False, the normalized counts without logarithm transformation are kept and a layer named norm_counts will be added.

Parameters:
adata AnnData

Annotated data matrix.

target_sum int (default: 10000)

Target number of reads per cell to normalize to.

log_data bool (default: True)

If set to True logarithm transformation is applied to the data.

Return type:

None

Returns:

Returns None. Changes will be performed inplace.