clusterExperiment icon indicating copy to clipboard operation
clusterExperiment copied to clipboard

Store counts as integers

Open epurdom opened this issue 7 years ago • 2 comments

to save space.

epurdom avatar Mar 15 '18 13:03 epurdom

Just a quick check on one of my example matrices:

> object_size(assay(cl2))
194 MB
> object_size(round(assay(cl2)))
194 MB
> object_size(as.integer(assay(cl2)))
96.5 MB

So it seems a good idea if we always round the counts anyway...

Also, considering sparse matrices also helps, but may need some work to have our functions work with sparse matrices:

> mat <- as(as.integer(assay(cl2)), "sparseMatrix")
> object_size(mat)
52.6 MB

drisso avatar Mar 15 '18 15:03 drisso

BTW this was a ~11,000 genes times ~2300 cells matrix.

drisso avatar Mar 15 '18 15:03 drisso