Using Bioconductor

The current release of Bioconductor is version
3.9; it works with R version
3.6.0. Users of older R and
Bioconductor must update their installation to take advantage
of new features and to access packages that have been added to
Bioconductor since the last release.

The development version of Bioconductor is version
3.10; it works with R version
3.6.0. More recent ‘devel’
versions of R (if available) will be supported during the next
Bioconductor release cycle.

Install the latest release of R, then get the latest version of
Bioconductor by starting R and entering the commands

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 ?install for additional details.

Upgrading installed Bioconductor packages

Some versions of R support more than one version of Bioconductor. To
use the latest version of Bioconductor for your version of R, enter

Recompiling installed Bioconductor packages

Rarely, underlying changes in the operating system require ALL
installed packages to be recompiled for source (C or Fortran)
compatibility. One way to address this might be to start a new R
session and enter

As this will reinstall all currently installed packages, it likely
involves a significant amount of network bandwidth and compilation
time. All packages are implicitly updated, and the cumulative effect
might introduce wrinkles that disrupt your work flow. It also requires
that you have the necessary compilers installed.

Troubleshoot Package Installations

Use the commands

BiocManager::valid() ## R version 3.5 or later

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 ?valid lists arguments influencing
the behavior of the function.

Troubleshoot BiocManager

One likely reason for BiocManager not working on your system could
be that your version of R is too old for BiocManager. In order
avoid this issue, please ensure that you have the latest version of R
installed in your system. BiocManager supports R versions from 3.5.0
and above.

Why use BiocManager::install()?

BiocManager::install() is the recommended way to install Bioconductor
packages. There are several reasons for preferring this to the
‘standard’ way in which R pacakges are installed via
install.packages().

Bioconductor has a repository and release schedule that differs from R
(Bioconductor has a ‘devel’ branch to which new packages and updates
are introduced, and a stable ‘release’ branch emitted once every 6
months to which bug fixes but not new features are introduced).

A consequence of the mismatch between R and Bioconductor release
schedules is that the Bioconductor version identified by
install.packages() is sometimes not the most recent ‘release’
available. For instance, an R minor version may be introduced some
months before the next Bioc release. After the Bioc release the users
of the R minor version will be pointed to an out-of-date version of
Bioconductor.

A consequence of the distinct ‘devel’ branch is that
install.packages() sometimes points only to the ‘release’
repository, whereas Bioconductor developers and users wanting
leading-edge features wish to access the Bioconductor ‘devel’
repository. For instance, the Bioconductor 3.0 release is available
for R.3.1.x, so Bioconductor developers and leading-edge users need to
be able to install the devel version of Bioconductor packages into the
same version (though perhaps different instance or at least library
location) of R that supports version 2.14 of Bioconductor.

An indirect consequence of Bioconductor’s structured release is that
packages generally have more extensive dependencies with one another,
both explicitly via the usual package mechanisms and implicitly
because the repository, release structure, and Bioconductor community
interactions favor re-use of data representations and analysis
concepts across packages. There is thus a higher premium on knowing
that packages are from the same release, and that all packages are
current within the release.

The BiocManager package serves as the primary way to ensure that
the appropriate Bioconductor installation is used with respect
to the version of R in use regardless of the R and Bioconductor
release cycles.

> library(BiocManager)
Bioconductor version 3.9 (BiocManager 1.30.4), ?BiocManager::install
for help

The install() function is provided by BiocManager. This is a
wrapper around install.packages, but with the repository chosen
according to the version of Bioconductor in use, rather than to the
version relevant at the time of the release of R.

install() also nudges users to remain current within a release, by
default checking for out-of-date packages and asking if the user would
like to update

(at some points in the R / Bioconductor release cycle use of ‘devel’
requires use of a different version of R itself, in which case the
attempt to install devel fails with an appropriate message).

The BiocManager package also provides valid() to test that the
installed packages are not a hodgepodge from different Bioconductor
releases (the ‘too new’ packages have been installed from source
rather than a repository; regular users would seldom have these).