This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to create a table for Cell, Gene, UMI using a seurat object

Hi everyone,

I am working on 10X single-cell data. I created a seurat object following SCTransform pipeline. I wonder if it's possible to create a table using the Seurat object, which shows all the detected Genes, Cells, and UMIs. Then I plan to save this extracted table as a csv file for further works like filtering, sorting etc. It would be greatly appreciated if you could provide me with that code.

Thanks,
Volkan

seurat umi scrna-seq

1 answer

To extract the data you can either access the object hierarchy or use the seurat function GetAssayData.

myData <- srtObject@assay$SCT@count

myData <- GetAssayData(object = srtObject, slot = "count")

You can chose between counts (unormalised), data (normalised), and scale.data (scaled), based on your needs. After, myData can be manipulated as a matrix or converted to data.frame (as.data.frame(myData)).

Have a look at the Data Access section of the seurat documentation

Thank you fracarb8 for your prompt reply. Finally, I created the table following your advice.

Log in to answer this question.