runNMF {GeneNMF} | R Documentation |
Compute NMF as a low-dim embedding for Seurat
Description
Compute NMF embeddings for single-cell dataset, and store them in the Seurat data structure. They can be used as an alternative to PCA for downstream analyses.
Usage
runNMF(
obj,
assay = "RNA",
slot = "data",
k = 10,
new.reduction = "NMF",
seed = 123,
L1 = c(0, 0),
hvg = NULL,
center = FALSE,
scale = FALSE
)
Arguments
obj |
A seurat object |
assay |
Get data matrix from this assay |
slot |
Get data matrix from this slot (=layer) |
k |
Number of components for low-dim representation |
new.reduction |
Name of new dimensionality reduction |
seed |
Random seed |
L1 |
L1 regularization term for NMF |
hvg |
Which genes to use for the reduction |
center |
Whether to center the data matrix |
scale |
Whether to scale the data matrix |
Value
Returns a Seurat object with a new dimensionality reduction (NMF)
Examples
data(sampleObj)
sampleObj <- runNMF(sampleObj, k=8)
[Package GeneNMF version 0.6.0 Index]