This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Merge clusters in Seurat UMAP

Hello,

I would like to merge the clusters 0, 5, and 11 into named only "0". Because I want to present them by the same color.

I tried;

Idents(seuratobj) <- c( "0" , "1", "2", "3", "4", "0", "6", "7" , "8" , "9", "10", "0", "12", "13", "14")

It did not work. Do you have suggestions?

Thank you!

seurat umap

I have not tested but you could try something like below-

seuratobj$seurat_clusters[seuratobj$seurat_clusters==5]=0
seuratobj$seurat_clusters[seuratobj$seurat_clusters==11]=0

Thank you for the response but it does not change anything.

Can you try this?

library(dplyr)
seuratobj@meta.data <- seuratobj@meta.data %>%
    mutate(seurat_clusters = recode(seurat_clusters,
                              "5" = "0",
                              "11" = "0"))

It did not help either. But I got the answer here Thank you!

0 answers

No answers yet.

Log in to answer this question.