Seurats' documentation for
FindClusters() function it is written that for around
3000 cells the
resolution parameter should be from
0.6 and up to
1.2. I am wondering then what should I use if I have
60 000 cells? How to determine that?
Assuming you have an informative selection of variable genes from which you have constructed a number of useful PCs, I'd run a number of iterations with
FindClusters() as described in the other answer, then choose a level which overclusters the dataset (for example, clusters that are visibly separate on a t-SNE or other dimensionality reduction plot should definitely have their own number):
seuratobject <- SetAllIdent(seuratobject, id='chosen.resolution')
Assessing the cluster markers for each node will hopefully give you a good idea on which clusters should be combined. Then you can "combine" the clusters and re-label the cells using something like:
library(plyr) cell.labels <- seuratobject@ident cell.labels <- mapvalues(cell.labels, from=0:16, # cluster numbers to=c('A', 'B', 'C', 'C', 'D', 'E', 'E', ... )) # etc seuratobject <- AddMetaData(seuratobject, cell.labels, 'Combined.clusters')
The usefulness of the clustering will very much depend on the selection of variable genes, therefore, depending on the (diversity of the) dataset, you will want to experiment with selection parameters or subset the dataset and repeat the above procedure.
That is a very general recommendation. Depending on your experiment, you can get a very different number of clusters with the same number of cells at the same resolution.
You can actually use a vector of different resolutions and see which one performs best:
pbmc_small <- FindClusters( object = pbmc_small, reduction.type = "pca", resolution = c(0.4, 0.8, 1.2), dims.use = 1:10, save.SNN = TRUE )
Have a look into clustree, to assess the different clusters by clustering them and see different levels ...
library(clustree) data("iris_clusts") #plot the tree of clusters with K1 to K5 = different clustering resolution clustree(iris_clusts, prefix = "K")
Using the stability index to assess clusters
The stability index from the SC3 package (Kiselev et al. 2017) measures the stability of clusters across resolutions and is automatically calculated when a clustering tree is built. Note that every level of clustering correspond to a different resolution used.
clustree(iris_clusts, prefix = "K", node_colour = "sc3_stability")