bioconductor v3.9.0 BiocInstaller
This package is used to install and update Bioconductor,
Link to this section Summary
Functions
Upgrade Bioconductor to the latest version available for this version of R
Install or update Bioconductor and CRAN packages
Update previously installed Bioconductor or CRAN packages and their dependencies.
Validate installed package versions against biocLite versions.
Bioconductor version
Display current Bioconductor and CRAN repositories.
Convenience functions to return package names associated with Bioconductor publications.
Get the 'devel' version of the BiocInstaller package.
Link to this section Functions
BiocUpgrade()
Upgrade Bioconductor to the latest version available for this version of R
Description
Downloads the latest version of the BiocInstaller package, and upgrades all currently installed packages to the latest repositories list("for this version of R") .
To upgrade, use: list(" ", " ## 'http' if 'https' unavailable ", " source("https://bioconductor.org/biocLite.R") ", " biocLite("BiocUpgrade") ", " ")
Seealso
biocLite
Installs/updates Bioconductor/CRAN packages.
chooseBioCmirror
lets you choose from a list of all
public Bioconductor mirror URLs.
chooseCRANmirror
lets you choose from a list of all
public CRAN mirror URLs.
biocinstallRepos
returns the Bioconductor and CRAN
repositories used by biocLite
.
install.packages
installs the packages themselves.
Examples
source("https://bioconductor.org/biocLite.R")
biocLite("BiocUpgrade")
biocLite()
Install or update Bioconductor and CRAN packages
Description
biocLite
installs or updates Bioconductor and CRAN packages in
a Bioconductor release. Upgrading to a new Bioconductor release
requires additional steps; see https://bioconductor.org/install .
BIOCINSTALLER_ONLINE_DCF is an environment variable or global
options()
which, when set to FALSE
, uses configuration
information from a local archive rather than consulting the current
online version.
Usage
biocLite(pkgs=c("Biobase", "IRanges", "AnnotationDbi"),
suppressUpdates=FALSE,
suppressAutoUpdate=FALSE,
siteRepos=character(),
ask=TRUE, ...)
Arguments
Argument | Description |
---|---|
pkgs | character() of package names to install or update. A missing value and suppressUpdates=FALSE updates installed packages, perhaps also installing Biobase , IRanges , and AnnotationDbi if they are not already installed. Package names containing a / are treated as github repositories and installed using the install_github() function of the remotes package. |
suppressUpdates | logical(1) or character() . When FALSE , biocLite asks the user whether old packages should be update. When TRUE , the user is not prompted to update old packages. When character() a vector specifying which packages to NOT update. |
suppressAutoUpdate | logical(1) indicating whether the BiocInstaller package updates itself. |
siteRepos | character() representing an additional repository in which to look for packages to install. This repository will be prepended to the default repositories (which you can see with biocinstallRepos ). |
ask | logical(1) indicating whether to prompt user before installed packages are updated, or the character string 'graphics', which brings up a widget for choosing which packages to update. If TRUE, user can choose whether to update all outdated packages without further prompting, to pick and choose packages to update, or to cancel updating (in a non-interactive session, no packages will be updated). Otherwise, the value is passed to update.packages . |
... | Additional arguments. When installing CRAN or Bioconductor packages, typical arguments include: lib.loc , passed to old.packages and used to determine the library location of installed packages to be updated; and lib , passed to install.packages to determine the library location where pkgs are to be installed. When installing github packages, ... is passed to the remotes package functions install_github and install (internally). A typical use is to build vignettes, via dependencies=TRUE, build_vignettes=TRUE . |
Details
Installation of Bioconductor and CRAN packages use R's standard
functions for library management -- install.packages()
,
available.packages()
, update.packages()
. Installation of
github packages uses the install_github()
function from the
remotes
package. For this reason it usually makes sense, when
complicated installation options are needed, to invoke
biocLite()
separately for Bioconductor / CRAN packages and for
github packages.
Setting BIOCINSTALLER_ONLINE_DCF to FALSE
can speed
package loading when internet access is slow or non-existent, but may
result in out-of-date information about the current release and
development versions of Bioconductor.
Value
biocLite()
returns the pkgs
argument, invisibly.
Seealso
biocinstallRepos
returns the Bioconductor and CRAN
repositories used by biocLite
.
install.packages
installs the packages themselves.
update.packages
updates all installed packages.
chooseBioCmirror
lets you choose from a list of all
public Bioconductor mirror URLs.
chooseCRANmirror
lets you choose from a list of all
public CRAN mirror URLs.
monograph_group
, RBioinf_group
and
biocases_group
return package names associated
with Bioconductor publications.
all_group
returns the names of all Bioconductor
software packages.
Examples
## Change default Bioconductor and CRAN mirrors
chooseBioCmirror()
chooseCRANmirror()
## If you don't have the BiocInstaller package installed, you can
## quickly install and load it as follows:
source("https://bioconductor.org/biocLite.R") # 'http' if 'https' unavailable
## The most recent version of the BiocInstaller package is now loaded.
## No need to load it with library().
## installs default packages (if not already installed) and updates
## previously installed packages
biocLite()
## Now install a CRAN package:
biocLite("survival")
## install a Bioconductor package, but don't update all installed
## packages as well:
biocLite("GenomicRanges", suppressUpdates=TRUE)
## Install default packages, but do not update any package whose name
## starts with "org." or "BSgenome."
biocLite(suppressUpdates=c("^org.", "^BSgenome."))
## install a package from source:
biocLite("IRanges", type="source")
## install all Bioconductor software packages
biocLite(all_group())
## Show the Bioconductor and CRAN repositories that will be used to
## install/update packages.
biocinstallRepos()
## Use local archive rather than current online configuration
## information. Set this prior to loading the BiocInstaller package.
options(BIOCINSTALLER_ONLINE_DCF = FALSE)
biocUpdatePackages()
Update previously installed Bioconductor or CRAN packages and their dependencies.
Description
Update previously installed Bioconductor and CRAN packages and their
dependencies. Use biocLite
to install new packages or to
update all out-of-date packages. Upgrading to a new Bioconductor
release requires additional steps; see
https://bioconductor.org/install .
Usage
biocUpdatePackages(pkgs, dependencies = NA, repos=biocinstallRepos(), ...)
Arguments
Argument | Description |
---|---|
pkgs | character() of package names to install or update. |
dependencies | character() describing out-of-date dependencies that are also updated. Defaults to c("Depends", but can be a subset of c("Depends", . |
repos | character() of named repositories in which to look for package updates, in the style of biocinstallRepos() . |
list() | Additional arguments, passed to update.packages . For example, ask=FALSE to avoid prompts to update individual packages. |
Value
NULL , invisibly.
Seealso
Author
Martin Morgan mtmorgan@fhcrc.org
Examples
biocUpdatePackages("GenomicRanges", ask=FALSE)
biocValid()
Validate installed package versions against biocLite versions.
Description
Check that installed packages are consistent (neither out-of-date nor
too new) with the version of R and Bioconductor in use, using
biocLite
for validation.
Usage
biocValid(pkgs = installed.packages(lib.loc, priority = priority),
lib.loc = NULL, priority = "NA", type = getOption("pkgType"),
filters = NULL, silent = FALSE, ..., fix=FALSE)
Arguments
Argument | Description |
---|---|
pkgs | A character list of package names for checking, or a matrix as returned by installed.packages . |
lib.loc | The library location(s) of packages to be validated; see installed.packages . |
priority | check validity of all, base , or recommended packages; see installed.packages . |
type | The type of available package (e.g., binary, source) to check validity against; see available.packages . |
filters | Filter available packages to check validity against; see available.packages . |
silent | Report how packages are invalid ( silent=FALSE , default) and abort execution, or return a logical(1) ( silent=TRUE ) indicating the overall validity of installed packages. |
list() | Additional arguments, passed to biocLite when fix=TRUE . |
fix | When TRUE , invoke biocLite to reinstall (update or downgrade, as appropriate) invalid packages. |
Details
This function compares the version of installed packages to the version of packages associated with the version of R and Bioconductor appropriate for the BiocInstaller package currently in use.
Packages are reported as out-of-date if a more recent version
is available at the repositories specified by
biocinstallRepos()
. Usually, biocLite()
is sufficient to
update packages to their most recent version.
Packages are reported as too new if the installed version is
more recent than the most recent available in the
biocinstallRepos()
repositories. It is possible to down-grade
by re-installing a too new package PkgA with
biocLite("PkgA")
. It is important for the user to understand
how their installation became too new, and to avoid this in the
future.
Value
logical(1)
indicating overall validity of installed packages.
Seealso
biocLite
to update installed packages.
Author
Martin Morgan mtmorgan@fhcrc.org
Examples
try(biocValid())
biocVersion()
Bioconductor version
Description
This function reports the Bioconductor version in use, as determined by the BiocInstaller package.
Usage
biocVersion()
Value
package_version
representing the Bioconductor version in use.
Seealso
biocLite
Installs/updates Bioconductor/CRAN packages.
BiocUpgrade
Upgrading to new versions.
Examples
biocVersion()
biocinstallRepos()
Display current Bioconductor and CRAN repositories.
Description
Displays the URLs of the repositories used by biocLite
to install Bioconductor and CRAN packages.
Usage
biocinstallRepos(siteRepos=character(), version=biocVersion())
Arguments
Argument | Description |
---|---|
siteRepos | (Optional) character(1) representing an additional repository (e.g., a URL to an organization's internally maintained repository) in which to look for packages to install. This repository will be prepended to the default repositories returned by the function. |
version | (Optional) character(1) or package_version indicating the Bioconductor version (e.g., 3.1 ) for which repositories are required. |
Value
Named character()
of repositories.
Seealso
biocLite
Installs/updates Bioconductor/CRAN packages.
install.packages
installs the packages themselves.
chooseBioCmirror
lets you choose from a list of all
public Bioconductor mirror URLs.
chooseCRANmirror
lets you choose from a list of all
public CRAN mirror URLs.
Examples
biocinstallRepos()
## Choose mirrors
chooseCRANmirror()
chooseBioCmirror()
packageGroups()
Convenience functions to return package names associated with Bioconductor publications.
Description
Returns character vectors of packages associated with Bioconductor publications,
which can then be passed to biocLite
Usage
monograph_group()
RBioinf_group()
biocases_group()
all_group()
Value
character()
of package names.
Seealso
biocLite
Installs/updates Bioconductor/CRAN packages.
biocinstallRepos
returns the Bioconductor and CRAN
repositories used by biocLite
.
install.packages
installs the packages themselves.
chooseBioCmirror
lets you choose from a list of all
public Bioconductor mirror URLs.
chooseCRANmirror
lets you choose from a list of all
public CRAN mirror URLs.
Examples
## Get the names of packages used in the book
## "Bioconductor Case Studies":
biocases_group()
## Get the names of packages used in the book
## "R Programming for Bioinformatics":
RBioinf_group()
## Get the names of packages used in the monograph
## "Bioinformatics and Computational Biology Solutions
## Using R and Bioconductor":
monograph_group()
## Get the names of all Bioconductor software packages
all_group()
useDevel()
Get the 'devel' version of the BiocInstaller package.
Description
Downloads the 'devel' version of the BiocInstaller package
so that all subsequent invocations of biocLite
and biocinstallRepos
use the devel repositories.
Displays the URLs of the repositories used by biocLite
to install Bioconductor and CRAN packages.
Should only be used with a release (or patched) version of R, freshly installed.
Usage
isDevel()
useDevel(devel=TRUE)
Arguments
Argument | Description |
---|---|
devel | Whether to look in the devel (TRUE) or release (FALSE) repositories in subsequent invocations of biocLite and biocinstallRepos . |
Details
Bioconductor has a 'release' branch and a 'devel' branch. The branch in use depends on the version of R and the version of the BiocInstaller.
useDevel()
installs the correct version of the BiocInstaller
package for use of the devel version of Bioconductor, provided it is
supported by the version of R in use.
isDevel()
returns TRUE when the version of BiocInstaller in use
corresponds to the 'devel' version of Bioconductor.
In more detail, the version number of the BiocInstaller package determines whether to download packages from the release or devel repositories of Bioconductor. In keeping with Bioconductor versioning conventions, if the middle number (y in x.y.z) is even, the package is part of a release version; if odd, it's part of a devel version.
By default, when BiocInstaller is first installed and when the version of R supports the current release version of Bioconductor, BiocInstaller will use the release repository.
To change the version of BiocInstaller to support the 'devel' branch
of Bioconductor, run useDevel()
. With argument TRUE
(the
default), it will download the devel version of BiocInstaller and
subsequently all packages downloaded with biocLite
will
be from the devel repository. You should run useDevel
only once.
During release cycles where both the release and devel version of
Bioconductor use the same version of R, it is possible to use release
and devel versions of Bioconductor with the same installation of R.
To do this, use the R_LIBS_USER
environment variable. First,
create two separate directories for your BioC release and devel
packages. Suggested directory names are as follows:
Linux:
~/R/x86_64-unknown-linux-gnu-library/3.2-bioc-release
~/R/x86_64-unknown-linux-gnu-library/3.2-bioc-devel
Mac OS:
~/Library/R/3.2-bioc-release/library
~/Library/R/3.2-bioc-devel/library
Windows:
C:UsersYOUR_USER_NAMEDocumentsRwin-library3.2-bioc-release
C:UsersYOUR_USER_NAMEDocumentsRwin-library3.2-bioc-devel
(change YOUR_USER_NAME to your user name)
Invoke "R for bioc-devel" or "R for bioc-release" from the command line as follows:
Linux:
R_LIBS_USER=~/R/x86_64-unknown-linux-gnu-library/3.2-bioc-release R
R_LIBS_USER=~/R/x86_64-unknown-linux-gnu-library/3.2-bioc-devel R
Mac OS X:
R_LIBS_USER=/Library/R/3.2-bioc-release/library R
R_LIBS_USER=/Library/R/3.2-bioc-devel/library R
Windows:
cmd /C "set R_LIBS_USER=C:UsersYOUR_USER_NAMEDocumentsRwin-library3.2-bioc-release && R"
cmd /C "set R_LIBS_USER=C:UsersYOUR_USER_NAMEDocumentsRwin-library3.2-bioc-devel && R"
(Note: this assumes that R.exe is in your PATH.)
If you launch R in this way and then invoke .libPaths
,
you'll see that the first item is your special release or
devel directory. Packages will be installed to that directory and that
is the first place that library
will look for them.
biocLite
, install.packages
,
update.packages
and friends all respect this
setting.
On Linux and Mac OS X, you can create a bash alias to save typing. Add the following to your ~/bash_profile:
Linux
alias Rdevel='R_LIBS_USER=~/R/x86_64-unknown-linux-gnu-library/3.2-bioc-devel R'
alias Rrelease='R_LIBS_USER=~/R/x86_64-unknown-linux-gnu-library/3.2-bioc-release R'
Mac OS X
alias Rdevel='R_LIBS_USER=~/Library/R/3.2-bioc-devel/library R' alias Rrelease='R_LIBS_USER=~/Library/R/3.2-bioc-release/library R'
You can then invoke these from the command line as
Rdevel
...and...
Rrelease
On Windows, you can create two shortcuts, one for devel and one for release. Go to My Computer and navigate to a directory that is in your PATH. Then right-click and choose New->Shortcut.
in the "type the location of the item" box, put:
cmd /C "set R_LIBS_USER=C:UsersYOUR_USER_NAMEDocumentsRwin-library3.2-bioc-release && R"
...for release and
cmd /C "set R_LIBS_USER=C:UsersYOUR_USER_NAMEDocumentsRwin-library3.0-bioc-devel && R"
...for devel.
(again, it's assumed R.exe is in your PATH)
Click "Next".
In the "Type a name for this shortcut" box, type
Rdevel
or
Rrelease
You can invoke these from the command line as
Rdevel.lnk
...and...
Rrelease.lnk
(You must type in the .lnk extension.)
Because R_LIBS_USER
is an environment variable, its value should be
inherited by any subprocesses started by R, so they should do the
right thing as well.
Value
useDevel()
: Invisible NULL.
isDevel()
: logical(1) TRUE or FALSE.
Seealso
biocinstallRepos
returns the Bioconductor and CRAN
repositories used by biocLite
.
biocLite
Installs/updates Bioconductor/CRAN packages.
install.packages
installs the packages themselves.
chooseBioCmirror
lets you choose from a list of all
public Bioconductor mirror URLs.
chooseCRANmirror
lets you choose from a list of all
public CRAN mirror URLs.
Examples
isDevel()
useDevel()