I would like to label single cell RNAseq UMAP dots by sample batch Under Seurat.like this
The sample batchs showed on the colnames by their first 6 letters and digits (like AAA001xx, AAA002xx and BBB001xx) on the counts matrix (dta). So I firstly tried to split them using
plates<-substr(colnames(dta), 0, 6), and then
DimPlot(dta, reduction = "umap", group.by= plates, label=FALSE). It didn't work.
I think I completely went a wrong direction. Can someone help?