Mac Installation Instructions - mdcao/japsa GitHub Wiki

Attempting to install japsa on Mac:

First of all, you need to have HDFView installed. On a Mac, download from this link. Once downloaded, open the .dmg file. It will open a finder window and, amongst other files/folders, you should see Applications folder and an HDFView.app (may not have the .app extension). To get the location of the library that you need for the install, right-click on the HDFView.app and select “Show Package Contents”. From here click Contents > Resources > lib. This is the directory you need to enter on installation. (e.g /Volumes/HDFView-2.10.1-Darwin/HDFView.app/Contents/Resources/lib)

Make sure you have bwa installed on your computer. If not, the easiest way (in my opinion) to do this is to first install homebrew on your system and then once that is installed, get it to handle installation of bwa for you like so:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install bwa

If you don't want to install homebrew feel free to download and install bwa using the instructions here.

You should have the latest version of R installed (go here if you don't). Open an R session and enter the following command to install the packages rJava and MultinomialCI:

install.packages("rJava")
install.packages("MultinomialCI")

After you have done this, run the following line:

.Library

The line returned from this is the directory that your R packages get installed into. Take this path and append the following to it

/rJava/jri

You should now have something that looks like

/Library/Frameworks/R.framework/Resources/library/rJava/jri

This is the path to your JRI library. After this, you also need to copy the path to your installation of R. This can be found by running the following command in the R terminal:

R.home()

In order for the species-typing program within japsa to work you need to set a global variable for where R is installed on your system. Add the following to your bash profile.

export R_HOME=/path/to/R

Open a terminal window and navigate to the place where you want japsa installed and run the following:

git clone https://github.com/mdcao/japsa
cd japsa
make -f makefile.dev install
  1. The first prompt from the installation will be asking you where you want japsa to be installed. If you have a specific place then enter it here, otherwise hit enter

  2. Next will be the amount of memory you want allocated to the Java Virtual Machine. Again, if you have specific requirements then enter them, otherwise hit enter.

  3. The third prompt will ask if you want to enforce the JVM to run on server mode. Type y, otherwise n if you have other requirements.

  4. The next request will be for the path to your HDF library. Enter this in. If you don’t know what it is, go back to the beginning of the instructions to find out how to get it.

  5. Last will be the directory to your JRI library. Once again you should have this, if not go back to the earlier part of the instructions.

After all of this has gone through (and you haven’t got any errors) you are best to add the directory you installed japsa to into your PATH in order to be able to run it from the command line without have to explicitely type out the path to it each time. At the end of the installation text there should be a line that says “For your convenience, please add the following directory to your PATH: …”. Copy this path and add the following to your bash profile:

export PATH=$PATH:/the/path/you/copied

If you made it to here, well done! Close down your terminal and reopen, or run:

source ~/.bash_profile