Installing RnBeads via bioconductor - .onLoad failed in loadNamespace(), call: NULL
1
0
Entering edit mode
@nicogerstner-14692
Last seen 6.2 years ago

I am trying to install `RnBeads` from bioconductor but the installation of its dependancy `TxDb.Hsapiens.UCSC.hg19.knownGene` fails. The error is:

    biocLite("RnBeads")
    BioC_mirror: https://bioconductor.org
    Using Bioconductor 3.6 (BiocInstaller 1.28.0), R 3.4.3 (2017-11-30).
    Installing package(s) ‘RnBeads’
    also installing the dependencies ‘FDb.InfiniumMethylation.hg19’, ‘methylumi’

    trying URL 'https://bioconductor.org/packages/3.6/data/annotation/src/contrib/FDb.InfiniumMethylation.hg19_2.2.0.tar.gz'
    Content type 'application/x-gzip' length 38996322 bytes (37.2 MB)
    ==================================================
    downloaded 37.2 MB

    trying URL 'https://bioconductor.org/packages/3.6/bioc/src/contrib/methylumi_2.24.1.tar.gz'
    Content type 'application/x-gzip' length 6178909 bytes (5.9 MB)
    ==================================================
    downloaded 5.9 MB

    trying URL 'https://bioconductor.org/packages/3.6/bioc/src/contrib/RnBeads_1.10.2.tar.gz'
    Content type 'application/x-gzip' length 6437974 bytes (6.1 MB)
    ==================================================
    downloaded 6.1 MB

    * installing *source* package ‘FDb.InfiniumMethylation.hg19’ ...
    ** R
    ** data
    ** demo
    ** inst
    ** preparing package for lazy loading
    Error: package or namespace load failed for ‘TxDb.Hsapiens.UCSC.hg19.knownGene’:
     .onLoad failed in loadNamespace() for 'TxDb.Hsapiens.UCSC.hg19.knownGene', details:
      call: NULL
      error: evaluation nested too deeply: infinite recursion / options(expressions=)?
    Error : package ‘TxDb.Hsapiens.UCSC.hg19.knownGene’ could not be loaded
    ERROR: lazy loading failed for package ‘FDb.InfiniumMethylation.hg19’

    The downloaded source packages are in
        ‘/tmp/RtmpY8Yf4l/downloaded_packages’
    installation path not writeable, unable to update packages: doMC, doSNOW,
      foreach, iterators, snow, boot, class, cluster, codetools, foreign,
      KernSmooth, lattice, MASS, Matrix, mgcv, nlme, nnet, rpart, spatial, survival

As suggested by the error message, I tried setting `options(expressions=500000)`, which unfortunately did not change the error message. An important note may be that I am under network mount and don't have administrative access rights.

I don't have a .Rprofile file.

Note about `installation path not writeable`:
Typing .libPaths() reveals that my home R folder is at the first position (and it is writable). The other paths (`"/usr/local/lib/R/site-library"`, `"/usr/lib/R/site-library"` and `"/usr/lib/R/library"`) are not writable without sudo.

I also tried to delete my home R folder and to reinstall it. The reinstallation worked for all packages except for the three listed above (same error message). I also tried `biocLite("TxDb.Hsapiens.UCSC.hg19.knownGene", lib.loc=.libPaths()[1], lib=.libPaths()[1])` to specifically address my home R directory, but the same error is showing up (but without the `installation path not writeable` part).

The error does not change if the package or its dependencies are installed in a vanilla R session.

Here is my sessionInfo():

    R version 3.4.3 (2017-11-30)
    Platform: x86_64-pc-linux-gnu (64-bit)
    Running under: Ubuntu 14.04.4 LTS

    Matrix products: default
    BLAS: /usr/lib/openblas-base/libopenblas.so.0
    LAPACK: /usr/lib/lapack/liblapack.so.3.0

    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] stats     graphics  grDevices utils     datasets  methods   base     

    other attached packages:
    [1] BiocInstaller_1.28.0

    loaded via a namespace (and not attached):
    [1] compiler_3.4.3 tools_3.4.3

And this is the output of biocValid()

R version 3.4.3 (2017-11-30)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.4 LTS

Matrix products: default
BLAS: /usr/lib/openblas-base/libopenblas.so.0
LAPACK: /usr/lib/lapack/liblapack.so.3.0

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] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] BiocInstaller_1.28.0

loaded via a namespace (and not attached):
[1] compiler_3.4.3 tools_3.4.3

* Out-of-date packages
          Package     LibPath                   Installed Built   ReposVer
doMC      "doMC"      "/usr/lib/R/site-library" "1.3.2"   "3.0.2" "1.3.5"
doSNOW    "doSNOW"    "/usr/lib/R/site-library" "1.0.9"   "3.0.2" "1.0.16"
foreach   "foreach"   "/usr/lib/R/site-library" "1.4.1"   "3.0.1" "1.4.4"
iterators "iterators" "/usr/lib/R/site-library" "1.0.6"   "3.0.0" "1.0.9"
snow      "snow"      "/usr/lib/R/site-library" "0.3-13"  "3.0.2" "0.4-2"
          Repository
doMC      "https://cran.rstudio.com/src/contrib"
doSNOW    "https://cran.rstudio.com/src/contrib"
foreach   "https://cran.rstudio.com/src/contrib"
iterators "https://cran.rstudio.com/src/contrib"
snow      "https://cran.rstudio.com/src/contrib"

update with biocLite()

Error: 5 package(s) out of date

Thank you very much!

package installation .onload • 1.3k views
ADD COMMENT
0
Entering edit mode
@martin-morgan-1513
Last seen 4 weeks ago
United States

Try re-installing the TxDb package, in a new 'vanilla' R session, e.g., from the command line `R --vanilla`

ADD COMMENT
0
Entering edit mode

Unfortunately, the error also appears in a vanilla R session.

ADD REPLY
0
Entering edit mode

Sorry to be pedantic but can you show output like below

$ R --vanilla -e "BiocInstaller::biocLite('TxDb.Hsapiens.UCSC.hg19.knownGene')"
> BiocInstaller::biocLite('TxDb.Hsapiens.UCSC.hg19.knownGene')
BioC_mirror: https://bioconductor.org
Using Bioconductor 3.6 (BiocInstaller 1.28.0), R 3.4.2 Patched (2017-10-12
  r73550).
Installing package(s) ‘TxDb.Hsapiens.UCSC.hg19.knownGene’
trying URL 'https://bioconductor.org/packages/3.6/data/annotation/src/contrib/TxDb.Hsapiens.UCSC.hg19.knownGene_3.2.2.tar.gz'
Content type 'application/x-gzip' length 18669702 bytes (17.8 MB)
==================================================
downloaded 17.8 MB

* installing *source* package ‘TxDb.Hsapiens.UCSC.hg19.knownGene’ ...
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (TxDb.Hsapiens.UCSC.hg19.knownGene)
ADD REPLY
0
Entering edit mode

This is the output of my vanilla R session. I am using R 3.4.3, could it be that this is causing the error?

$ R --vanilla -e "BiocInstaller::biocLite('TxDb.Hsapiens.UCSC.hg19.knownGene')"

>BiocInstaller::biocLite('TxDb.Hsapiens.UCSC.hg19.knownGene')
BioC_mirror: https://bioconductor.org
Using Bioconductor 3.6 (BiocInstaller 1.28.0), R 3.4.3 (2017-11-30).
Installing package(s) ‘TxDb.Hsapiens.UCSC.hg19.knownGene’
trying URL 'https://bioconductor.org/packages/3.6/data/annotation/src/contrib/TxDb.Hsapiens.UCSC.hg19.knownGene_3.2.2.tar.gz'
Content type 'application/x-gzip' length 18669702 bytes (17.8 MB)
==================================================
downloaded 17.8 MB

* installing *source* package ‘TxDb.Hsapiens.UCSC.hg19.knownGene’ ...
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Error: package or namespace load failed for ‘TxDb.Hsapiens.UCSC.hg19.knownGene’:
.onLoad failed in loadNamespace() for 'TxDb.Hsapiens.UCSC.hg19.knownGene', details:
  call: NULL
  error: evaluation nested too deeply: infinite recursion / options(expressions=)?
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/student/ngerstner/R/x86_64-pc-linux-gnu-library/3.4/TxDb.Hsapiens.UCSC.hg19.knownGene’

The downloaded source packages are in
        ‘/tmp/Rtmps4jChj/downloaded_packages’
installation path not writeable, unable to update packages: doMC, doSNOW,
  foreach, iterators, snow, boot, class, cluster, codetools, foreign,
  KernSmooth, lattice, MASS, Matrix, mgcv, nlme, nnet, rpart, spatial, survival
Warning message:
In install.packages(pkgs = doing, lib = lib, ...) :
  installation of package ‘TxDb.Hsapiens.UCSC.hg19.knownGene’ had non-zero exit status
ADD REPLY
0
Entering edit mode

Using R-2.4.3 should not be the problem. You could try to download and install the package without test-loading it

$ wget https://bioconductor.org/packages/3.6/data/annotation/src/contrib/TxDb.Hsapiens.UCSC.hg19.knownGene_3.2.2.tar.gz
$ R --vanilla CMD INSTALL --no-test-load TxDb.Hsapiens.UCSC.hg19.knownGene_3.2.2.tar.gz

and then load it from within R; paying attention to the package whose load actually fails, e.g., I have

$ R --vanilla
> trace(loadNamespace, quote(print(package))
+ )
Tracing function "loadNamespace" in package "base"
[1] "loadNamespace"
> library(TxDb.Hsapiens.UCSC.hg19.knownGene)
Loading required package: GenomicFeatures
Loading required package: BiocGenerics
Loading required package: parallel
Tracing loadNamespace(package, lib.loc) on entry 
[1] "parallel"
attr(,"LibPath")
[1] "/home/mtmorgan/bin/R-3-4-branch/library"
Tracing loadNamespace(package, lib.loc) on entry 
[1] "BiocGenerics"
attr(,"LibPath")
[1] "/home/mtmorgan/R/x86_64-pc-linux-gnu-library/3.4-Bioc-3.6"
...

traceback() (maybe truncated) might also help. My basic suspicion is a dependent package (AnnotationDbi?) that requires re-installation

 

ADD REPLY
0
Entering edit mode

Here are the last lines of my output:

$ R --vanilla
> trace(loadNamespace, quote(print(package)))
Tracing function "loadNamespace" in package "base"
[1] "loadNamespace"
> library(TxDb.Hsapiens.UCSC.hg19.knownGene)

...

Tracing loadNamespace(package, lib.loc) on entry
[1] "TxDb.Hsapiens.UCSC.hg19.knownGene"
attr(,"LibPath")
[1] "/home/student/ngerstner/R/x86_64-pc-linux-gnu-library/3.4"
Tracing loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) on entry
[1] "AnnotationDbi"
Tracing loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) on entry
[1] "GenomicFeatures"
Error: package or namespace load failed for ‘TxDb.Hsapiens.UCSC.hg19.knownGene’:
 .onLoad failed in loadNamespace() for 'TxDb.Hsapiens.UCSC.hg19.knownGene', details:
  call: NULL
  error: evaluation nested too deeply: infinite recursion / options(expressions=)?

> traceback()
6: stop(msg, call. = FALSE, domain = NA)
5: value[[3L]](cond)
4: tryCatchOne(expr, names, parentenv, handlers[[1L]])
3: tryCatchList(expr, classes, parentenv, handlers)
2: tryCatch({
       attr(package, "LibPath") <- which.lib.loc
       ns <- loadNamespace(package, lib.loc)
       env <- attachNamespace(ns, pos = pos, deps)
   }, error = function(e) {
       P <- if (!is.null(cc <- conditionCall(e)))
           paste(" in", deparse(cc)[1L])
       else ""
       msg <- gettextf("package or namespace load failed for %s%s:\n %s",
           sQuote(package), P, conditionMessage(e))
       if (logical.return)
           message(paste("Error:", msg), domain = NA)
       else stop(msg, call. = FALSE, domain = NA)
   })
1: library(TxDb.Hsapiens.UCSC.hg19.knownGene)

So it seems that the package "GenomicFeatures" is causing the problem. I have reinstalled it via

$ R --vanilla -e "BiocInstaller::biocLite('GenomicFeatures')"

and tried to load it with library(GenomicFeatures). This worked well, but if I try to load TxDb.Hsapiens.UCSC.hg19.knownGene in the next line, the output is:

> library(TxDb.Hsapiens.UCSC.hg19.knownGene)
Tracing loadNamespace(package, lib.loc) on entry
[1] "TxDb.Hsapiens.UCSC.hg19.knownGene"
attr(,"LibPath")
[1] "/home/student/ngerstner/R/x86_64-pc-linux-gnu-library/3.4"
Tracing loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) on entry
[1] "AnnotationDbi"
Tracing loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) on entry
[1] "GenomicFeatures"
Error: package or namespace load failed for ‘TxDb.Hsapiens.UCSC.hg19.knownGene’:
.onLoad failed in loadNamespace() for 'TxDb.Hsapiens.UCSC.hg19.knownGene', details:
  call: NULL
  error: evaluation nested too deeply: infinite recursion / options(expressions=)?

With the same traceback(). I have also tried to reinstall AnnotationDbi as suggested, but this does not resolve the problem. Am I interpreting the trace output correctly?

Thank you for your patience!

ADD REPLY
0
Entering edit mode

The trace is a little tricky to interpret; it descended down the dependency graph, but it could be for instance AnnotationDbi loads GenomicFeatures with succeeds and then the load 'pops back' up to AnnotationDbi where the failure occurs. Also, some aspects of R packages are 'cached' at the time of installation, so it may be necessary to re-install packages GenomicFeatures & TxDb after updating AnnotationDbi, etc... I'm sorry this isn't easy to solve.

ADD REPLY

Login before adding your answer.

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