multiNMF {GeneNMF} | R Documentation |
Run NMF on a list of Seurat objects
Description
Given a list of Seurat objects, run non-negative matrix factorization on each sample individually, over a range of target NMF components (k).
Usage
multiNMF(
obj.list,
assay = "RNA",
slot = "data",
k = 5:6,
hvg = NULL,
nfeatures = 2000,
L1 = c(0, 0),
min.exp = 0.01,
max.exp = 3,
center = FALSE,
scale = FALSE,
min.cells.per.sample = 10,
hvg.blocklist = NULL,
seed = 123
)
Arguments
obj.list |
A list of Seurat objects |
assay |
Get data matrix from this assay |
slot |
Get data matrix from this slot (=layer) |
k |
Number of target components for NMF (can be a vector) |
hvg |
List of pre-calculated variable genes to subset the matrix. If hvg=NULL it calculates them automatically |
nfeatures |
Number of HVG, if calculate_hvg=TRUE |
L1 |
L1 regularization term for NMF |
min.exp |
Minimum average log-expression value for retaining genes |
max.exp |
Maximum average log-expression value for retaining genes |
center |
Whether to center the data matrix |
scale |
Whether to scale the data matrix |
min.cells.per.sample |
Minimum numer of cells per sample (smaller samples will be ignored) |
hvg.blocklist |
Optionally takes a vector or list of vectors of gene names. These genes will be ignored for HVG detection. This is useful to mitigateeffect of genes associated with technical artifacts and batch effects (e.g. mitochondrial), and to exclude TCR and BCR adaptive immune(clone-specific) receptors. If set to 'NULL' no genes will be excluded |
seed |
Random seed |
Value
Returns a list of NMF programs, one for each sample and for each
value of 'k'. The format of each program in the list follosw the
structure of nmf
factorization models.
Examples
library(Seurat)
data(sampleObj)
geneNMF_programs <- multiNMF(list(sampleObj), k=5)