scdynomics.utils.pp.normalize

Normalization modules for scDynOmics

author: jy

Functions

cpm_promoter([adata, layer, target_sum, ...])

Normalize PCAM by number of gene's associated transcripts.

l1_normalize(tensor)

L1 normalize a tensor Note: Not really for adata but explanation results.

normalize_adata([adata, layer, target_sum, ...])

Normalize the adata using the specified method and save if required.

tpm([adata, layer, target_sum])

Calculate TPM from a csr sparse matrix of gene expression data.

scdynomics.utils.pp.normalize.cpm_promoter(adata=None, layer: str = None, target_sum: float = None, exclude_highly_expressed: bool = False, max_fraction: float = 0.05) anndata.AnnData

Normalize PCAM by number of gene’s associated transcripts.

scdynomics.utils.pp.normalize.l1_normalize(tensor: torch.Tensor)

L1 normalize a tensor Note: Not really for adata but explanation results.

scdynomics.utils.pp.normalize.normalize_adata(adata: anndata.AnnData = None, layer: str = None, target_sum: float = 1000000.0, exclude_highly_expressed: bool = False, max_fraction: float = 0.05, method: str = 'cpm', log1p: bool = True, savepath: str = None) anndata.AnnData

Normalize the adata using the specified method and save if required.

scdynomics.utils.pp.normalize.tpm(adata=None, layer: str = None, target_sum: float = 1000000.0) anndata.AnnData

Calculate TPM from a csr sparse matrix of gene expression data.