Software

R

Install R. You’ll need R version 3.5.0 or higher.1 Download and install R for Windows or Mac (download the latest R-3.x.x.pkg file for your appropriate version of Mac OS).

RStudio

Download and install RStudio Desktop version >= 1.1.463.

R and RStudio are separate downloads and installations. R is the underlying statistical computing environment, but using R alone is no fun. RStudio is a graphical integrated development environment that makes using R much easier. You need R installed before you install RStudio.

CRAN packages

Launch RStudio (RStudio, not R itself). Ensure that you have internet access, then copy and paste the following command into the Console panel (usually the lower-left panel, by default) and hit the Enter/Return key.

pkg <- c("BiocManager", "dplyr", "emojifont", 
      "ggplot2", "ggimage", "ggstance",
      "readr", "tibble", "tidytree"))
install.packages(pkg)

A few notes:

  • Commands are case-sensitive.
  • You must be connected to the internet.
  • Even if you’ve installed these packages in the past, do re-install the most recent version. Many of these packages are updated often, and we may use new features in the workshop that aren’t available in older versions.
  • If you’re using Windows you might see errors about not having permission to modify the existing libraries – disregard these. You can avoid this by running RStudio as an administrator (right click the RStudio icon, then click “Run as Administrator”).

Check that you’ve installed everything correctly by closing and reopening RStudio and entering the following commands at the console window:

library(BiocManager)
library(dplyr)
library(ggplot2)
library(readr)
library(tibble)
library(tidytree)

If you get a message that says something like: Error in library(somePackageName) : there is no package called 'somePackageName', then the required packages did not install correctly.

Bioconductor

The treeio and ggtree packages are released within the Bioconductor project These packages are installed differently than “regular” R packages from CRAN. Copy and paste these lines of code into your R console one at a time.

library(BiocManager)
install("Biostrings")
install("treeio")
install("ggtree")

A few notes:

  • We will be using the latest versions of Bioconductor from the 3.8 release. This requires R version 3.5.0 or higher. If you have R 3.5.0 installed, running the commands above will install Bioconductor 3.8. See http://bioconductor.org/news/bioc_3_8_release/.
  • If at any point in the Bioconductor package installations you get prompts in the console asking you to update any existing packages, type n at the prompt at hit enter.
  • If you see a note long the lines of “binary version available but the source version is later”, followed by a question, “Do you want to install from sources the package which needs compilation? y/n”, type n for no, and hit enter.

Check that you’ve installed everything correctly by closing and reopening RStudio and entering the following commands at the console window, one at a time:

library(treeio)
library(ggtree)

If you get a message that says something like: Error in library(somePackageName) : there is no package called 'somePackageName', then the required packages did not install correctly.

Get Data

Click the Data link on the navbar at the top. You can download all the data needed by downloading this zip file or by downloading individual data sets as needed at the Data page.



  1. R version 3.5.0 was released April 2018. If you have not updated your R installation since then, you need to upgrade to a more recent version, since several of the required packages depend on a version at least this recent. You can check your R version with the sessionInfo() command.