knitr::opts_chunk$set(echo = TRUE)
COSG is a cosine similarity-based method for more accurate and scalable marker gene identification.
The method and benchmarking results are described in Dai et al., (2021).
# install.packages('remotes') remotes::install_github(repo = 'genecell/COSGR')
Load the library:
library(COSG) library(Seurat)
marker_cosg<-cosg( pbmc_small, groups='all', assay='RNA', slot='data', mu=1, n_genes_user=2000)
Check markers:
head(marker_cosg$names)
Check scores:
head(marker_cosg$scores)
top_list<-c() for (group in colnames(marker_cosg$names)){ top_i<-marker_cosg$names[group][1:10,1] top_list<-c(top_list,top_i) }
Expression pattern:
DotPlot(pbmc_small, assay = 'RNA', features = unique(top_list)) + RotatedAxis()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.