This function applies Chi-squared normalization to a (sample-level) Seurat object. It calculates the expected density (count of cells) for each landmark-sample pair assuming random distribution, then normalizes observed counts using: (observed - expected) / √(expected). The resulting values show how much each landmark's density deviates from the expected baseline—density values. Positive values indicate higher-than-expected density, negative values indicate lower-than-expected density.
NormalizeChiSquared(object, ...)
# Default S3 method
NormalizeChiSquared(object = NULL, verbose = TRUE, ...)
# S3 method for class 'Assay'
NormalizeChiSquared(object, verbose = TRUE, ...)
# S3 method for class 'StdAssay'
NormalizeChiSquared(
object,
layer = "counts",
save = "data",
verbose = TRUE,
...
)
# S3 method for class 'Seurat'
NormalizeChiSquared(object, assay = NULL, verbose = TRUE, ...)a count matrix (a landmark-sample density matrix), Assay, StdAssay, or Seurat object
Additional arguments
display progress bar for normalization procedure
Layer to use (for StdAssay objects)
Layer to save results to (for StdAssay objects)
Name of assay to use (for Seurat objects)
Normalized object of the same class as input
if (FALSE) { # \dontrun{
# Normalize a sample-level Seurat object
sample_obj <- NormalizeChiSquared(sample_obj)
} # }