Installing Local packages in Bioconductor
2
0
Entering edit mode
BioC123 • 0
@2a9ce85d
Last seen 18 days ago
Asia

Hi

I want to install a package in Bioconductor. I tried installing it by downloading it through R using the following code

BiocManager::install("Packagename")

But I receive an error message. I have managed to download the package from the web. Is there a way to install packages in Bioconductor from local files similar to other packages in R?

package • 214 views
0
Entering edit mode

If there is an error you might need to solve that. But once downloaded you can install it from the command line with R CMD install package.tar.gz

0
Entering edit mode
@james-w-macdonald-5106
Last seen 2 days ago
United States

You shouldn't download packages directly. R and Bioconductor are tightly bound by version, and if you mix and match versions you may get unexpected results.

0
Entering edit mode

You could also try to make sure all the versions of packages are up-to-date with BiocManager::valid() and/or update any that are installed with BiocManager::install(). But as James pointed out please show the command you try with the full ERROR to get better assistance.

0
Entering edit mode

Thank you very much for your help. I have discussed my main problem in another question which has not yet been resolved (non-zero exit status when trying to install a package).

I thought I might be able to take care of that issue with installing 'TxDb.Hsapiens.UCSC.hg38.knownGene' by downloading it and subsequently installing it as a local package in Bioconductor. I would really appreciate it if you could share your thoughts on this matter.

Thank you!

1
Entering edit mode

Downloading the file by hand and then installing is no different from what BiocManager is doing, except BiocManager ensures that you get the correct version. If I try to replicate what you have done, I get

> library(BiocManager)
> install("TxDb.Hsapiens.UCSC.hg38.knownGene")
trying URL 'https://bioconductor.org/packages/3.15/data/annotation/src/contrib/TxDb.Hsapiens.UCSC.hg38.knownGene_3.15.0.tar.gz'
Content type 'application/x-gzip' length 44812729 bytes (42.7 MB)

* installing *source* package 'TxDb.Hsapiens.UCSC.hg38.knownGene' ...
** using staged installation
** R
** inst
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (TxDb.Hsapiens.UCSC.hg38.knownGene)


The error message you show in the other post is missing all of the information that comes after the download step. I've never seen that happen, so it appears that you may have omitted some of the output. If so, please provide the complete output from the attempted install.

0
Entering edit mode
Hicham • 0
@2952f756
Last seen 10 days ago
Morocco

Yes it's possible to download package and installing it from local disc, I already tried this method and it worked for me without any problems.

2. Go to R : Tools > install packages...
3. Change : install from "repository (CRAN)" to "Package Archive File (.zip ; .tar.gz)"
4. Select the package that you downloaded or Click Browse to select it
5. Click install and it's done