LIGER provides dataset integration methods based on iNMF (integrative
Non-negative Matrix Factorization [1]) and its variants (online iNMF [2]
and UINMF [3]). This function wraps runINMF,
runOnlineINMF and runUINMF, of which the help
pages have more detailed description.
Usage
runIntegration(
  object,
  k = 20,
  lambda = 5,
  method = c("iNMF", "onlineINMF", "UINMF"),
  ...
)
# S3 method for liger
runIntegration(
  object,
  k = 20,
  lambda = 5,
  method = c("iNMF", "onlineINMF", "UINMF"),
  seed = 1,
  verbose = getOption("ligerVerbose", TRUE),
  ...
)
# S3 method for Seurat
runIntegration(
  object,
  k = 20,
  lambda = 5,
  method = c("iNMF", "onlineINMF"),
  datasetVar = "orig.ident",
  useLayer = "ligerScaleData",
  assay = NULL,
  seed = 1,
  verbose = getOption("ligerVerbose", TRUE),
  ...
)Arguments
- object
 A liger object or a Seurat object with non-negative scaled data of variable features (Done with
scaleNotCenter).- k
 Inner dimension of factorization (number of factors). Generally, a higher
kwill be needed for datasets with more sub-structure. Default20.- lambda
 Regularization parameter. Larger values penalize dataset-specific effects more strongly (i.e. alignment should increase as
lambdaincreases). Default5.- method
 iNMF variant algorithm to use for integration. Choose from
"iNMF","onlineINMF","UINMF". Default"iNMF".- ...
 Arguments passed to other methods and wrapped functions.
- seed
 Random seed to allow reproducible results. Default
1.- verbose
 Logical. Whether to show information of the progress. Default
getOption("ligerVerbose")orTRUEif users have not set.- datasetVar
 Metadata variable name that stores the dataset source annotation. Default
"orig.ident".- useLayer
 For Seurat>=4.9.9, the name of layer to retrieve input non-negative scaled data. Default
"ligerScaleData". For older Seurat, always retrieve fromscale.dataslot.- assay
 Name of assay to use. Default
NULLuses current active assay.
References
Joshua D. Welch and et al., Single-Cell Multi-omic Integration Compares and Contrasts Features of Brain Cell Identity, Cell, 2019
Chao Gao and et al., Iterative single-cell multi-omic integration using online learning, Nat Biotechnol., 2021
April R. Kriebel and Joshua D. Welch, UINMF performs mosaic integration of single-cell multi-omic datasets using nonnegative matrix factorization, Nat. Comm., 2022
Examples
pbmc <- normalize(pbmc)
#> ℹ Normalizing datasets "ctrl"
#> ℹ Normalizing datasets "stim"
#> ✔ Normalizing datasets "stim" ... done
#> 
#> ℹ Normalizing datasets "ctrl"
#> ✔ Normalizing datasets "ctrl" ... done
#> 
pbmc <- selectGenes(pbmc)
#> ℹ Selecting variable features for dataset "ctrl"
#> ✔ ... 168 features selected out of 249 shared features.
#> ℹ Selecting variable features for dataset "stim"
#> ✔ ... 166 features selected out of 249 shared features.
#> ✔ Finally 173 shared variable features are selected.
pbmc <- scaleNotCenter(pbmc)
#> ℹ Scaling dataset "ctrl"
#> ✔ Scaling dataset "ctrl" ... done
#> 
#> ℹ Scaling dataset "stim"
#> ✔ Scaling dataset "stim" ... done
#> 
if (requireNamespace("RcppPlanc", quietly = TRUE)) {
    pbmc <- runIntegration(pbmc)
}