aertslab / SCENIC

SCENIC is an R package to infer Gene Regulatory Networks and cell types from single-cell RNA-seq data.
http://scenic.aertslab.org
GNU General Public License v3.0
394 stars 94 forks source link

R crashes on SCENIC Initialization #297

Open alejoaa opened 2 years ago

alejoaa commented 2 years ago

Discussed in https://github.com/aertslab/SCENIC/discussions/288

I'm running into an issue where R Session crashes when initializing SCENIC. I've downloaded the following databases with wget and checked them with sha256sum:

> sha256sum -c sha256sum.txt
hg19-500bp-upstream-7species.mc9nr.feather: OK
hg19-tss-centered-10kb-7species.mc9nr.feather: OK
mm9-500bp-upstream-7species.mc9nr.feather: OK
mm9-tss-centered-10kb-7species.mc9nr.feather: OK

The problem is related to not loading the databases properly, as the commands @s-aibar mentioned crashes the R Session:

> dbPath <- "path/to/mm9-500bp-upstream-7species.mc9nr.feather"
> SCENIC::dbLoadingAttempt(dbPath)

 *** caught illegal operation ***
address 0x160721701, cause 'illegal opcode'

Traceback:
 1: ipc___feather___Reader__Read(self, columns)
 2: fr$Read(randomCol)
 3: doTryCatch(return(expr), name, parentenv, handler)
 4: tryCatchOne(expr, names, parentenv, handlers[[1L]])
 5: tryCatchList(expr, classes, parentenv, handlers)
 6: tryCatch({    rf <- arrow::ReadableFile$create(dbFilePath)    fr <- arrow::FeatherReader$create(rf)    fr$version    genesInDb <- names(fr)    randomCol <- sample(genesInDb, 1)    fr$Read(randomCol)    rnk <- RcisTarget::importRankings(dbFilePath, columns = randomCol,         indexCol = indexCol)    return(TRUE)}, error = function(e) {    print(e$message)    return(FALSE)})
 7: SCENIC::dbLoadingAttempt(dbPath)
> rnk <- RcisTarget::importRankings(dbPath, indexCol="features", columns=c("Sox10","Dlx1"))

 *** caught illegal operation ***
address 0x15e0b1701, cause 'illegal opcode'

Traceback:
 1: ipc___feather___Reader__Read(self, columns)
 2: reader$Read(columns)
 3: doTryCatch(return(expr), name, parentenv, handler)
 4: tryCatchOne(expr, names, parentenv, handlers[[1L]])
 5: tryCatchList(expr, classes, parentenv, handlers)
 6: tryCatch(reader$Read(columns), error = read_compressed_error)
 7: arrow::read_feather(dbFile, col_select = !!columns, mmap = TRUE)
 8: RcisTarget::importRankings(dbPath, indexCol = "features", columns = c("Sox10",     "Dlx1"))

Package versions don't seem to be the issue:

packageVersion("RcisTarget")
packageVersion("arrow")
packageVersion("feather")
[1] ‘1.14.0’
[1] ‘7.0.0’
[1] ‘0.3.5’

I'm running R on macOS (M1 Pro Apple Silicon) with 16GB of RAM. Here's the sessionInfo():

R version 4.1.2 (2021-11-01)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: macOS Big Sur 10.16

Matrix products: default
BLAS/LAPACK: /path/miniconda3/envs/scrna/lib/libopenblasp-r0.3.18.dylib

locale:
[1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8

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

other attached packages:
[1] SCENIC_1.3.1

loaded via a namespace (and not attached):
 [1] ggrepel_0.9.1               Rcpp_1.0.8                 
 [3] lattice_0.20-45             png_0.1-7                  
 [5] Biostrings_2.62.0           assertthat_0.2.1           
 [7] utf8_1.2.2                  digest_0.6.29              
 [9] mime_0.12                   R6_2.5.1                   
[11] GenomeInfoDb_1.30.1         stats4_4.1.2               
[13] RSQLite_2.2.12              pillar_1.7.0               
[15] httr_1.4.2                  ggplot2_3.3.5              
[17] zlibbioc_1.40.0             rlang_1.0.2                
[19] data.table_1.14.2           annotate_1.72.0            
[21] blob_1.2.3                  S4Vectors_0.32.4           
[23] R.utils_2.11.0              R.oo_1.24.0                
[25] Matrix_1.4-1                AUCell_1.16.0              
[27] RCurl_1.98-1.6              bit_4.0.4                  
[29] munsell_0.5.0               shiny_1.7.1                
[31] DelayedArray_0.20.0         compiler_4.1.2             
[33] httpuv_1.6.5                pkgconfig_2.0.3            
[35] BiocGenerics_0.40.0         htmltools_0.5.2            
[37] tidyselect_1.1.2            SummarizedExperiment_1.24.0
[39] KEGGREST_1.34.0             tibble_3.1.6               
[41] GenomeInfoDbData_1.2.7      IRanges_2.28.0             
[43] matrixStats_0.62.0          XML_3.99-0.9               
[45] fansi_1.0.2                 dplyr_1.0.8                
[47] crayon_1.5.0                later_1.2.0                
[49] bitops_1.0-7                R.methodsS3_1.8.1          
[51] grid_4.1.2                  xtable_1.8-4               
[53] GSEABase_1.56.0             gtable_0.3.0               
[55] lifecycle_1.0.1             DBI_1.1.2                  
[57] magrittr_2.0.3              scales_1.2.0               
[59] graph_1.72.0                cli_3.2.0                  
[61] cachem_1.0.6                XVector_0.34.0             
[63] promises_1.2.0.1            generics_0.1.2             
[65] ellipsis_0.3.2              vctrs_0.3.8                
[67] tools_4.1.2                 bit64_4.0.5                
[69] Biobase_2.54.0              glue_1.6.2                 
[71] purrr_0.3.4                 MatrixGenerics_1.6.0       
[73] fastmap_1.1.0               AnnotationDbi_1.56.2       
[75] colorspace_2.0-3            GenomicRanges_1.46.1       
[77] memoise_2.0.1     

Thanks!

hamidsta commented 2 years ago

i have the same issue

perikarya commented 1 year ago

also having this issue, running SCENIC v1.3.1 and R v4.1.2. i've tried it with all possible databases and downloads using wget and curl