Run topic modeling with GSEA result

runLDA(
  SeuratObj,
  by = "GO",
  k = NULL,
  method = "VEM",
  SEED = 1234,
  plot = TRUE,
  BP.only = FALSE
)

Arguments

SeuratObj

Object of class "Seurat"

by

using which GSEA result to run topic modeling, one of "GO", "KEGG", "Reactome", "MSigDb", "WikiPathways", "DO", "NCG", "DGN"

k

number of topics. Can be a specific k, if NULL, calculate best k automatically(time-consuming)

method

method used for fitting a LDA model; currently "VEM" or "Gibbs" are supported.

SEED

seed

plot

whether or not to plot metrics used to decide the number of topics

BP.only

use only pathways of Biological Process (BP) to run topic modeling. Take effect when by = "GO".

Value

a Seurat object with topic modeling result stored in the SeuratObj@misc$ldaOut

Examples

if (FALSE) { k <- 10 SeuratObj <- runLDA(SeuratObj, by = "GO", k = k, method = "VEM", SEED = 1234, plot = T) SeuratObj@misc$ldaOut # where the topic modeling result is stored }