来自Bioconductor的软件包具有Cran的依赖性,需要R的RES版本,而R的版本不兼容

发布于 2025-01-28 11:23:49 字数 2079 浏览 5 评论 0原文

我们遇到的一种特殊情况是,当我们尝试从BioConductor安装特定的R软件包版本时。该软件包的依赖性可能不会固定,这意味着将从Cran中安装最新和最大的依赖性。当这个新的最新和最大的依赖关系是指与安装原始软件包的生物导体版本不兼容的R版本时,就会出现问题。此时,安装过程会触发并崩溃。

例如, deseq2 ver。 1.30.1 来自3.12生物通用器的重酶,进而取决于r 4.0。 deseq2取决于 locfit 和最新版本取决于R&GT, ; = 4.1,使安装过程失败。

➜ 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.)

让我们忽略以下事实:renv的错误消息无用,然后手动安装locfit

> renv::install("locfit")
Error: package 'locfit' is not available
Error during wrapup: 
Error: no more error handlers available (recursive errors?); invoking 'abort' restart

自然而然地,这会失败,因为最新版本的locfit取决于R> = 4.1。

这里的解决方案是:

  • DESEQ2中的PIN依赖关系,但是对于较旧版本而言,这不太可能发生
  • locfit不取决于R> = 4.1之前的兼容版本,然后再安装DESEQ2

。解决这个问题的方法?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文