This function gets marker genes for one or multiple grouping variables in the meta data of the provided Seurat object.

getMarkerGenes(
  object,
  assay = "RNA",
  organism = NULL,
  groups = NULL,
  name = "cerebro_seurat",
  only_pos = TRUE,
  min_pct = 0.7,
  thresh_logFC = 0.25,
  thresh_p_val = 0.01,
  test = "wilcox",
  verbose = TRUE,
  ...
)

Arguments

object

Seurat object.

assay

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

organism

Organism information for pulling info about presence of marker genes of cell surface; can be omitted if already saved in Seurat object; defaults to NULL.

groups

Grouping variables (columns) in object@meta.data for which marker genes should be calculated.

name

Name of list that should be used to store the results in object@misc$marker_genes$<name>; defaults to 'cerebro_seurat'.

only_pos

Identify only over-expressed genes; defaults to TRUE.

min_pct

Only keep genes that are expressed in at least n% of current group of cells, defaults to 0.70 (70%).

thresh_logFC

Only keep genes that show an average logFC of at least n; defaults to 0.25.

thresh_p_val

Threshold for p-value, defaults to 0.01.

test

Statistical test used, defaults to 'wilcox' (Wilcoxon test).

verbose

Print progress bar; defaults to TRUE.

...

Further parameters can be passed to control Seurat::FindAllMakers().

Value

Seurat object with marker gene results for the specified grouping variables stored in object@misc$marker_genes.

Examples

pbmc <- readRDS(system.file("extdata/v1.3/pbmc_seurat.rds", package = "cerebroApp")) pbmc <- getMarkerGenes( object = pbmc, assay = 'RNA', organism = 'hg', groups = c('sample','seurat_clusters'), name = 'cerebro_seurat', only_pos = TRUE, min_pct = 0.7, thresh_logFC = 0.25, thresh_p_val = 0.01, test = 'wilcox', verbose = TRUE )
#> [17:53:52] Get marker genes for 2 groups in `sample`...
#> Calculating cluster pbmc_1
#> Calculating cluster pbmc_2
#> [17:53:53] Get marker genes for 3 groups in `seurat_clusters`...
#> Calculating cluster 0
#> Calculating cluster 1
#> Calculating cluster 2