cole-trapnell-lab / monocle-release

276 stars 116 forks source link

Error in minimum.spanning.tree(gp) : d_indheap reserve failed, Out of memory #102

Open chadi-elfarran opened 6 years ago

chadi-elfarran commented 6 years ago

Greetings to you.

Firstly, I would like to thank you for creating this wonderful tool.

I am trying to use monocle 2 for performing pseudotime analysis for 10x scRNA-Seq libraries.

If I run the test with 25K cells, it runs smoothly but takes long time (~45 hrs). However, when the number of cells increases to 32K cells, the analysis crashes and the error displayed is:

"Error in minimum.spanning.tree(gp) : At heap.c:560 : d_indheap reserve failed, Out of memory"

The scripts i used are as follows:

cellranger_pipestance_path <- "/home/user1/10x_libraries/" gbm <- load_cellranger_matrix(cellranger_pipestance_path) fd <- fData(gbm) colnames(fd)[2] <- "gene_short_name" gbm_cds <- newCellDataSet(exprs(gbm), phenoData = new("AnnotatedDataFrame", data = > pData(gbm)), featureData = new("AnnotatedDataFrame", data = fd), lowerDetectionLimit = 0.5, expressionFamily = negbinomial.size()) gbm_cds <- estimateSizeFactors(gbm_cds) gbm_cds <- estimateDispersions(gbm_cds) gbm_cds <- detectGenes(gbm_cds, min_expr = 0.1) expressed_genes <- row.names(subset(fData(gbm_cds), num_cells_expressed >= 10));diff_test_res <- differentialGeneTest(gbm_cds[expressed_genes,], fullModelFormulaStr = "~Size_Factor") ordering_genes <- row.names (subset(diff_test_res, qval < 0.01)) gbm_cds <- setOrderingFilter(gbm_cds, ordering_genes) gbm_cds <- reduceDimension(gbm_cds, max_components = 2, method = 'DDRTree', cores = 10);gbm_cds <- orderCells(gbm_cds)

My guess is that it is crashing while the "reduceDimensions" script is running.

My session info is as follows: R version 3.4.1 (2017-06-30) Platform: x86_64-redhat-linux-gnu (64-bit) Running under: CentOS Linux 7 (Core)

Matrix products: default BLAS/LAPACK: /usr/lib64/R/lib/libRblas.so

locale: [1] LC_CTYPE=en_US.utf8 LC_NUMERIC=C
[3] LC_TIME=en_US.utf8 LC_COLLATE=en_US.utf8
[5] LC_MONETARY=en_US.utf8 LC_MESSAGES=en_US.utf8
[7] LC_PAPER=en_US.utf8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.utf8 LC_IDENTIFICATION=C

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

other attached packages: [1] cellrangerRkit_2.0.0 Rmisc_1.5 plyr_1.8.4
[4] lattice_0.20-35 bit64_0.9-7 bit_1.1-12
[7] RColorBrewer_1.1-2 monocle_2.6.1 DDRTree_0.1.5
[10] irlba_2.3.1 VGAM_1.0-4 ggplot2_2.2.1
[13] Biobase_2.38.0 BiocGenerics_0.24.0 Matrix_1.2-12

loaded via a namespace (and not attached): [1] slam_0.1-42 reshape2_1.4.3 rhdf5_2.22.0
[4] colorspace_1.3-2 fastICA_1.2-1 viridisLite_0.2.0
[7] rlang_0.1.6 pillar_1.0.1 glue_1.2.0
[10] HSMMSingleCell_0.112.0 bindrcpp_0.2 matrixStats_0.52.2
[13] bindr_0.1 zlibbioc_1.24.0 stringr_1.2.0
[16] munsell_0.4.3 combinat_0.0-8 gtable_0.2.0
[19] Rcpp_0.12.14 scales_0.5.0 limma_3.34.5
[22] densityClust_0.3 FNN_1.1 gridExtra_2.3
[25] RANN_2.5.1 stringi_1.1.6 Rtsne_0.13
[28] qlcMatrix_0.9.5 dplyr_0.7.4 ggrepel_0.7.0
[31] grid_3.4.1 tools_3.4.1 magrittr_1.5
[34] lazyeval_0.2.1 tibble_1.4.1 cluster_2.0.6
[37] pkgconfig_2.0.1 pheatmap_1.0.8 data.table_1.10.4-3
[40] assertthat_0.2.0 viridis_0.4.0 R6_2.2.2
[43] igraph_1.1.2 compiler_3.4.1

Could you kindly help me rectify the issue?

Thank you.

Best Wishes,

Chadi

Xiaojieqiu commented 6 years ago

Hi Chadi,

I am sorry for taking so long to reply you! We have fixed this issue and monocle now support running on millions of data points very efficiently. We will release it the new version shortly.