Question: how to install AnnotationHub_2.4.2
0
2.1 years ago by
nakanomasayuki2650 wrote:

I would like to install older version AnnotationHub_2.4.2 under R version 3.3.0 or R version 3.3.3.

But package ‘AnnotationHub_2.4.2’ is not available (for R version 3.3.0).

Now AnnotationHub_2.6.4 is installed.

How can I install older version of AnnotationHub ?

R • 354 views
modified 2.1 years ago by Martin Morgan ♦♦ 23k • written 2.1 years ago by nakanomasayuki2650

Why do you need an older version? Perhaps AnnotationHub::snapshotDate() will help, or perhaps the resource that you are after is simply no longer available?

0
2.1 years ago by
United States
James W. MacDonald50k wrote:

Bioconductor packages are tightly associated with the R version. If you want to use an older version of any package, you have to use the correct version of R. Unfortunately, R is released yearly and Bioc is semi-annually, so you are asking for a version of AnnotationHub that corresponds to Bioc 3.3, which was the first version of Bioconductor for R-3.3.x. Simply installing R-3.3.0 and using biocLite will get you AnnotationHub 2.6.4, as you have noted. So we have to be a bit tricky.

You can either uninstall BiocInstaller (using remove.packages), or just install a clean version of R-3.3.0, and install BiocInstaller by hand (here I am using my Windows box. You need to point to the correct version of the package for your OS).

> install.packages("http://bioconductor.org/packages/3.3/bioc/bin/windows/contrib/3.3/BiocInstaller_1.22.3.zip", repos=NULL)
trying URL 'http://bioconductor.org/packages/3.3/bioc/bin/windows/contrib/3.3/BiocInstaller_1.22.3.zip'
Content type 'application/zip' length 119756 bytes (116 KB)

package ‘BiocInstaller’ successfully unpacked and MD5 sums checked

> library(BiocInstaller)
Bioconductor version 3.3 (BiocInstaller 1.22.3), ?biocLite for help
A newer version of Bioconductor is available for this version of R,
> biocLite("AnnotationHub")
BioC_mirror: https://bioconductor.org
Using Bioconductor 3.3 (BiocInstaller 1.22.3), R 3.3.0 (2016-05-03).
Installing package(s) ‘AnnotationHub’
trying URL 'https://bioconductor.org/packages/3.3/bioc/bin/windows/contrib/3.3/AnnotationHub_2.4.2.zip'

Thank you for replying my question.

I used Yosemite macOS10.10.5.

>install.packages("http://bioconductor.org/packages/3.3/bioc/bin/macosx/yosemite/contrib/3.3/BiocInstaller_1.22.3.zip", repos=NULL)

Warning in install.packages :
Error in install.packages : type == "both" cannot be used with 'repos = NULL'

I tried mavericks instead of yosemite, but failed.

How should I do to solve this problem?

0
2.1 years ago by
Martin Morgan ♦♦ 23k
United States
Martin Morgan ♦♦ 23k wrote:

Make sure you have removed all versions of BiocInstaller

R --vanilla
> remove.packages("BiocInstaller")  # repeat until R says "there is no pacakge called 'BiocInstaller'

Start a new R session and install the default BiocInstaller

R --vanilla
> source("http://bioconductor.org/biocLite.R")

> BiocInstaller::useDevel(FALSE)

You'll now have BiocInstaller 1.22.3.

> BiocInstaller::biocLite("AnnotationHub")

will install the version of AnnnotationHub you are looking for.