5
$\begingroup$

In 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?

$\endgroup$
6
$\begingroup$

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')

Then run:

Seurat::BuildClusterTree()
Seurat::FindAllMarkersNode()

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.

$\endgroup$
1
  • $\begingroup$ Hi, I am using Seurat and URD; Let's say both give 3 clusters on 200 cells, however seurat gives stronger marker genes for these clusters whereas URD gives very weak marker genes. I really got puzzled which of Seurat or URD cluster my 200 more proper? Is there any way to judge them? As I know, I just noticed Seurat clusters make more sense biologically :( :( But if seurat is right in clustering, why I am not able to reproduce clusters by URD? $\endgroup$
    – Exhausted
    Oct 5 '18 at 16:52
3
$\begingroup$

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
)
$\endgroup$
2
  • $\begingroup$ What does it mean best? How to assess it? There will be different number of clusters, but I do not know which number is correct. $\endgroup$ May 14 '18 at 20:42
  • 4
    $\begingroup$ There is no software tool that will tell you what is the best number of clusters. You will have to check the expression of known genes or cluster markers to determine which clusters make the most biological sense. This step is probably the most difficult part of single-cell analysis. $\endgroup$
    – burger
    May 14 '18 at 20:50
2
$\begingroup$

Have a look into clustree, to assess the different clusters by clustering them and see different levels ...

Example:

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")

enter image description here

$\endgroup$
5
  • $\begingroup$ Hi Samad, thanks for joining us at Bioinfo.SE. "different clusters by clustering them and see different levels ..." sounds rather confusing, and also it's not directly answering the original question? How does this package help to find a resolution parameter? $\endgroup$
    – Kamil S Jaron
    Jun 6 '19 at 11:58
  • $\begingroup$ I used it to assess all resolution values by plotting the clusters tree and see at which resolution the groups of cells are well defined. $\endgroup$
    – Samad Elka
    Jun 12 '19 at 9:41
  • 1
    $\begingroup$ What I meant is, that your answer seems on spot, but a reader could use a bit more detail, so I wanted to encourage you to edit it and add a sentence or two explaining how can clustree be used to get a good value of resolution (i.e. what you wrote in the comment). $\endgroup$
    – Kamil S Jaron
    Jun 12 '19 at 11:12
  • $\begingroup$ I add more details now, I hope it can help ! $\endgroup$
    – Samad Elka
    Jun 12 '19 at 13:16
  • 1
    $\begingroup$ NIce! That's much better. $\endgroup$
    – Kamil S Jaron
    Jun 12 '19 at 14:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.