R how to install a specified version of a bioconductor package?
Asked Answered
P

3

11

The current version of the package I would like to use is failing on bioconductor. Yet, the old version used to work.
I am wondering how one can install a specific version of a bioconductor package?
Thanks in advance.

In my case, the package is called biomaRt and the failing version is 2.34.2 while 2.34.0 is successful.

Important Update: The year is 2022, I strongly encourage you to switch to a programming language that is used in the enterprise. Unlike R, the software used in enterprise do have non-functional requirements allowing them to be used in real-life scenarios. Check for example the technologies used in Instagram/Twitter/Dropbox/Reddit's back-end services and what were their motivations in choosing those technologies. This is already a good start.

Perm answered 26/3, 2018 at 8:36 Comment(9)
how do you install, what's the error messageMasoretic
There is no error during the installation, the error occurs during certain usages. As you can see, even the build badge status on the bioconductor website is "error" bioconductor.org/packages/release/bioc/html/biomaRt.htmlPerm
OK, but the question's title is about installing. To install a package use the command R CMD INSTALL yourpackage.tar.gzMasoretic
The title is about installing the version of interest. Not always the latest release. As the latest releases are not always the stable releases, right?Perm
Yet, bioconductor is providing an index for the old versions here: bioconductor.org/packages/3.6/bioc/src/contrib/Archive/biomaRt The question is how to install them.Perm
They should be stable, but anyway you can install any version you want if dependencies are OK. Download the tar.gz file of your choice, and install it as I said. If you need to remove anything, R CMD REMOVE yourpackageMasoretic
I do not expect anything from R ecosystem to be stable.Perm
Thanks for the update, I think you aren't alone to face frustration with that technology.Masoretic
The "important update" is completely irrelevant to the question, and R is entirely usable in an enterprise settingFreebooter
P
7

Bioconductor stores the package archives here: https://bioconductor.org/packages/3.6/bioc/src/contrib/Archive/

1) Locate and download the version you would like to install.
2) Install it using R CMD INSTALL yourpackage_version_x.y.z.tar.gz as suggested by Eugène Adell in the comments.
If you cannot find the specific version on the bioconductor archive, then try to find it on the github repository of the package.

Perm answered 26/3, 2018 at 9:32 Comment(2)
Thanks for your help in this subject but I did not find a tar.gz for "rhdf5" in Bioconductor packages archives. The package I want to install is here rhdf5, the 3.6 archives is here 3.6 and the 3.7. Where I can find a tar.gz for 2.22.0 ? In the github repository, there is nothing here. Can I use biocLite() and a parameter like "version" to install rhdf5_2.22.0?Teplica
If someone else has the same issue, I found an archive of rhdf5 here. I think someone can change the package name in the link (or the version of bioc) to get an older version of any Bioconductor packages. Thanks Mike (maintainer of rhdf5) !Teplica
B
8

The version of DESeq2 package I wanted is 1.24 and is located in Bioconductor release version 3.9. The current release version of Bioconductor is 3.10 and DESeq2 version is 1.26.

Doing a BiocManager::install("DESeq2") would thus yield version 1.26. To get my desired version, I had to install packages compatible with Bioconductor release of 3.9 using

BiocManager::install(version = "3.9")

and then

BiocManager::install("DESeq2", version = "3.9")

This is from part of my sessionInfo(). Notice the correct version of DESeq2.

> sessionInfo()
R version 3.6.2 (2019-12-12)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: Fedora 31 (Workstation Edition)

Matrix products: default
BLAS/LAPACK: /usr/lib64/R/lib/libRblas.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=sl_SI.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=sl_SI.UTF-8    LC_MESSAGES=en_US.UTF-8    LC_PAPER=sl_SI.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=sl_SI.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] parallel  stats4    stats     graphics  grDevices datasets  utils     methods   base     

other attached packages:
 [1] data.table_1.13.2           DESeq2_1.24.0               SummarizedExperiment_1.14.1 DelayedArray_0.10.0        
 [5] BiocParallel_1.18.1         matrixStats_0.57.0          Biobase_2.44.0              GenomicRanges_1.36.1       
 [9] GenomeInfoDb_1.20.0         IRanges_2.18.3              S4Vectors_0.22.1            BiocGenerics_0.30.0
Beware answered 25/11, 2020 at 15:39 Comment(0)
P
7

Bioconductor stores the package archives here: https://bioconductor.org/packages/3.6/bioc/src/contrib/Archive/

1) Locate and download the version you would like to install.
2) Install it using R CMD INSTALL yourpackage_version_x.y.z.tar.gz as suggested by Eugène Adell in the comments.
If you cannot find the specific version on the bioconductor archive, then try to find it on the github repository of the package.

Perm answered 26/3, 2018 at 9:32 Comment(2)
Thanks for your help in this subject but I did not find a tar.gz for "rhdf5" in Bioconductor packages archives. The package I want to install is here rhdf5, the 3.6 archives is here 3.6 and the 3.7. Where I can find a tar.gz for 2.22.0 ? In the github repository, there is nothing here. Can I use biocLite() and a parameter like "version" to install rhdf5_2.22.0?Teplica
If someone else has the same issue, I found an archive of rhdf5 here. I think someone can change the package name in the link (or the version of bioc) to get an older version of any Bioconductor packages. Thanks Mike (maintainer of rhdf5) !Teplica
C
2

Try adding repos = c("https://bioconductor.org/packages/3.5/bioc", "other CRAN repos that might be needed") option to the install.packages call to install Bioconductor packages from previous releases. Installing specific version from tar.gz archive isn't recommended as you might end up with mutually incompatible packages in your Bioconductor installation.

Cryan answered 26/3, 2018 at 9:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.