Home > Community > Resolution parameter in Seurat's FindClusters function for larger cell numbers
Upvote

31

Downvote
+ R
+ Bioinformatics
Posted by
Olaide Asimolowo Adeyemi

Resolution parameter in Seurat's FindClusters function for larger cell numbers

David York  Follow

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# K1 to K5 correspond to different clustering resolutionsclustree(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. The stability index is automatically calculated when a clustering tree is built. Note that each level of clustering corresponds to a different resolution.

clustree(iris_clusts, prefix = "K", node_colour = "sc3_stability")

enter image description here

More

Upvote

VOTE

Downvote
John Murphy  Follow
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?More
Upvote

VOTE

Downvote
James  Follow
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).More
Upvote

VOTE

Downvote
Gabriela Garcia  Follow
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.More
Upvote

VOTE

Downvote
Dr. Melih Aygun  Follow
NIce! That's much better.More
Upvote

VOTE

Downvote
Jack Horn  Follow
I add more details now, I hope it can help !More
Upvote

VOTE

Downvote
more replies
Andrew Karonis  Follow

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)

More

Upvote

VOTE

Downvote
Hal Berenson  Follow
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.More
Upvote

VOTE

Downvote
F●●l?sh €ndeav●rs  Follow
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.More
Upvote

VOTE

Downvote
Mike Isham  Follow

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@identcell.labels <- mapvalues(cell.labels,  from=0:16, # cluster numbers  to=c('A', 'B', 'C', 'C', 'D', 'E', 'E', ... )) # etcseuratobject <- 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.

More

Upvote

VOTE

Downvote
Helmut Bammer  Follow
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?More
Upvote

VOTE

Downvote