cole-trapnell-lab / monocle-release

280 stars 116 forks source link

Error: unable to coerce from TsparseMatrix to [CR]sparseMatrixwhen length of 'i' slot exceeds 2^31-1 #500

Open abulislam opened 1 year ago

abulislam commented 1 year ago

Monocle2 error:

library(monocle) library(Matrix) library(reshape2)

Seurat

An object of class Seurat 41445 features across 55683 samples within 1 assay Active assay: RNA (41445 features, 1850 variable features) 4 dimensional reductions calculated: pca, tsne, umap, harmony

cds <- importCDS(Seurat, import_all=TRUE) cds <- estimateSizeFactors(cds) cds <- estimateDispersions(cds)

Error in h(simpleError(msg, call)) : error in evaluating the argument 'x' in selecting a method for function 'rowMeans': unable to coerce from TsparseMatrix to [CR]sparseMatrixwhen length of 'i' slot exceeds 2^31-1

How to solve this?

Thanks.

SessionInfo()

R version 4.2.2 (2022-10-31) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Fedora Linux 38 (Workstation Edition)

attached base packages: [1] splines stats4 stats graphics grDevices utils datasets [8] methods base

other attached packages: [1] reshape2_1.4.4 monocle_2.28.0 DDRTree_0.1.5
[4] irlba_2.3.5.1 VGAM_1.1-7 ggplot2_3.4.1
[7] Biobase_2.58.0 BiocGenerics_0.44.0 Matrix_1.6-0

loaded via a namespace (and not attached): [1] tidyselect_1.2.0 slam_0.1-50 lattice_0.20-45
[4] colorspace_2.1-0 vctrs_0.6.1 generics_0.1.3
[7] fastICA_1.2-3 viridisLite_0.4.1 utf8_1.2.3
[10] leidenbase_0.1.14 rlang_1.1.1 pillar_1.8.1
[13] glue_1.6.2 withr_2.5.0 RColorBrewer_1.1-3
[16] HSMMSingleCell_1.18.0 matrixStats_0.63.0 lifecycle_1.0.3
[19] plyr_1.8.8 stringr_1.5.0 munsell_0.5.0
[22] combinat_0.0-8 gtable_0.3.1 parallel_4.2.2
[25] fansi_1.0.4 Rcpp_1.0.10 scales_1.2.1
[28] limma_3.54.2 gridExtra_2.3 RANN_2.6.1
[31] stringi_1.7.12 Rtsne_0.16 sparsesvd_0.2-2
[34] qlcMatrix_0.9.7 dplyr_1.1.0 grid_4.2.2
[37] cli_3.6.0 tools_4.2.2 magrittr_2.0.3
[40] tibble_3.2.1 cluster_2.1.4 pkgconfig_2.0.3
[43] docopt_0.7.1 pheatmap_1.0.12 viridis_0.6.2
[46] R6_2.5.1 igraph_1.4.1 compiler_4.2.2

leehua121 commented 4 months ago

It seems to be an error caused by an excessive number of cells.