CreateSeuratObject taking very long
0
0
Entering edit mode
6 months ago
eae6d2e7 • 0

I have my data with 33694 obs of 63690 variables, and it has been 2 hours since I ran the below command and it still isn't complete.

seu_obj<-CreateSeuratObject(count=raw_data)

Is there any way to speed this up?

Also I am getting this warning message "Warning: Data is of class data.frame. Coercing to dgCMatrix." Is this the reason for long time?

Posted here as well https://www.reddit.com/r/bioinformatics/comments/1cwfx59/createseuratobject_taking_very_long/

seurat • 590 views
ADD COMMENT
0
Entering edit mode

I am not sure whether it will speedup the conversion but you can give it a try. convert your dataframe into a sparse matrix before creating a seurat object.

raw_data <- Matrix::sparseMatrix(raw_data)
seu_obj<-CreateSeuratObject(count=raw_data)

Side not, check for duplicate entries. I am not expecting this will speed up the conversion or anything but it is just a good practice to look at it in advance.

All the best.

Regards, Nitin N.

ADD REPLY
0
Entering edit mode

Thank you for your reply!

I followed your advice to convert to sparse matrix first but I got this error Error in Matrix::sparseMatrix(raw_data) : exactly one of 'i', 'j', and 'p' must be missing from call

What does it mean?

ADD REPLY

Login before adding your answer.

Traffic: 2397 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