Find selective markers for one cluster automatically

I detected all markers for each cluster and checked 20 top markers for my clusters one by one. Is there any way that I figure out the selective markers automatically from all the clusters?

For instance, in seurat tutorial, I found comparing one cluster two or three other clusters, but I want to see for instance what are the 10 top markers or genes that are expressed only in cluster of interest.

1 Answer

Directly copy-pasting from one of the Seurat vignettes:

# find markers for every cluster compared to all remaining cells, report only the positive ones
pbmc.markers <- FindAllMarkers(pbmc, only.pos = TRUE, min.pct = 0.25, logfc.threshold = 0.25)
pbmc.markers %>%
group_by(cluster) %>%
top_n(n = 2, wt = avg_log2FC)


Change n to 10 in the top_n() call and filter for your cluster of interest and you will get what you want.

• Thanks a lot, I realized this code exist in seurat web page, but I didn't know that does the same. Thanks for answering. Jun 11 at 7:47