Merge clusters in Seurat UMAP
0
0
Entering edit mode
5 weeks ago
kilcdincer ▴ 10

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 • 460 views
ADD COMMENT
0
Entering edit mode

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
ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

Can you try this?

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

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

ADD REPLY

Login before adding your answer.

Traffic: 1188 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6