'package from Bioconductor has a dependency from CRAN that requires version of R that is not compatible
A particular situation we've encountered is when we try to install a specific R package version from Bioconductor. Dependencies of this package may not be pinned, which means that the latest and greatest dependency will be installed from CRAN. The problem arises when this new latest and greatest dependency refers to an R version that is not compatible with the Bioconductor release in which the original package is being installed. At this point installation process tips over and crashes spectacularly.
For example, DESeq2 ver. 1.30.1 is from the 3.12 relase of Bioconductor which in turn depends on R 4.0. DESeq2 Depends on unpinned version of locfit and latest version depends on R >= 4.1, making the installation process fail.
➜ docker run --rm -it r-base:4.0.4 bash --login
root@e2475c214bce:/# R
> install.packages("renv")
...
> renv::install("bioc::[email protected]")
...
Error: failed to retrieve package '[email protected]'
In addition: Warning message:
In state$requirements[[record$Package]] :
wrong arguments for subsetting an environment
Traceback (most recent calls last):
8: renv::install("bioc::[email protected]")
7: retrieve(names(remotes))
6: handler(package, renv_retrieve_impl(package))
5: renv_retrieve_impl(package)
4: renv_retrieve_bioconductor(record)
3: renv_retrieve_repos(record)
2: stopf("failed to retrieve package '%s'", renv_record_format_remote(record))
1: stop(sprintf(fmt, ...), call. = call.)
Let's ignore the fact that the error message from renv
is not helpful and install locfit
by hand.
> renv::install("locfit")
Error: package 'locfit' is not available
Error during wrapup:
Error: no more error handlers available (recursive errors?); invoking 'abort' restart
Naturally this fails because the latest version of locfit
depends on R>=4.1.
The solutions here are:
- pin dependencies in DESeq2, but this is unlikely to happen for older versions
- manually install compatible version of
locfit
that doesn't depend on R>=4.1 prior to installing DESeq2
Are there other ways of solving this that elude me?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|