Learn R Programming

jrSiCKLSNMF (version 1.2.3)

NormalizeCountMatrices: Normalize the count matrices and set whether to use the Poisson KL divergence or the Frobenius norm

Description

Normalize the count data within each modality. The default normalization, which should be used when using the KL divergence, is median library size normalization Zheng2017,Elyanow2020jrSiCKLSNMF. To perform median library size normalization, each count within a cell is divided by its library size (i.e. the counts within a column are divided by the column sum). Then, all values are multiplied by the median library size (i.e. the median column sum). To use the Frobenius norm, set frob=TRUE to log\((x+1)\) normalize your count data and use a desired scaleFactor. You may also use a different form of normalization and store these results in the normalized.count.matrices slot.

Usage

NormalizeCountMatrices(SickleJr, diffFunc = "klp", scaleFactor = NULL)

Value

An object of class SickleJr with a list of sparse, normalized data matrices added to its normalized.count.matrices slot

Arguments

SickleJr

An object of class SickleJr

diffFunc

A string set to "klp" when using the Poisson KL divergence or to "fr" when using the Frobenius norm: default is KL divergence; this also determines the type of normalization

scaleFactor

A single numeric value (if using the same scale factor for each modality) or a list of numeric values to use (if using different scale factors in different modalities) as scale factors for the log\((x+1)\) normalization when diffFunc="fr"

References

Elyanow2020jrSiCKLSNMF

Zheng2017jrSiCKLSNMF

Examples

Run this code
SimSickleJrSmall<-NormalizeCountMatrices(SimSickleJrSmall)
SimSickleJrSmall<-NormalizeCountMatrices(SimSickleJrSmall, diffFunc="fr",scaleFactor=1e6)

Run the code above in your browser using DataLab