Run non-negative matrix factorization(NMF or NNMF) using sequential coordinate-wise descent or multiplicative updates on Seurat object.

runNMF(
  object,
  assay = DefaultAssay(object),
  k = 6,
  raster = F,
  n.threads = 2,
  features = NULL,
  feature.min.pct = 0,
  max.iter = 50,
  gene.cutoff = 0.5,
  gene.n = 50,
  reduction = "umap",
  sample.name = NULL,
  show.top.n = 10,
  pathway.db = "Bader",
  do.enrichment = T,
  verbose = T,
  ...
)

Arguments

object

Seurat object

assay

assay. Default is DefaultAssay(object).

k

Number of NMF gene programs Default is 6.

raster

rasterize output plot. Default is F.

n.threads

Number of threads to use when running NMF. Default is 2.

features

features to run NMF on.

feature.min.pct

minimum expressing fraction for feature to run NMF on. Default is 0. Ignored if `features` are specified.

max.iter

Maximum iteration of alternating NNLS solutions to H and W

gene.cutoff

Feature loading cutoff threshold [0,1]. Default = 0.5. Ignored if gene.n is specified.

gene.n

number of genes to return per gene program

reduction

reduction used for visualizing gene program expression. Default is "umap".

sample.name

sample name. Default is NULL.

show.top.n

number of enrichment terms to show in summary plots. Ignoried if do.enrichment = F.

pathway.db

pathway database to use for enrichment analysis. Options are "GO" or "Bader". Default is "Bader". Ignored if do.enrichment = F.

do.enrichment

Whether to run enrichment analysis.

verbose

Print progress. Default is TRUE.

...

additional arguments passed to NNLM::nnmf(...)

Value

Seurat object with NMF results in reduction slot. Program genes are stored in "misc" slot of NMF reduction slot.

See also

nnmf

Author

Nicholas Mikolajewicz