.onLoad failed in loadNamespace() for 'org.Hs.eg.db'
3
16
Entering edit mode
Arun ▴ 160
@a3151529
Last seen 3.7 years ago
United States

I am trying to install and load the pathview (1.31.2) package, but it fails to load with the error below. I have RQSLite 2.2.6 and org.Hs.eq.db 3.12.0. Could you please help me out ?


> library(pathview)
Error: package or namespace load failed for ‘pathview’:
 .onLoad failed in loadNamespace() for 'org.Hs.eg.db', details:
  call: l$contains
  error: $ operator is invalid for atomic vectors


> sessionInfo( )
R version 4.0.5 (2021-03-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.5 LTS

Matrix products: default
BLAS:   /usr/lib/openblas-base/libblas.so.3
LAPACK: /usr/lib/libopenblasp-r0.2.18.so

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

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

other attached packages:
[1] AnnotationDbi_1.52.0 IRanges_2.24.1       S4Vectors_0.28.1     Biobase_2.50.0       BiocGenerics_0.36.0 

loaded via a namespace (and not attached):
 [1] KEGGgraph_1.50.0    Rcpp_1.0.6          tidyr_1.1.3         png_0.1-7           Biostrings_2.58.0   assertthat_0.2.1    digest_0.6.27       utf8_1.2.1          R6_2.5.0           
[10] RSQLite_2.2.6       evaluate_0.14       httr_1.4.2          ggplot2_3.3.3       pillar_1.5.1        zlibbioc_1.36.0     rlang_0.4.10        lazyeval_0.2.2      rstudioapi_0.13    
[19] data.table_1.14.0   Rgraphviz_2.34.0    blob_1.2.1          rmarkdown_2.7       htmlwidgets_1.5.3   RCurl_1.98-1.3      bit_4.0.4           munsell_0.5.0       tinytex_0.31       
[28] compiler_4.0.5      xfun_0.22           pkgconfig_2.0.3     htmltools_0.5.1.1   tidyselect_1.1.0    KEGGREST_1.30.1     tibble_3.1.0        XML_3.99-0.6        fansi_0.4.2        
[37] viridisLite_0.3.0   crayon_1.4.1        dplyr_1.0.5         bitops_1.0-6        grid_4.0.5          jsonlite_1.7.2      gtable_0.3.0        lifecycle_1.0.0     DBI_1.1.1          
[46] magrittr_2.0.1      scales_1.1.1        graph_1.68.0        cachem_1.0.4        XVector_0.30.0      ellipsis_0.3.1      generics_0.1.0      vctrs_0.3.7         RColorBrewer_1.1-2 
[55] tools_4.0.5         Cairo_1.5-12.2      bit64_4.0.5         glue_1.4.2          purrr_0.3.4         fastmap_1.1.0       yaml_2.2.1          colorspace_2.0-0    BiocManager_1.30.12
[64] memoise_2.0.0       plotly_4.9.3        knitr_1.31 

> BiocManager::valid()
'getOption("repos")' replaces Bioconductor standard repositories, see '?repositories' for details

replacement repositories:
    CRAN: https://cloud.r-project.org

[1] TRUE

Thanks,

Arun

org.Hs.eg.db pathview • 12k views
ADD COMMENT
2
Entering edit mode

I'm experiencing the same issue with org.Hs.eg.db I've the same configuration and version of packages, however running under Ubuntu 20.04.2 LTS

Installation via BiocManager::install("org.Hs.eg.db") goes fine, however when loading the package with library("org.Hs.eg.db") it gives the same error as yours.

I'll follow the updates to this issue.

ADD REPLY
1
Entering edit mode

I have the same issue with loading org.Hs.eg.db package. The error was as follow

Error: package or namespace load failed for ‘org.Hs.eg.db’: .onLoad failed in loadNamespace() for 'org.Hs.eg.db', details: call: l$contains error: $ operator is invalid for atomic vectors

ADD REPLY
1
Entering edit mode

I have the same problem. I can install org.Hs.eg.db and but not load ... with RStudio. If I run the code in terminal yes I can do it.

ADD REPLY
0
Entering edit mode

Yeah, same for me! On terminal everithing is fine, not with RStudio

ADD REPLY
0
Entering edit mode

It's not a solution, but to be able to generate reports with RMD, I run the script with system ("Script.R"), and load the results

ADD REPLY
0
Entering edit mode

I am experiencing the same problem. My script run fine till yesterday with no issues installing packages and libraries. Today I am using RMD to write a report for an enrichment analysis and I am stuck activating the org.Hs.eg.db" library. I got in return the message:

"Error: package or namespace load failed for ‘org.Hs.eg.db’: .onLoad failed in loadNamespace() for 'org.Hs.eg.db', details: call: l$contains error: $ operator is invalid for atomic vectors"

It seems an ongoing present generalized issue as I get the same issue even if I run the command library("org.Hs.eg.db") a separate script today!!!

ADD REPLY
0
Entering edit mode

I am having the same issue, my code was working, I went to lunch and now it's not. The pathview, org.Mm.eg.db, and org.Hs.eg.db packages won't load. All give the error:

Error: package or namespace load failed for ‘pathview’: .onLoad failed in loadNamespace() for 'org.Hs.eg.db', details: call: l$contains error: $ operator is invalid for atomic vectors

Any solutions?

ADD REPLY
1
Entering edit mode

I have a similar issue (MacOS 10.15.7), for both Hs and Mm eg.db packages. I have reinstalled R and all libraries, the error persists.

My deets:

> library(org.Mm.eg.db)
Error: package or namespace load failed for ‘org.Mm.eg.db’:
 .onLoad failed in loadNamespace() for 'org.Mm.eg.db', details:
  call: l$contains
  error: $ operator is invalid for atomic vectors
> sessionInfo()
R version 4.0.5 (2021-03-31)
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] parallel  stats4    stats     graphics  grDevices utils     datasets 
[8] methods   base     

other attached packages:
[1] AnnotationDbi_1.52.0 IRanges_2.24.1       S4Vectors_0.28.1    
[4] Biobase_2.50.0       BiocGenerics_0.36.0 

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.6          DBI_1.1.1           RSQLite_2.2.6      
 [4] cachem_1.0.4        rlang_0.4.10        blob_1.2.1         
 [7] vctrs_0.3.7         tools_4.0.5         bit64_4.0.5        
[10] bit_4.0.4           fastmap_1.1.0       compiler_4.0.5     
[13] pkgconfig_2.0.3     BiocManager_1.30.12 memoise_2.0.0

org.Mm.eg.db installed without an error.

ADD REPLY
0
Entering edit mode

Same issue facing:

RA_processed <- input_processing(input = RA_input, # the input: in this case, differential expression results

  • p_val_threshold = 0.05, # p value threshold to filter significant genes
  • pin_name_path = "Biogrid", # the name of the PIN to use for active subnetwork search
  • convert2alias = TRUE) Number of genes provided in input: 572 Number of genes in input after p-value filtering: 572 Error: .onLoad failed in loadNamespace() for 'org.Hs.eg.db', details: call: l$contains error: $ operator is invalid for atomic vectors
ADD REPLY
1
Entering edit mode

I'm experiencing the same error. I also downloaded the source package (from https://bioconductor.org/packages/release/data/annotation/html/org.Hs.eg.db.html) and installed in Rstudio with no errors. When loading the library returns the same error as yours:

library("org.Hs.eg.db")
Error: package or namespace load failed for ‘org.Hs.eg.db’:
 .onLoad failed in loadNamespace() for 'org.Hs.eg.db', details:
  call: l$contains
  error: $ operator is invalid for atomic vectors

I was using this library just over the weekend with no problems. Maybe there's an issue with the latest version of the library?

ADD REPLY
1
Entering edit mode

i have same problem.. Nothing is working.... i have tried everything!!

ADD REPLY
0
Entering edit mode

I can't see org.Hs.eg.db installed, retry BiocManager::install("org.Hs.eg.db") ?

ADD REPLY
0
Entering edit mode

Also having this issue (R 4.0.3) with org.Mm.eg.db as of today. All was working fine yesterday. I have updated a few packages this morning which may have caused the issue. I have also been connecting to GO.db perhaps there's some sort of conflict?

ADD REPLY
1
Entering edit mode

Could be, it also worked for me in the recent past. FYI, I tried to install an older version of R (3.6.1) & org.Mm.eg.db in a conda env and run Rstudio from the env. Still the same package loading error.

ADD REPLY
0
Entering edit mode

However, using conda-installed RStudio helped (see below).

ADD REPLY
12
Entering edit mode
Kevin Ushey ▴ 130
@kevin-ushey-5913
Last seen 3.7 years ago
United States

This appears to be a bug in the communication between the latest release of the RSQLite package and RStudio. In the interim, you can run:

options(connectionObserver = NULL)

in your RStudio R session before attempting to load these packages (or, use a package that makes a connection via RSQLite).

You can also install the previous release of RSQLite using remotes, e.g. with:

remotes::install_version("RSQLite", version = "2.2.5")

Sorry for the trouble -- we'll try to get this fixed ASAP. :-/

ADD COMMENT
2
Entering edit mode

I am glad to see that this is an RStudio issue and not a me issue! I thought I had gone crazy.

ADD REPLY
0
Entering edit mode

i have the same issue, and I thought i had gone crazy.

ADD REPLY
0
Entering edit mode

This didn't work for me, I still get the same error.

ADD REPLY
0
Entering edit mode

Restart R. This ultimately worked for me (specifically the rollback of RSQLite), but it's a temporary fix in either case.

ADD REPLY
0
Entering edit mode

i tried restarting and it still didn't work.

ADD REPLY
0
Entering edit mode

Restarting works for me.

ADD REPLY
0
Entering edit mode

Thank you for your proposal to solve the problem! This method solved my problem very well, but the code has a spelling error and should be changed into options(connectionObserver = NULL). Initially, I copied your code and found that it didn't solve the problem. It turned out to be the spelling error of the code. I hope my experience can be useful to others.

ADD REPLY
0
Entering edit mode

Ack, thank you for catching that! I've updated my post.

ADD REPLY
3
Entering edit mode
泉剑 ▴ 30
@4524930d
Last seen 3.7 years ago
Taiwan

The strange thing is that when I use terminal R to load org.Hs.eg.db it can be loaded well If you are in a hurry to use it, this might be a help

ADD COMMENT
2
Entering edit mode

This error is now also filed as an issue in RStudio: Issue with annotation database connection only in RStudio

ADD REPLY
1
Entering edit mode

Please resolve this issue as soon as possible.

Rstudio is still generating error during loading of org.Hs.eg.db package

library("org.Hs.eg.db") Error: package or namespace load failed for ‘org.Hs.eg.db’: .onLoad failed in loadNamespace() for 'org.Hs.eg.db', details: call: l$contains error: $ operator is invalid for atomic vectors

ADD REPLY
0
Entering edit mode
agata ▴ 20
@ef52dc19
Last seen 3.7 years ago
Sweden

This is not The Solution, but it may help some people who need org.Nn.eg.db now and would like to continue working in RStudio.

I created a conda environment:

# install mamba, a faster env solver than conda in your base conda env
conda install mamba -n base -c conda-forge

conda create -n R-orgMm
conda activate R-orgMm

mamba install -c r r-essentials r-base=3.6.1
mamba install -c bioconda bioconductor-org.Mm.eg.db

mamba install -c r rstudio

Then start the conda-installed RStudio from within that environment:

rstudio

And the rest is business as usual. I haven't verified how stable this is or how it works in conjunction with other packages.

ADD COMMENT
0
Entering edit mode

FYI, the deets of rstudio version

 rstudio                      1.1.456  h04f5b5a_1     r/osx-64
ADD REPLY

Login before adding your answer.

Traffic: 527 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