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

Hello I am trying to pull out CD8 T cell clusters from my seurat object. I am using the code

CD8 <- CH005@meta.data[“seurat_clusters” %in% c(1,2,3,7,8),]

But it keeps resturning an empty table. Does anyone have any suggestions? Thanks!

rna-seq seurat r 10x

1 answer

Instead of accessing the object slots directly, you can use the subset function.

CD8 <- subset(CH005, subset=seurat_clusters %in% c(1, 2, 3, 7, 8))

Log in to answer this question.