BiocManager icon indicating copy to clipboard operation
BiocManager copied to clipboard

Installation problem in Bioconductor packages in R. BiocManager::intall() not working.

Open bakshiasif opened this issue 3 years ago • 3 comments

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

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

Bioconductor version 3.16 (BiocManager 1.30.19), R 4.2.2 (2022-10-31)
Warning message:
package(s) not installed when version(s) same as or greater than current; use `force = TRUE` to re-install: 'ChIPseeker' 

> BiocManager::install("ChIPseeker", force = TRUE)
'getOption("repos")' replaces Bioconductor standard repositories, see '?repositories' for details

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

Bioconductor version 3.16 (BiocManager 1.30.19), R 4.2.2 (2022-10-31)
Installing package(s) 'ChIPseeker'
trying URL 'https://bioconductor.org/packages/3.16/bioc/bin/macosx/contrib/4.2/ChIPseeker_1.34.1.tgz'
Content type 'application/x-gzip' length 7045980 bytes (6.7 MB)
==================================================
downloaded 6.7 MB


The downloaded binary packages are in
	/var/folders/nj/k2k9s_x133l5jsc5x9j5t0km0000gn/T//RtmpZCVBrc/downloaded_packages
> library(ChIPseeker)

#Error: package or namespace load failed for ‘ChIPseeker’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
 there is no package called ‘GO.db’

bakshiasif avatar Dec 23 '22 12:12 bakshiasif

I confirm that this will occur in an installation lacking GO.db. As a workaround you can just install it manually: BiocManager::install("GO.db"). I am trying to track down why BiocManager does not identify the dependency and install it for you.

vjcitn avatar Dec 23 '22 13:12 vjcitn

You should verify that BiocManager::valid() returns TRUE. I am betting that when you achieve that, the installation would succeed as requested.

vjcitn avatar Dec 23 '22 13:12 vjcitn

GO.db is not an immediate dependency of ChIPseeker (ChIPseeker imports enrichplot, imports GoSemSim, imports GO.db). install() / install.packages() sees that ChIPseeker's immediate dependencies are installed, and assumes that dependencies of those packages (etc.) are also correctly installed (as they must be if using install() / install.packages() always) so does not install GO.db. One possibility is that the user installed one of ChIPseeker's dependencies 'by hand', or explicitly removed GO.db. Maybe there are other ways in which GO.db could be unavailable...(how did vjcitn make their installation with GO.db unavailable?)?

BiocManager::valid() will check for these 'missing intermediate packages' with https://github.com/Bioconductor/BiocManager/issues/154

mtmorgan avatar Feb 21 '23 19:02 mtmorgan