CINXE.COM
Bioconductor - Install
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US" prefix="og: http://ogp.me/ns#"> <!-- htmllint preset="none" --> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Language" content="en-us" /> <meta name="robots" content="all" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="description" content="The Bioconductor project aims to develop and share open source software for precise and repeatable analysis of biological data. We foster an inclusive and collaborative community of developers and data scientists." /> <title>Bioconductor - Install</title> <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/styles/default.min.css"> <link rel="stylesheet" href="/style/existing.css" /> <!-- General styling --> <link rel="stylesheet" type="text/css" href="/style/base/fonts.css" media="screen" /> <link rel="stylesheet" type="text/css" href="/style/base/colors.css" media="screen" /> <link rel="stylesheet" type="text/css" href="/style/base/typography.css" media="screen" /> <link rel="stylesheet" type="text/css" href="/style/base/layout.css" media="screen" /> <!-- Component styling --> <link rel="stylesheet" type="text/css" href="/style/components/code.css" media="screen" /> <link rel="stylesheet" type="text/css" href="/style/components/gallery.css" media="screen" /> <link rel="stylesheet" type="text/css" href="/style/components/blockquote.css" media="screen" /> <link rel="stylesheet" type="text/css" href="/style/components/lists.css" media="screen" /> <link rel="stylesheet" type="text/css" href="/style/components/breadcrumbs.css" media="screen" /> <link rel="stylesheet" type="text/css" href="/style/components/buttons.css" media="screen" /> <link rel="stylesheet" type="text/css" href="/style/components/tables.css" media="screen" /> <!-- Block styling --> <link rel="stylesheet" type="text/css" href="/style/sections/announcement.css" media="screen" /> <link rel="stylesheet" type="text/css" href="/style/sections/hero.css" media="screen" /> <link rel="stylesheet" type="text/css" href="/style/sections/header.css" media="screen" /> <link rel="stylesheet" type="text/css" href="/style/sections/sidebar.css" media="screen" /> <link rel="stylesheet" type="text/css" href="/style/sections/footer.css" media="screen"/> <!-- Page styling --> <link rel="stylesheet" type="text/css" href="/style/pages/home.css" media="screen" /> <link rel="stylesheet" type="text/css" href="/style/pages/get-started.css" media="screen" /> <link rel="stylesheet" type="text/css" href="/style/pages/learn-and-dev.css" media="screen" /> <link rel="stylesheet" type="text/css" href="/style/pages/about.css" media="screen" /> <link rel="stylesheet" type="text/css" href="/style/pages/packages.css" media="screen"/> <link rel="SHORTCUT ICON" type="image/x-icon" href="/favicon.ico" /> <link rel="ICON" type="image/x-icon" href="/favicon.ico" /> </head> <body> <!-- Google tag (gtag.js) --> <script async src="https://www.googletagmanager.com/gtag/js?id=G-WJMEEH1J58"></script> <script> window.dataLayer = window.dataLayer || []; function gtag() { dataLayer.push(arguments); } gtag("js", new Date()); gtag("config", "G-WJMEEH1J58"); </script> <script type="text/javascript" src="/js/jquery.js"></script> <script src="/js/jquery.tools.min.js"></script> <script type="text/javascript" src="/js/bioconductor.js"></script> <script type="text/javascript" src="/js/jquery.corner.js"></script> <script type="text/javascript" src="/js/jquery.timeago.js"></script> <script type="text/javascript" src="/js/bioc-style.js"></script> <script type="text/javascript" src="/js/versions.js"></script> <script type="text/javascript" src="/js/code_blocks.js"></script> <script type="text/javascript" src="/js/sidebar.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/highlight.min.js"></script> <header id="site-masthead" class="site-masthead"> <div class="announcement announcement-brand"> </div> <!-- If there are no announcements, comment out the element --> <div class="header-size"> <div class="header-logo"> <a href="/"> <img src="/images/logo/svg/Logo.svg" class="masthead-logo" alt="Bioconductor home" /> </a> </div> <nav class="header-nav"> <div class="nav-links"> <a class="format-bold mobile-link" href="/about/">About</a> <a class="format-bold mobile-link" href="/help/">Learn</a> <a class="format-bold mobile-link" href="/packages/release/BiocViews.html#___Software">Packages</a> <a class="format-bold mobile-link" href="/developers/">Developers</a> </div> <div class="search-container"> <form class="site-search" id="search-form" method="GET" action="/help/search/index.html" > <label for="search-bar" class="sr-only">Search</label> <img src="/images/icons/search-icon.svg" class="search-icon" alt="Search icon" aria-hidden="true" /> <input class="search-bar" name="search-bar" placeholder="Search" id="search-bar" /> </form> </div> <a class="header-button format-bold mobile-link" href="/install/"> <span class="get-started format-bold"> Get Started <svg xmlns="http://www.w3.org/2000/svg" width="14" height="15" viewBox="0 0 14 15" fill="none" > <path d="M5.25 3.66665L9.33333 7.74998L5.25 11.8333" stroke="#3792AD" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" /> </svg> </span> </a> </nav> <div class="nav-mobile"> <h6>Menu</h6> <div class="hamburger"> <span class="bar"></span> <span class="bar"></span> <span class="bar"></span> </div> </div> </div> </header> <section class="hero"> <div class="container"> <ul class="breadcrumbs"> <li><a href="/">Home</a></li> <li>Install</li> </ul> <div class="install-hero"> <h1 class="get-started-h1">Get started</h1> <div class="install-row"> <div class="instructions-install"> <h4>1. Install R</h4> <p class="text-large"> The current release of Bioconductor is version 3.20; it works with R version 4.4.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. </p> <p class="text-large"> The development version of Bioconductor is version 3.21; it works with R version 4.5.0. More recent ‘devel’ versions of R (if available) will be supported during the next Bioconductor release cycle. </p> <img src="/images/icons/Step 1 quote.svg" alt="blank_" class="step-1" /> <div class="warmcool-gradient"> <div class="install-row"> <div class="install-content"> <blockquote class="install-blockquote"> <p class="format-bold">1.</p> <p> Download the most recent version of R. The R FAQs and the R Installation and Administration Manual contain detailed instructions for installing R on various platforms (Linux, OS X, and Windows being the main ones). </p> </blockquote> <blockquote class="install-blockquote"> <p class="format-bold">2.</p> <p> Start the R program; on Windows and OS X, this will usually mean double-clicking on the R application, on UNIX-like systems, type “R” at a shell prompt. </p> </blockquote> <blockquote class="install-blockquote"> <p class="format-bold">3.</p> <p> As a first step with R, start the R help browser by typing <strong>help.start()</strong> in the R command window. For help on any function, e.g. the “mean” function, type <strong>?mean</strong>. </p> </blockquote> </div> </div> </div> </div> <div class="instructions-install"> <h4>2. Get the latest version of Bioconductor</h4> <p class="text-large"> Once R has been installed, get the latest version of Bioconductor by starting R and entering the following commands. </p> <p class="text-large"> It may be possible to change the Bioconductor version of an existing installation; <a href="https://cran.r-project.org/web/packages/BiocManager/vignettes/BiocManager.html" >see the ‘Changing version’ section of the BiocManager vignette.</a > </p> <p class="text-large"> Details, including instructions to <a href="#install-bioconductor-packages">install additional packages</a> and to <a href="#update-bioconductor-packages">update,</a> <a href="#find-bioconductor-packages">find,</a> and <a href="#troubleshoot-bioconductor-packages">troubleshoot</a> are provided below. A <a href="https://contributions.bioconductor.org/use-devel.html" >devel</a > version of Bioconductor is available. There are good <a href="#why-biocmanagerinstall" >reasons for using <strong>BiocManager::install()</strong></a > for managing Bioconductor resources. </p> <pre class="code-install"> <code class="light nohighlight"> if (!require("BiocManager", quietly = TRUE)) install.packages("BiocManager") BiocManager::install(version = "3.20") </code> </pre> <img src="/images/icons/Step 2 quote.svg" alt="blank_" class="step-2" /> <img src="/images/icons/Step 3 quote.svg" alt="blank_" class="step-3" /> </div> </div> </div> </div> </section> <main> <div class="container"> <section class="content"> <div class="install-section"> <h3 id="install-bioconductor-packages">Install Bioconductor Packages</h3> <p>To install core packages, type the following in an R command window:</p> <pre> <code class="dark nohighlight"> if (!require("BiocManager", quietly = TRUE)) install.packages("BiocManager") BiocManager::install(version = "3.20") </code> </pre> <p>To install core packages, type the following in an R command window:</p> <pre> <code class="dark nohighlight"> BiocManager::install(c("GenomicFeatures", "AnnotationDbi")) </code> </pre> <p> The <strong>install()</strong> function (in the BiocManager package) has arguments that change its default behavior; type ?install for further help. </p> <p> For a more detailed explanation on using BiocManager and its advanced usage, such as version switching, please refer to the <a href="https://cran.r-project.org/web/packages/BiocManager/vignettes/BiocManager.html" >BiocManager vignette</a >. </p> <h3 id="find-bioconductor-packages">Find Bioconductor Packages</h3> <p>Visit the <a href="/packages/release/BiocViews.html#___Software" >software package list</a> to discover available packages.</p> <p> To search through available packages programmatically, use the following: </p> <pre> <code class="dark nohighlight"> BiocManager::available() </code> </pre> <p> For example, using a “^org” search pattern will show all of the available organism annotation packages. </p> <h3 id="update-bioconductor-packages"> Update Installed Bioconductor Packages </h3> <p> 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: </p> <pre> <code class="dark nohighlight"> BiocManager::install() </code> </pre> <p> Use the argument <strong>ask=FALSE</strong> to update old packages without being prompted. Read the help page for ?install for additional details. </p> <h5>Updgrading Installed Bioconductor Packages</h5> <p> Due to the development cycle, all versions of R will eventually support more than one version of Bioconductor. To use the latest version of Bioconductor for your version of R, enter: </p> <pre> <code class="dark nohighlight"> if (!require("BiocManager", quietly = TRUE)) install.packages("BiocManager") BiocManager::install() </code> </pre> <p> Remember that more recent versions of Bioconductor may be available if your version of R is out-of-date. BiocManager will notify you when your version of R is out-of-date. </p> <p> For more details on Bioconductor approaches to versioning, see the <a href="https://cran.r-project.org/web/packages/BiocManager/vignettes/BiocManager.html#managing-multiple-versions" >advanced section</a > in the vignette and version numbering in the <a href="https://contributions.bioconductor.org/versionnum.html" >developer reference</a > section. </p> <h5>Recompiling Installed Bioconductor Packages</h5> <p> 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: </p> <pre> <code class="dark nohighlight"> if (!require("BiocManager", quietly = TRUE)) install.packages("BiocManager") pkgs <- rownames(installed.packages()) BiocManager::install(pkgs, type = "source", checkBuilt = TRUE) </code> </pre> <p> 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. </p> <h3 id="troubleshoot-bioconductor-packages"> Troubleshoot Package Installations </h3> <p>Use the commands:</p> <pre> <code class="dark nohighlight"> BiocManager::valid() ## R version 3.5 or later </code> </pre> <p> 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 <strong>?valid</strong> lists arguments influencing the behavior of the function. </p> <h5>Troubleshoot BiocManager</h5> <p> One likely reason for BiocManager not working on your system could be that your version of R is too old for <stronger>BiocManager</stronger>. 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. </p> <h3 id="why-biocmanagerinstall">Why use BiocManager::install()?</h3> <p> <strong>BiocManager::install()</strong> 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 <strong>install.packages()</strong>. </p> <p> 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). </p> <p> A consequence of the mismatch between R and Bioconductor release schedules is that the Bioconductor version identified by <strong>install.packages()</strong> 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. </p> <p> A consequence of the distinct ‘devel’ branch is that <strong>install.packages()</strong> 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. </p> <p> 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. </p> <p> 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. </p> <pre> <code class="dark nohighlight"> > library(BiocManager) Bioconductor version 3.9 (BiocManager 1.30.4), ?BiocManager::install for help </code> </pre> <p> The <strong>install()</strong> 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. </p> <p> <strong>install()</strong> 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. </p> <pre> <code class="dark nohighlight"> > BiocManager::install() Bioconductor version 3.9 (BiocManager 1.30.4), R 3.6.0 Patched (2019-05-02 r76454) Update old packages: 'BBmisc', 'genefilter', 'GenomicAlignments', 'GenomicRanges', 'IRanges', 'MASS', 'reshape2', 'Rgraphviz', 'RJSONIO', 'rtracklayer' Update all/some/none? [a/s/n]: </code> </pre> <p> The BiocManager package provides facilities for switching to the ‘devel’ version of Bioconductor. </p> <pre> <code class="dark nohighlight"> > BiocManager::install(version = "devel") Upgrade 89 packages to Bioconductor version '3.10'? [y/n]: y Installing package(s) 'BiocVersion' trying URL 'https://bioconductor.org/packages/3.10/bioc/src/contrib/BiocVersion_3.10.0.tar.gz' Content type 'application/x-gzip' length 987 bytes ================================================== downloaded 987 bytes * installing *source* package 'BiocVersion' ... ** help *** installing help indices ** building package indices ** testing if installed package can be loaded * DONE (BiocVersion) ... Bioconductor version 3.10 (BiocManager 1.30.4), ?BiocManager::install for help </code> </pre> <p> (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). </p> <p> The BiocManager package also provides <strong>valid()</strong> 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). </p> <pre> <code class="dark nohighlight"> > BiocManager::valid() * sessionInfo() R version 3.6.0 Patched (2019-05-02 r76454) Platform: x86_64-pc-linux-gnu (64-bit) ... Bioconductor version '3.9' * 2 packages out-of-date * 0 package too new ... create a valid installation with BiocManager::install(c( "GenomicFeatures", "AnnotationDbi" ), update = TRUE, ask = FALSE) more details: BiocManager::valid()$too_new, BiocManager::valid()$out_of_date Warning message: 2 packages out-of-date; 0 packages too new </code> </pre> <p> For users who spend a lot of time in Bioconductor, the features outlined above become increasingly important and <strong>install()</strong> is much preferred to <strong>install.packages()</strong>. </p> <h3>Pre-configured Bioconductor</h3> <p> Bioconductor is also available as <a href="/help/docker/">Docker images</a> or available for use in the <a href="https://anvil.bioconductor.org/">AnVIL</a>. </p> <h3>Legacy and Older R Versions</h3> <p> It is always recommended to update to the most current version of R and Bioconductor. If this is not possible and <strong>R < 3.5.0</strong> , please use the scripts from <a href="https://github.com/Bioconductor/LegacyInstall">Bioconductor/LegacyInstall</a>. </p> </div> </section> </div> </main> <footer> <div class="footer-container"> <div class="link-container"> <div class="link-container-inner"> <nav> <a href="/about/index.html"><h3>About</h3></a> <a href="/about/annual-reports/">Annual Reports</a> <a href="/about/collaborations/">Collaborations</a> <a href="/about/core-team/">Core Team</a> <a href="/about/mirrors/">Mirrors</a> <a href="/dashboard/">Dashboard</a> <a href="/about/">Project Details</a> <a href="/about/code-of-conduct/">Code of Conduct</a> </nav> <nav> <a href="/developers/index.html"><h3>Developers</h3></a> <a href="https://contributions.bioconductor.org/develop-overview.html">Package Guidelines</a> <a href="https://contributions.bioconductor.org/submission-overview.html">Package Submission</a> <a href="/developers/release-schedule/">Release Schedule</a> <a href="/about/release-announcements/">Release Announcements</a> <a href="https://contributions.bioconductor.org/git-version-control.html">Source Control</a> <a href="https://code.bioconductor.org/">Browsable Code Base</a> <a href="/checkResults/">Build Reports</a> </nav> </div> <div class="link-container-inner"> <nav> <a href="/help/index.html"><h3>Learn</h3></a> <a href="https://training.bioconductor.org/">Education and Training</a> <a href="/help/bioconductor-books/">Bioconductor Books</a> <a href="/help/package-vignettes/">Package Vignettes</a> <a href="/packages/release/workflows/">Workflows</a> <a href="/help/publications/">Publications</a> <a href="/help/community/">Community Resources</a> <a href="/help/support/">Get Help</a> </nav> <nav> <a href="/install/index.html"><h3>Get started</h3></a> <a href="/install/index.html#install-R">Install R</a> <a href="/install/index.html#find-bioconductor-packages">Find Bioconductor Packages</a> <a href="/install/index.html#install-bioconductor-packages">Install Bioconductor Packages</a> <a href="/install/index.html#update-bioconductor-packages">Update Bioconductor Packages</a> <a href="/help/docker/">Docker Images</a> <a href="https://anvil.bioconductor.org/">Bioconductor in AnVIL</a> <a href="/packages/release/BiocViews.html#___Software">Bioconductor Packages</a> </nav> </div> </div> <div class="logo-contact-container"> <div class="copyright"> <p> Contact us: <a class="text-underline" href="https://support.bioconductor.org/">support.bioconductor.org</a><br/> Copyright © 2003 - 2025 Bioconductor </p> </div> <div class="socials-logo-container"> <div class="socials"> <a href="https://slack.bioconductor.org/" target="_blank"><img alt="Slack Logo" src="/images/icons/slack.png" /></a> <a href="https://www.youtube.com/user/bioconductor" target="_blank"><img alt="YouTube Logo" src="/images/icons/svgs/youtube.svg" /></a> <a href="https://www.linkedin.com/company/bioconductor/" target="_blank"><img alt="LinkedIn Logo" src="/images/icons/svgs/linkedin.svg" /></a> <a href="https://bsky.app/profile/bioconductor.bsky.social" target="_blank"><img alt="Bluesky Logo" src="/images/icons/svgs/bluesky.svg" /></a> <a href="https://genomic.social/@bioconductor" target="_blank"><img alt="Mastodon Logo" src="/images/icons/svgs/mastodon.svg" /></a> <a href="https://blog.bioconductor.org/" target="_blank"><img alt="Blog Logo" src="/images/icons/svgs/arrow-circle-right-white.svg" /></a> </div> <img class="footer-logo" src="/images/logo/svg/BC-Logo-White.svg" alt="BioConductor Logo in White" /> </div> </div> </div> </footer> </body> </html>