Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/satijalab/seurat-wrappers/llms.txt

Use this file to discover all available pages before exploring further.

RunQuantileNorm() aligns iNMF factor loadings across datasets using quantile normalization, producing the final integrated embedding. It wraps rliger::quantile_norm() and stores the normalized embeddings as a new DimReduc object in the Seurat object. This is the second step of the LIGER workflow, called after RunOptimizeALS().

Syntax

RunQuantileNorm(
  object,
  split.by = "orig.ident",
  reduction = "iNMF_raw",
  reduction.name = "iNMF",
  reduction.key = "iNMF_",
  quantiles = 50,
  ref_dataset = NULL,
  min_cells = 20,
  knn_k = 20,
  dims.use = NULL,
  do.center = FALSE,
  max_sample = 1000,
  eps = 0.9,
  refine.knn = TRUE,
  ...
)

Parameters

object
Seurat
required
A Seurat object after running RunOptimizeALS().
split.by
character
default:"orig.ident"
Metadata column identifying which dataset each cell belongs to. Must match the split.by used in RunOptimizeALS().
reduction
character
default:"iNMF_raw"
Name of the raw iNMF reduction from RunOptimizeALS() to normalize.
reduction.name
character
default:"iNMF"
Name for the resulting normalized DimReduc object.
reduction.key
character
default:"iNMF_"
Prefix for the normalized iNMF dimension column names.
quantiles
integer
default:"50"
Number of quantile bins used in the normalization procedure.
ref_dataset
character or integer
default:"NULL"
Name or index of the reference dataset for alignment. Defaults to the dataset with the most cells.
min_cells
integer
default:"20"
Minimum number of cells required in a cluster for it to be used in quantile alignment.
knn_k
integer
default:"20"
Number of nearest neighbors used in the kNN graph for quantile normalization.
dims.use
integer vector
default:"NULL"
Which iNMF dimensions to use. Defaults to all dimensions.
do.center
logical
default:"FALSE"
Whether to center embeddings before normalization. Should match the value used in ScaleData() (always FALSE for LIGER).
max_sample
integer
default:"1000"
Maximum number of cells to sample per dataset when computing quantiles.
eps
numeric
default:"0.9"
Epsilon parameter for approximate nearest neighbor search precision.
refine.knn
logical
default:"TRUE"
Whether to refine the kNN graph after initial construction.

Returns

A Seurat object with:
  • A new DimReduc under reduction.name (default: iNMF) containing the quantile-normalized embeddings
  • Additional metadata columns from the quantile normalization output stored as cell-level metadata
  • Active identities (Idents()) set to the cluster assignments from quantile normalization

Examples

library(SeuratWrappers)
install.packages('rliger')

# Full LIGER workflow
object <- NormalizeData(object)
object <- FindVariableFeatures(object)
object <- ScaleData(object, split.by = "orig.ident", do.center = FALSE)
object <- RunOptimizeALS(object, k = 20, split.by = "orig.ident")
object <- RunQuantileNorm(object, split.by = "orig.ident")

# Downstream analysis on normalized iNMF embedding
object <- FindNeighbors(object, reduction = "iNMF", dims = 1:ncol(Embeddings(object, "iNMF")))
object <- FindClusters(object)
object <- RunUMAP(object, reduction = "iNMF", dims = 1:ncol(Embeddings(object, "iNMF")))

See Also

Build docs developers (and LLMs) love