Error while Installing BSgenome.Hsapiens.UCSC.hg38
1
0
Entering edit mode
@rohitsatyam102-24390
Last seen 4 hours ago
India

Hi Everyone!!

This error comes as a surprise to me because the package was working just fine few days ago. I am unable to comprehend what to do about it.

  1. I uninstalled and reinstalled BSgenome and hg19 and hg38 packages.
  2. Updated rest of the packages also tried the following BiocManager::install("BSgenome.Hsapiens.UCSC.hg19", INSTALL_opts = "--no-staged-install") but no improvement.

** building package indices
** testing if installed package can be loaded from temporary location
*** arch - i386
Warning: undefined slot classes in definition of "XRaw": elementMetadata(class "DataTable_OR_NULL")
Warning: undefined slot classes in definition of "XInteger": elementMetadata(class "DataTable_OR_NULL")
Warning: undefined slot classes in definition of "XDouble": elementMetadata(class "DataTable_OR_NULL")
Warning: multiple methods tables found for 'which'
Error: package or namespace load failed for 'BSgenome.Hsapiens.UCSC.hg38':
 .onLoad failed in loadNamespace() for 'BSgenome.Hsapiens.UCSC.hg38', details:
  call: validObject(.Object)
  error: invalid class "TwoBitFile" object: undefined class for slot "resource" ("characterORconnection")
Error: loading failed
Execution halted
*** arch - x64
Warning: undefined slot classes in definition of "XRaw": elementMetadata(class "DataTable_OR_NULL")
Warning: undefined slot classes in definition of "XInteger": elementMetadata(class "DataTable_OR_NULL")
Warning: undefined slot classes in definition of "XDouble": elementMetadata(class "DataTable_OR_NULL")
Warning: multiple methods tables found for 'which'
Error: package or namespace load failed for 'BSgenome.Hsapiens.UCSC.hg38':
 .onLoad failed in loadNamespace() for 'BSgenome.Hsapiens.UCSC.hg38', details:
  call: validObject(.Object)
  error: invalid class "TwoBitFile" object: undefined class for slot "resource" ("characterORconnection")
Error: loading failed
Execution halted
ERROR: loading failed for 'i386', 'x64'
* removing 'C:/Users/Rohit Satyam/Documents/R/win-library/4.0/BSgenome.Hsapiens.UCSC.hg38'


> sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19041)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

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

loaded via a namespace (and not attached):
 [1] rstudioapi_0.13      cluster_2.1.0        BiocGenerics_0.36.0  IRanges_2.24.1       colorspace_2.0-0    
 [6] clue_0.3-58          rjson_0.2.20         fansi_0.4.1          tools_4.0.3          parallel_4.0.3      
[11] grid_4.0.3           circlize_0.4.12      sessioninfo_1.1.1    png_0.1-7            cli_2.2.0           
[16] withr_2.3.0          matrixStats_0.57.0   digest_0.6.27        assertthat_0.2.1     crayon_1.3.4        
[21] BiocManager_1.30.10  RColorBrewer_1.1-2   S4Vectors_0.28.1     GlobalOptions_0.1.2  shape_1.4.5         
[26] glue_1.4.2           ComplexHeatmap_2.7.4 compiler_4.0.3       stats4_4.0.3         Cairo_1.5-12.2      
[31] GetoptLong_1.0.5
> BiocManager::valid()

* sessionInfo()

R version 4.0.3 (2020-10-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19041)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

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

loaded via a namespace (and not attached):
Error in x[["Version"]] : subscript out of bounds
In addition: Warning messages:
1: 0 packages out-of-date; 5 packages too new 
2: In FUN(X[[i]], ...) :
  DESCRIPTION file of package 'ComplexHeatmap' is missing or broken
BSgenome.Hsapiens.UCSC.hg38 • 3.9k views
ADD COMMENT
0
Entering edit mode
@rohitsatyam102-24390
Last seen 4 hours ago
India

Seems like the latest version of ComplexHeatmap_2.7.4 that was downloaded from github brought some incompatibilities by upgrading BiocGenerics and other 4 packages. These packages were traced using BiocManager::valid()$too_new. Uninstalling these packages and reinstalling these packages fixed the problem.

ADD COMMENT
1
Entering edit mode

I was getting the same error when trying to innstall hg38: BiocManager::install("BSgenome.Hsapiens.UCSC.hg38")

Error: package or namespace load failed for 'BSgenome.Hsapiens.UCSC.hg38':
.onLoad failed in loadNamespace() for 'BSgenome.Hsapiens.UCSC.hg38', details:
 call: validObject(.Object)
 error: invalid class "TwoBitFile" object: undefined class for slot "resource" ("characterORconnection")

This is what i did too fix it.

  1. as rohitsatyam102 mentioned, BiocManager::valid() suggested some updates for me to install for other bioconductoor packages so i did
  2. I also installed the new version of Bioconductor with BiocManager::install(version = "3.12")
  3. Then, i adjusted the download timeout with options(timeout = 300) because it seemed whenever id try to downlood hg38, it would stop too soon.
  4. Then i ran BiocManager::install("BSgenome.Hsapiens.UCSC.hg38") to download again. This time the download coompleted without an error.
  5. Then i had to restart the R session. I was getting an error that the lazy-load database was corrupt and the fix for that was to start a new R session. I closed Rstudio and reopened it to a fresh console.
  6. I loaded the library(BSgenome.Hsapiens.UCSC.hg38) and ran BSgenome.Hsapiens.UCSC.hg38 without and error.

I would have posted my sessionInfo() but these steps required me to refresh the session (see step 5). The sessionInfo() below is after I performed step 6: running library(BSgenome.Hsapiens.UCSC.hg38) and BSgenome.Hsapiens.UCSC.hg38

tl;dr - If I had to do this again, id suggest doing steps 3-6 only.

> sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Catalina 10.15.7

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib

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

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

other attached packages:
 [1] BSgenome.Hsapiens.UCSC.hg38_1.4.3 BSgenome_1.58.0                   rtracklayer_1.50.0               
 [4] Biostrings_2.58.0                 XVector_0.30.0                    GenomicRanges_1.42.0             
 [7] GenomeInfoDb_1.26.2               IRanges_2.24.1                    S4Vectors_0.28.1                 
[10] BiocGenerics_0.36.0              

loaded via a namespace (and not attached):
 [1] rstudioapi_0.13             knitr_1.31                  GenomicAlignments_1.26.0   
 [4] zlibbioc_1.36.0             BiocParallel_1.24.1         lattice_0.20-41            
 [7] rlang_0.4.10                tools_4.0.3                 grid_4.0.3                 
[10] SummarizedExperiment_1.20.0 Biobase_2.50.0              xfun_0.20                  
[13] matrixStats_0.58.0          htmltools_0.5.1.1           yaml_2.2.1                 
[16] digest_0.6.27               crayon_1.3.4                Matrix_1.3-2               
[19] GenomeInfoDbData_1.2.4      BiocManager_1.30.10         bitops_1.0-6               
[22] RCurl_1.98-1.2              evaluate_0.14               rmarkdown_2.6              
[25] DelayedArray_0.16.1         compiler_4.0.3              MatrixGenerics_1.2.0       
[28] Rsamtools_2.6.0             XML_3.99-0.5
ADD REPLY

Login before adding your answer.

Traffic: 631 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6