How to create a table for Cell, Gene, UMI using a seurat object
1
0
Entering edit mode
3.4 years ago
VolEr ▴ 40

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 • 4.0k views
ADD COMMENT
1
Entering edit mode
3.4 years ago
fracarb8 ★ 1.7k

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

ADD COMMENT
0
Entering edit mode

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

ADD REPLY

Login before adding your answer.

Traffic: 2090 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6