【问题标题】:R package present in library, but still not found when required to install other packages库中存在 R 包,但在需要安装其他包时仍找不到
【发布时间】:2021-08-30 12:56:52
【问题描述】:

我需要使用 R 包 ChaMP,为此我需要安装 DMRcate,为此我需要 IlluminaHumanMethylation450ka​​nno.ilmn12.hg19 .我已经安装了“IlluminaHumanMethylation450ka​​nno.ilmn12.hg19”,它存在于库位置。 当我发出命令时:

library("IlluminaHumanMethylation450kanno.ilmn12.hg19")

它有效。

但是当我尝试使用 BiocManager 安装“DMRcate”时:

BiocManager::install('DMRcate')

它显示了这个:

'getOption("repos")' replaces Bioconductor standard repositories, see '?repositories' for details

replacement repositories:
    CRAN: https://cran.rstudio.com/

Bioconductor version 3.13 (BiocManager 1.30.15), R 4.1.0 (2021-05-18)
Installing package(s) 'DMRcate'
installing the source package ‘DMRcate’

trying URL 'https://bioconductor.org/packages/3.13/bioc/src/contrib/DMRcate_2.6.0.tar.gz'
Content type 'application/x-gzip' length 344226 bytes (336 KB)
downloaded 336 KB

* installing *source* package 'DMRcate' ...
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Warning: replacing previous import 'minfi::getMeth' by 'bsseq::getMeth' when loading 'DMRcate'
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  there is no package called 'IlluminaHumanMethylationEPICanno.ilm10b4.hg19'
Calls: <Anonymous> ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Execution halted
ERROR: lazy loading failed for package 'DMRcate'
* removing 'C:/Users/sainz/OneDrive/Documents/R/win-library/4.1/DMRcate'

The downloaded source packages are in
    ‘C:\Users\sainz\AppData\Local\Temp\RtmpADMXbi\downloaded_packages’
Warning message:
In .inet_warning(msg) :
  installation of package ‘DMRcate’ had non-zero exit status

它说没有名为“IlluminaHumanMethylation450ka​​nno.ilmn12.hg19”的包。

使用 StackOverflow 上类似问题的建议,我尝试将源包从临时位置提取到库位置,但这给出了相同的错误。

我正在 Rstudio 中执行此操作。我无法弄清楚这里缺少什么。提前致谢!

【问题讨论】:

  • 错误中的包名与您正在加载的包名不同。错误显示“IlluminaHumanMethylationEPICanno.ilm10b4.hg19”,但您安装了“IlluminaHumanMethylation450ka​​nno.ilmn12.hg19”。 “EPICanno.ilm10b4”部分不同于“450ka​​nno.ilmn12”部分。尝试运行BiocManager::install("IlluminaHumanMethylationEPICanno.ilm10b4.hg19")
  • @MrFlick 这真是太愚蠢了,谢谢!现在可以使用了。

标签: r bioconductor


【解决方案1】:

我猜包名称的长度超出了您的操作系统(看起来像 Windows)上的路径长度限制。您正在尝试安装到

C:/Users/sainz/OneDrive/Documents/R/win-library/4.1/

并且可以通过将Illumina... 包放入名称较短的库中来解决此限制,或者只是将其安装在本地而不是 OneDrive 中。

【讨论】:

    猜你喜欢
    • 2021-06-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-01-10
    • 1970-01-01
    • 2013-10-24
    • 1970-01-01
    • 2020-10-13
    相关资源
    最近更新 更多