I was using Seurat to analysis single-cell RNA Seq. And I was interested in only one cluster by using the Seurat. Does anyone know how to achieve the cluster's data(.csv file) by using Seurat or any other method that can do this function? Thank you!
You can access data within the Seurat object using
GetAssayData, and extract a list of cell names for the cluster you're interested in using
library(Seurat) cells.use <- WhichCells(object = pbmc_small, ident = 1) expr <- GetAssayData(object = pbmc_small, assay.type = "RNA", slot = "data")[, cells.use] expr <- as(Class = 'matrix', object = expr) write.csv(x = expr, file = "expression_cluster1.csv", quote = FALSE)