Question: Exporting Raw counts into .csv file from seurat object
0
gravatar for David_emir
7 weeks ago by
David_emir370
India
David_emir370 wrote:

Hi All,

I need to save Raw counts into .csv file from my Seurat object, I have tried the following code but it is not working for me

expr_raw <- GetAssayData(object = alldata, assay.type = "RNA", slot = "counts")
expr <- as(Class = 'matrix', object = expr_raw)

It gives the following error

Error in asMethod(object) : 
  Cholmod error 'problem too large' at file ../Core/cholmod_dense.c, line 105

Kindly help me to save the raw counts from my Seurat object into a CSV file.

thanks a lot and have a great day ahead,

Dave

seurat counts raw csv • 227 views
ADD COMMENTlink modified 5 weeks ago by ccruizm.mv10 • written 7 weeks ago by David_emir370

Hey Dave, strange error message, but it seems to have been reported a lot. Can you check the other queries about it via your search engine of choice and then report back here to help us?

ADD REPLYlink modified 7 weeks ago • written 7 weeks ago by Kevin Blighe61k
1
gravatar for ccruizm.mv
5 weeks ago by
ccruizm.mv10
ccruizm.mv10 wrote:

Hi there,

This is how I do it. Hope it helps

write.table(as.matrix(GetAssayData(object = seurat.obj, slot = "counts")), 
            '/your/path/to/store/csv/counts.csv', 
            sep = ',', row.names = T, col.names = T, quote = F)
ADD COMMENTlink modified 5 weeks ago • written 5 weeks ago by ccruizm.mv10
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 980 users visited in the last hour