satijalab / seurat

R toolkit for single cell genomics
http://www.satijalab.org/seurat
Other
2.26k stars 908 forks source link

Segmentation fault running scRNA-seq and scATAC-seq integration demo #6096

Closed xingzhis closed 1 year ago

xingzhis commented 2 years ago

Hi,

I was running the Integrating scRNA-seq and scATAC-seq data demo with Seurat v3, and the program quits with a segmentation fault.

This is the line of code where the error occurs:
https://github.com/satijalab/seurat/blob/3bee84a8d710b7ee0022b929dab1df2f6ba26fdb/vignettes/atacseq_integration_vignette.Rmd#L128-L136 and this is the error message:

Running CCA

 *** caught segfault ***
address (nil), cause 'memory not mapped'

Traceback:
 1: Standardize(mat = object1, display_progress = FALSE)
 2: RunCCA.default(object1 = data1, object2 = data2, standardize = TRUE,     num.cc = num.cc, verbose = verbose, )
 3: RunCCA(object1 = data1, object2 = data2, standardize = TRUE,     num.cc = num.cc, verbose = verbose, )
 4: RunCCA.Seurat(object1 = reference, object2 = query, features = features,     num.cc = max(dims), renormalize = FALSE, rescale = FALSE,     verbose = verbose)
 5: RunCCA(object1 = reference, object2 = query, features = features,     num.cc = max(dims), renormalize = FALSE, rescale = FALSE,     verbose = verbose)
 6: FindTransferAnchors(reference = pbmc.rna, query = pbmc.atac,     features = VariableFeatures(object = pbmc.rna), reference.assay = "RNA",     query.assay = "ACTIVITY", reduction = "cca")
An irrecoverable exception occurred. R is aborting now ...
/var/spool/slurmd/job27020468/slurm_script: line 20: 89567 Segmentation fault      Rscript seuratV3_demo_data.py

My session info:

R version 4.1.3 (2022-03-10)
Platform: x86_64-conda-linux-gnu (64-bit)
Running under: Red Hat Enterprise Linux Server 7.9 (Maipo)

Matrix products: default
BLAS/LAPACK: /gpfs/ysm/home/xs272/myconda/conda_envs/sc/lib/libmkl_rt.so.2

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

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

other attached packages:
 [1] cowplot_1.1.1                 ggplot2_3.3.6                
 [3] EnsDb.Hsapiens.v86_2.99.0     ensembldb_2.16.0             
 [5] AnnotationFilter_1.16.0       GenomicFeatures_1.44.0       
 [7] AnnotationDbi_1.54.0          Biobase_2.52.0               
 [9] GenomicRanges_1.44.0          GenomeInfoDb_1.30.1          
[11] IRanges_2.28.0                S4Vectors_0.32.3             
[13] BiocGenerics_0.40.0           Signac_1.6.0                 
[15] SeuratObject_4.0.4            Seurat_4.1.0                 
[17] pbmcMultiome.SeuratData_0.1.3 pbmc3k.SeuratData_3.1.4      
[19] SeuratData_0.2.2             

loaded via a namespace (and not attached):
  [1] utf8_1.2.2                  reticulate_1.25            
  [3] tidyselect_1.1.2            RSQLite_2.2.14             
  [5] htmlwidgets_1.5.4           grid_4.1.3                 
  [7] docopt_0.7.1                BiocParallel_1.26.0        
  [9] Rtsne_0.16                  munsell_0.5.0              
 [11] codetools_0.2-18            ica_1.0-2                  
 [13] pbdZMQ_0.3-7                future_1.26.1              
 [15] miniUI_0.1.1.1              withr_2.5.0                
 [17] spatstat.random_2.1-0       colorspace_2.0-3           
 [19] filelock_1.0.2              knitr_1.39                 
 [21] uuid_1.1-0                  rstudioapi_0.13            
 [23] ROCR_1.0-11                 tensor_1.5                 
 [25] listenv_0.8.0               labeling_0.4.2             
 [27] MatrixGenerics_1.6.0        slam_0.1-50                
 [29] repr_1.1.4                  GenomeInfoDbData_1.2.7     
 [31] polyclip_1.10-0             bit64_4.0.5                
 [33] farver_2.1.0                parallelly_1.31.1          
 [35] vctrs_0.4.1                 generics_0.1.2             
 [37] xfun_0.31                   biovizBase_1.40.0          
 [39] BiocFileCache_2.2.1         lsa_0.73.3                 
 [41] ggseqlogo_0.1               R6_2.5.1                   
 [43] DelayedArray_0.18.0         bitops_1.0-7               
 [45] spatstat.utils_2.3-1        cachem_1.0.6               
 [47] assertthat_0.2.1            promises_1.2.0.1           
 [49] BiocIO_1.2.0                scales_1.2.0               
 [51] nnet_7.3-17                 gtable_0.3.0               
 [53] Cairo_1.5-15                globals_0.15.0             
 [55] goftest_1.2-3               rlang_1.0.2                
 [57] RcppRoll_0.3.0              splines_4.1.3              
 [59] rtracklayer_1.52.0          lazyeval_0.2.2             
 [61] dichromat_2.0-0.1           checkmate_2.1.0            
 [63] spatstat.geom_2.3-2         yaml_2.3.5                 
 [65] reshape2_1.4.4              abind_1.4-5                
 [67] backports_1.4.1             httpuv_1.6.5               
 [69] Hmisc_4.7-0                 tools_4.1.3                
 [71] ellipsis_0.3.2              spatstat.core_2.4-0        
 [73] RColorBrewer_1.1-3          ggridges_0.5.3             
 [75] Rcpp_1.0.8.3                plyr_1.8.7                 
 [77] base64enc_0.1-3             progress_1.2.2             
 [79] zlibbioc_1.40.0             purrr_0.3.4                
 [81] RCurl_1.98-1.6              prettyunits_1.1.1          
 [83] rpart_4.1.16                deldir_1.0-6               
 [85] pbapply_1.5-0               zoo_1.8-10                 
 [87] SummarizedExperiment_1.22.0 ggrepel_0.9.1              
 [89] cluster_2.1.3               magrittr_2.0.3             
 [91] data.table_1.14.2           RSpectra_0.16-1            
 [93] scattermore_0.8             lmtest_0.9-40              
 [95] RANN_2.6.1                  SnowballC_0.7.0            
 [97] ProtGenerics_1.26.0         fitdistrplus_1.1-8         
 [99] matrixStats_0.62.0          hms_1.1.1                  
[101] patchwork_1.1.1             mime_0.12                  
[103] evaluate_0.15               xtable_1.8-4               
[105] XML_3.99-0.9                jpeg_0.1-9                 
[107] sparsesvd_0.2               fastDummies_1.6.3          
[109] gridExtra_2.3               compiler_4.1.3             
[111] biomaRt_2.48.0              tibble_3.1.7               
[113] KernSmooth_2.23-20          crayon_1.5.1               
[115] htmltools_0.5.2             mgcv_1.8-40                
[117] later_1.3.0                 Formula_1.2-4              
[119] tidyr_1.2.0                 DBI_1.1.2                  
[121] tweenr_1.0.2                dbplyr_2.1.1               
[123] MASS_7.3-57                 rappdirs_0.3.3             
[125] Matrix_1.4-1                cli_3.3.0                  
[127] parallel_4.1.3              igraph_1.3.0               
[129] pkgconfig_2.0.3             GenomicAlignments_1.28.0   
[131] foreign_0.8-82              IRdisplay_1.1              
[133] plotly_4.10.0               spatstat.sparse_2.1-0      
[135] XVector_0.32.0              VariantAnnotation_1.38.0   
[137] stringr_1.4.0               digest_0.6.29              
[139] sctransform_0.3.3           RcppAnnoy_0.0.19           
[141] spatstat.data_2.1-2         Biostrings_2.60.0          
[143] leiden_0.4.2                fastmatch_1.1-3            
[145] htmlTable_2.4.0             uwot_0.1.10                
[147] restfulr_0.0.13             curl_4.3.2                 
[149] shiny_1.7.1                 Rsamtools_2.8.0            
[151] rjson_0.2.21                lifecycle_1.0.1            
[153] nlme_3.1-157                jsonlite_1.8.0             
[155] BSgenome_1.60.0             viridisLite_0.4.0          
[157] fansi_1.0.3                 pillar_1.7.0               
[159] lattice_0.20-45             KEGGREST_1.32.0            
[161] fastmap_1.1.0               httr_1.4.3                 
[163] survival_3.3-1              glue_1.6.2                 
[165] qlcMatrix_0.9.7             png_0.1-7                  
[167] bit_4.0.4                   ggforce_0.3.3              
[169] stringi_1.7.6               blob_1.2.3                 
[171] RcppHNSW_0.3.0              latticeExtra_0.6-29        
[173] memoise_2.0.1               IRkernel_1.3               
[175] dplyr_1.0.9                 irlba_2.3.5                
[177] future.apply_1.9.0         

The demo works with my own data, though.

Thank you!

YochayTzur commented 2 years ago

Same issue in my end.

SessionInfo: R version 4.2.0 (2022-04-22 ucrt) -- "Vigorous Calisthenics" Copyright (C) 2022 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R.

[Workspace loaded from ~/.RData]

sessionInfo() R version 4.2.0 (2022-04-22 ucrt) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 22000)

Matrix products: default

locale: [1] LC_COLLATE=English_United States.utf8 LC_CTYPE=English_United States.utf8 LC_MONETARY=English_United States.utf8 [4] LC_NUMERIC=C LC_TIME=English_United States.utf8

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

loaded via a namespace (and not attached): [1] compiler_4.2.0 fastmap_1.1.0 cli_3.3.0 htmltools_0.5.2 tools_4.2.0 rstudioapi_0.13 yaml_2.3.5 rmarkdown_2.14 [9] knitr_1.39 xfun_0.31 digest_0.6.29 rlang_1.0.4 evaluate_0.15

rsatija commented 1 year ago

This can happen if you are running CCA on computers with low-medium amounts of memory. To analyze these datasets going forward we would recommend the use of the Seurat integration workflow (you can use the sketch-based integration vignettes if you are continuing to run into memory issues)