text: user3171: 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!
  
  user3415: 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 WhichCells:
  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)
  
  
original_text: 3171: <p>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!</p>
   3415: <p>You can access data within the Seurat object using <code>GetAssayData</code>, and extract a list of cell names for the cluster you're interested in using <code>WhichCells</code>:</p>
  
  <pre><code>library(Seurat)
  
  cells.use &lt;- WhichCells(object = pbmc_small, ident = 1)
  expr &lt;- GetAssayData(object = pbmc_small, assay.type = "RNA", slot = "data")[, cells.use]
  expr &lt;- as(Class = 'matrix', object = expr)
  write.csv(x = expr, file = "expression_cluster1.csv", quote = FALSE)
  </code></pre>
  