R/getMarkerGenes.R
getMarkerGenes.Rd
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, ... )
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
|
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(). |
Seurat object with marker gene results for the specified grouping variables
stored in object@misc$marker_genes
.
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 )#>#>#>#>#>#>#>