-
Notifications
You must be signed in to change notification settings - Fork 93
Open
Description
Starting from an Anndata object
library(anndata)
ad <- read_h5ad("integration_cellType.h5ad")
normalized_data <- t(as.matrix(ad$X))
library(Matrix)
data.input <- as(normalized_data, "dgCMatrix")
Error in .m2sparse(from, "dgC"): attempt to construct sparseMatrix with more than 2^31-1 nonzero entries
Traceback:
- asMethod(object)
- .m2sparse(from, "dgC")
- .handleSimpleError(function (cnd)
. {
. watcher$capture_plot_and_output()
. cnd <- sanitize_call(cnd)
. watcher$push(cnd)
. switch(on_error, continue = invokeRestart("eval_continue"),
. stop = invokeRestart("eval_stop"), error = NULL)
. }, "attempt to construct sparseMatrix with more than 2^31-1 nonzero entries",
. base::quote(.m2sparse(from, "dgC")))
When I run data.input <- as(normalized_data, "dgCMatrix"), the following error occurs. How can I solve it?

Metadata
Metadata
Assignees
Labels
No labels