Installing Requisite Software on your Mac

If you want to try doing the labs directly on your Mac instead of in Virtual Box here is how you can.

web downloads

Install the following packages by clicking on the link and following the instructions on the web page:

  • Xcode, allowing compilation of source packages on your Mac.
  • The atom editor
  • The R statistical programming language
  • The R IDE Rstudio
  • The sequence alignment viewer jalview
  • The network viewer cytoscape

Atom packages

Open up at atom, click on File > Preferences, and then install the following atom packages. Not all of these are needed for the BIS180L but they are good to have

  • Sublime-Style_Column-Selection
  • autocomplete-python
  • git-control
  • language-r
  • language-markdown
  • markdown-pdf
  • markdown-toc
  • markdown-preview
  • python-tools
  • r-exec


Install Homebrew, a package manager for OS X that it much easier to install Linux/Unix packages. There are some reports that homebrew has issues on El Capitan, but that may have been resolved. Let me know if you get data one way or the other.

From a terminal window:

upgrade homebrew

brew update
brew upgrade

install the following packages through homebrew

brew tap homebrew/science # additional packages
brew install htop
brew install git
brew install igv
brew install clustal-w
brew install kalign
brew install t-coffee
brew install muscle
brew install mafft
brew install tophat
brew install bwa
brew install cufflinks
brew install samtools
brew install bedtools
brew install blast
brew install emboss

R packages

Open R and then

install.packages(c("evaluate","formatR","highr","markdown", "yaml","htmltools","caTools","bitops","knitr","rmarkdown"))
devtools::install_github(repo = "cran/PSMix")

Still within R, install bioconductor


perl modules

For auto_barcode to work, the following must be installed (From the Unix command line):

sudo cpan install Statistics::Descriptive
sudo cpan install Statistics::R
sudo cpan install Text::Levenshtein::XS
sudo cpan install Text::Table


Still need to deal with trimmomatic and auto_barcode, but the instructions in the labs should more or less work.

How to save a screenshot in Linux

The GWAS lab asks you to include a screenshot. Here are instructions on how to do that on your virtual Linux machine.

On a Windows PC host

  1. Get the screen in the state that you want to capture.
  2. Press the “PrtScn” key.
  3. The screenshot is now saved in your home directory /home/bis180l_local
  4. If you want to edit (e.g. crop) or view the file, open the “Image Viewer” application by clicking on start button (lower left) > Accessories > Image Viewer.

On a Mac host

I am not sure how to get the virtual machine to take a screenshot when you are using a mac host. You can get virtualbox to take a screenshot by pressing the lefthand cmd-key and E (cmd-E), save that file to your mac, and then email or gdrive it to yourself on the virtual box.

Tired of slow knits?

Knitting can be very slow if you are plotting complex data sets or doing long calculations. Wouldn’t it be nice if there were a way for R not to have to recalculate or replot every time?

There is!

We can tell R to not re-knit code or plots that are unchanged from the last time that you knitted.

Place the following near the top of the your .Rmd file (but below the second “—”) Place it inside of a code chunk

knitr::opts_chunk$set(cache=TRUE, autodep=TRUE)

Overall the start of your file should look something like this:

git and MEGA

You will remember in class today that some students had trouble with their git repositories.

The reason is that git stores all of the information in a hidden directory .git at the top level of the repository.

And MEGA, by default, does not sync hidden files or directories.

So if your repository was just downloaded by MEGA then it won’t have the git information.

To prevent this from happening in the future:

Tell MEGA to sync the hidden files. Click on the MEGA symbol at the bottom right side of your (virtual) desktop. Click on the gear icon (upper right) and then on settings. Choose the advanced tab (1 in figure below) and then select the “.*” line (2) and click on delete (3).

More on the New Flash Drive Protocol


In some cases there may be a NEW .vdi file created in the snapshots folder

You should copy _ALL .vdi files in the Snapshots folder that are newer than April 1.


ALSO If you are moving more than one .vdi file you need to copy the BIS180L2016.vbox file which is in Computer\Local Disk (C:)\BIS180L