Skip to content

reduce_dimension error : address (nil), cause 'memory not mapped' #731

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Donbbit opened this issue Aug 14, 2024 · 0 comments
Open

reduce_dimension error : address (nil), cause 'memory not mapped' #731

Donbbit opened this issue Aug 14, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Donbbit
Copy link

Donbbit commented Aug 14, 2024

Describe the bug
Thank you for creating such great software.
I performed pseudotime analysis using monocle3, but I got an error when I did reduce_dimension. Here is the code :

library(monocle3)
library(Seurat)
library(Matrix)
library(data.table)
library(dplyr)
library(ggplot2)

obj <- readRDS("../res_0.7_harmony.rds")

data <- GetAssayData(obj, assay = 'RNA', slot = 'counts')
cell_metadata <- [email protected]
gene_annotation <- data.frame(gene_short_name = rownames(data))
rownames(gene_annotation) <- rownames(data)
cds <- new_cell_data_set(data,
cell_metadata = cell_metadata,
gene_metadata = gene_annotation)
pc_variance_plot <- plot_pc_variance_explained(cds)

cds <- reduce_dimension(cds, preprocess_method = "PCA")

To Reproduce
The code that produced the bug:
cds <- reduce_dimension(cds, preprocess_method = "PCA")

traceback()
After the error, run traceback() in R and post the output:
Traceback:
1: .Primitive(".Call")("eigs_shift_sym", new("dgCMatrix", i = c(0L, 1L, 2L, 3L, 313L, 520L, 614L, 670L, 2561L, 3035L, 5441L, 6515L, 8325L, 10557L, 22451L, 26556L, 0L, 1L, 2L, 3L, 520L, 614L, 670L, 3813L, 5950L, 7548L, 7803L, 8588L,....
2: do.call(.Call, args = dot_call_args)
3: eigs_real_sym(A, nrow(A), k, which, sigma, opts, mattype = "sym_dgCMatrix", extra_args = list(use_lower = as.logical(lower)))
4: eigs_sym.dgCMatrix(L, k = k, which = "LM", sigma = 0, opt = opt)
5: RSpectra::eigs_sym(L, k = k, which = "LM", sigma = 0, opt = opt)
6: doTryCatch(return(expr), name, parentenv, handler)
7: tryCatchOne(expr, names, parentenv, handlers[[1L]])
8: tryCatchList(expr, classes, parentenv, handlers)
9: tryCatch(RSpectra::eigs_sym(L, k = k, which = "LM", sigma = 0, opt = opt), error = function(c) { NULL})
10: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning"))
11: suppressWarnings(res <- tryCatch(RSpectra::eigs_sym(L, k = k, which = "LM", sigma = 0, opt = opt), error = function(c) { NULL}))
12: rspectra_eigs_sym(L, ndim, verbose = verbose)
13: rspectra_normalized_laplacian_init(A, ndim, verbose = FALSE)
14: spectral_init(V, ndim = n_components, verbose = verbose)
15: uwot(X = X, n_neighbors = n_neighbors, n_components = n_components, metric = metric, n_epochs = n_epochs, alpha = learning_rate, scale = scale, init = init, init_sdev = init_sdev, spread = spread, min_dist = min_dist,
16: uwot::umap(as.matrix(preprocess_mat), n_components = max_components, metric = umap.metric, min_dist = umap.min_dist, n_neighbors = umap.n_neighbors, fast_sgd = umap.fast_sgd, n_threads = cores, verbose = verbose, nn_m
17: reduce_dimension(cds, preprocess_method = "PCA")

sessionInfo():
Run sessionInfo() in R and post the output
R version 4.3.2 (2023-10-31)
Platform: x86_64-conda-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS/LAPACK: /home/envs/ClusterGVis/lib/libopenblasp-r0.3.24.so; LAPACK version 3.11.0

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

time zone: Asia/Shanghai
tzcode source: system (glibc)

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

other attached packages:
[1] ggplot2_3.5.1 dplyr_1.1.4
[3] data.table_1.14.8 Matrix_1.6-1.1
[5] Seurat_5.0.0 SeuratObject_5.0.0
[7] sp_2.1-1 monocle3_1.3.1
[9] SingleCellExperiment_1.22.0 SummarizedExperiment_1.30.2
[11] GenomicRanges_1.52.0 GenomeInfoDb_1.36.1
[13] IRanges_2.34.1 S4Vectors_0.38.1
[15] MatrixGenerics_1.12.2 matrixStats_1.0.0
[17] Biobase_2.60.0 BiocGenerics_0.46.0

loaded via a namespace (and not attached):
[1] RColorBrewer_1.1-3 jsonlite_1.8.7 magrittr_2.0.3
[4] spatstat.utils_3.0-5 nloptr_2.0.3 zlibbioc_1.46.0
[7] vctrs_0.6.4 ROCR_1.0-11 spatstat.explore_3.2-5
[10] minqa_1.2.6 RCurl_1.98-1.13 base64enc_0.1-3
[13] terra_1.7-55 htmltools_0.5.7 S4Arrays_1.0.4
[16] sctransform_0.4.1 parallelly_1.36.0 KernSmooth_2.23-22
[19] htmlwidgets_1.6.2 ica_1.0-3 plyr_1.8.9
[22] plotly_4.10.3 zoo_1.8-12 uuid_1.1-1
[25] igraph_1.4.3 mime_0.12 lifecycle_1.0.3
[28] pkgconfig_2.0.3 R6_2.5.1 fastmap_1.1.1
[31] GenomeInfoDbData_1.2.10 fitdistrplus_1.1-11 future_1.33.0
[34] shiny_1.7.5.1 digest_0.6.33 colorspace_2.1-0
[37] patchwork_1.2.0 tensor_1.5 RSpectra_0.16-1
[40] irlba_2.3.5.1 progressr_0.14.0 spatstat.sparse_3.0-3
[43] fansi_1.0.5 polyclip_1.10-6 abind_1.4-5
[46] httr_1.4.7 compiler_4.3.2 withr_3.0.0
[49] fastDummies_1.7.3 MASS_7.3-60 DelayedArray_0.26.6
[52] tools_4.3.2 lmtest_0.9-40 httpuv_1.6.12
[55] future.apply_1.11.0 goftest_1.2-3 glue_1.7.0
[58] nlme_3.1-163 promises_1.2.1 grid_4.3.2
[61] pbdZMQ_0.3-10 Rtsne_0.16 cluster_2.1.4
[64] reshape2_1.4.4 generics_0.1.3 spatstat.data_3.0-3
[67] gtable_0.3.4 tidyr_1.3.1 utf8_1.2.4
[70] XVector_0.40.0 spatstat.geom_3.2-7 RcppAnnoy_0.0.21
[73] ggrepel_0.9.5 RANN_2.6.1 pillar_1.9.0
[76] stringr_1.5.0 spam_2.10-0 IRdisplay_1.1
[79] RcppHNSW_0.5.0 later_1.3.1 splines_4.3.2
[82] lattice_0.22-5 deldir_1.0-9 survival_3.5-7
[85] tidyselect_1.2.0 miniUI_0.1.1.1 pbapply_1.7-2
[88] gridExtra_2.3 scattermore_1.2 stringi_1.7.12
[91] lazyeval_0.2.2 boot_1.3-28.1 evaluate_0.23
[94] codetools_0.2-19 tibble_3.2.1 cli_3.6.1
[97] uwot_0.1.16 IRkernel_1.3.2 xtable_1.8-4
[100] reticulate_1.34.0 repr_1.1.6 munsell_0.5.0
[103] Rcpp_1.0.11 spatstat.random_3.2-1 globals_0.16.2
[106] png_0.1-8 parallel_4.3.2 ellipsis_0.3.2
[109] dotCall64_1.1-0 bitops_1.0-7 lme4_1.1-35
[112] listenv_0.9.0 viridisLite_0.4.2 scales_1.3.0
[115] ggridges_0.5.4 leiden_0.4.3 purrr_1.0.2
[118] crayon_1.5.2 rlang_1.1.4 cowplot_1.1.1

I truly appreciate any help you can provide!

@Donbbit Donbbit added the bug Something isn't working label Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant