Install Bioconductor Packages

For full details on getting started with Bioconductor, see the Bioconductor Website. This material is just a “quick start”.

Use the BiocManager package to install Bioconductor packages. To install core packages, type the following in an R command window:

install.packages('BiocManager')
BiocManager::install()

Install specific packages, e.g., “GenomicFeatures” and “AnnotationDbi”, with

BiocManager::install(c("GenomicFeatures", "AnnotationDbi"))

The biocLite() function (in the BiocInstaller package installed by the biocLite.R script) has arguments that change its default behavior; type ?biocLite for further help.

Find Bioconductor Packages

Visit the software package list to discover available packages.

Update Installed Bioconductor Packages

Bioconductor packages, especially those in the development branch, are updated fairly regularly. To identify packages requiring update within your version of Bioconductor, start a new session of R and enter

BiocManager::install()

Use the argument ask=FALSE to update old packages without being prompted. Read the help page for ?BiocManager::install for additional details.

Troubleshoot Package Installations

Use the commands:

BiocManager::valid()

to flag packages that are either out-of-date or too new for your version of Bioconductor. The output suggests ways to solve identified problems, and the help page ?biocValid lists arguments influencing the behavior of the function.

Troubleshoot BiocInstaller

If you see a message like this:

BiocInstaller version 3.2 is too old for R version 3.3 …do the following:

  • Quit your R session
  • Start a new session with R --vanilla
  • Run the command remove.packages("BiocManager", lib=.libPaths())
    • Repeat that command until R says there is no such package.
  • Run the command install.packages('BiocManager')
  • Run BiocManager::valid() to ensure your installed packages are valid for the current version of Bioconductor, and follow the instructions it gives you, most likely: BiocManager::install()

sessionInfo

sessionInfo()
## R version 4.2.0 (2022-04-22)
## Platform: x86_64-apple-darwin17.0 (64-bit)
## Running under: macOS Big Sur/Monterey 10.16
## 
## Matrix products: default
## BLAS:   /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRblas.0.dylib
## LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib
## 
## locale:
## [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## loaded via a namespace (and not attached):
##  [1] digest_0.6.29   R6_2.5.1        jsonlite_1.8.0  magrittr_2.0.3 
##  [5] evaluate_0.15   stringi_1.7.6   rlang_1.0.2     cli_3.3.0      
##  [9] rstudioapi_0.13 jquerylib_0.1.4 bslib_0.3.1     rmarkdown_2.14 
## [13] tools_4.2.0     stringr_1.4.0   xfun_0.30       yaml_2.3.5     
## [17] fastmap_1.1.0   compiler_4.2.0  htmltools_0.5.2 knitr_1.39     
## [21] sass_0.4.1