假如要添加k-means聚类标签:
object@meta.data$k.means.clusters <- k.means.result
绘制自定义标签的UMAP图:
DimPlot(object , reduction=‘umap’,group.by = “k.means.clusters”)
同时显示自定义标签和UMAP图和Seurat中louvain聚类的UMAP图
plot3<-DimPlot(object, reduction = “umap”,group.by = ‘ident’)
plot4<-DimPlot(object,reduction = “umap”,group.by = ‘k.means.clusters’)
plot3+plot4