This function calculates the most expressed genes for one or multiple grouping variables in the meta data of the provided Seurat object.

getMostExpressedGenes(object, assay = "RNA", groups = NULL)

Arguments

object

Seurat object.

assay

Assay to pull transcripts counts from; defaults to 'RNA'.

groups

Grouping variables (columns) in object@meta.data for which most expressed genes should be calculated; defaults to NULL.

Value

Seurat object with most expressed genes stored for every group level of the specified groups stored in object@misc$most_expressed_genes.

Examples

pbmc <- readRDS(system.file("extdata/v1.3/pbmc_seurat.rds", package = "cerebroApp")) pbmc <- getMostExpressedGenes( object = pbmc, assay = 'RNA', groups = c('sample','seurat_clusters') )
#> [17:53:53] Get most expressed genes for 2 groups in `sample`...
#> [17:53:53] Get most expressed genes for 3 groups in `seurat_clusters`...