# Install Bioconductor Packages

For full details on getting started with Bioconductor, see the [Bioconductor Website](https://bioconductor.org). 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:

```{r eval=FALSE}
install.packages('BiocManager')
BiocManager::install()
```

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

```{r eval=FALSE}
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](https://www.bioconductor.org/packages/release/BiocViews.html#___Software) 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

```{r eval=FALSE}
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:

```{r eval=FALSE}
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

```{r}
sessionInfo()
```
