Installation

Basic Installation

git clone https://github.com/arq5x/poretools
cd poretools

Install as root:

python setup.py install

Install as a plain old user who has root access:

sudo python setup.py install

Install as a plain old who lacks sudo privileges:

# details: https://docs.python.org/2/install/index.html#alternate-installation-the-user-scheme
python setup.py install --user

# now update your PATH such that it includes the directory to which poretools was just copied.
# look for a line in the installation log like: Installing poretools script to /home/arq5x/.local/bin
# in this case, I would either add that path to the PATH environment variable for the current session:
export PATH=$PATH:/home/arq5x/.local/bin

# or, better yet add it to your .bashrc file.
# at this point you should be able to run the poretools executable from anywhere on your system.
poretools --help

Installing on Windows with MinKNOW installed

MinKNOW installs the Anaconda distribution of Python, which means that h5py, matplotlib, and pandas are already installed.

However, currently MinKNOW does not update the Windows registry to specify that Anaconda is the default version of Python, which makes installing packages tricky. To address this, some changes need to be made to the registry. This can be fixed by downloading the following file:

Ensure it is named ‘poretools.reg’ and then run it (by double-clicking). Windows will prompt you about making changes to the registry, which you should agree to.

Now, you need to install seaborn, which is the plotting package that poretools uses as a replacement for R and rpy2 as of version 0.5.1.

conda install seaborn

If conda cannot install seaborn, you could consider installing pip and running:

pip install seaborn

Then, to install poretools, simply download and run the Windows installer:

Installing on OS X

First, you should install a proper package manager for OS X. In our experience, HomeBrew works extremely well.

To install HomeBrew, you run the following command (lifted from the HomeBrew site):

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

Using HomeBrew, install HDF5 from the HomeBrew Science “tap”;

brew tap homebrew/science
brew install hdf5

You will also need Cython and numpy packages (if they are not already installed):

pip install cython
pip install numpy

Now, you will need to install the R statistical analysis software (you may already have this...). The CRAN website houses automatic installation packages for different versions of OS X. Here are links to such packages for Snow Leopard and higher as well as Mavericks.

At this point, you can install poretools.

git clone https://github.com/arq5x/poretools
cd poretools

Install as an administrator of your machine:

sudo python setup.py install

Install as a plain old who lacks sudo priveleges:

# details: https://docs.python.org/2/install/index.html#alternate-installation-the-user-scheme
python setup.py install --user

Installing dependencies on Ubuntu

Package dependencies

sudo apt-get install git python-setuptools python-dev cython libhdf5-serial-dev

Then install R 3.0, this requires a bit of hacking. You need to replace ‘precise’ with the appropriate version if you are on a different Ubuntu version, see <http://cran.r-project.org/bin/linux/ubuntu/README> for more details.

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9

Open in a text editor (as sudo) the file /etc/apt/sources.list and add the following line to the bottom, for Ubuntu 12.04:

deb http://www.stats.bris.ac.uk/R/bin/linux/ubuntu precise/

Or, for Ubuntu 14.04:

deb http://www.stats.bris.ac.uk/R/bin/linux/ubuntu trusty/

Then install poretools, finally:

git clone https://github.com/arq5x/poretools
cd poretools
sudo python setup.py install
poretools

In the cloud

Amazon Web Services machine image ID: ami-4c0ec424

Via docker

Build the docker container yourself (preferred):

git clone https://github.com/arq5x/poretools
cd poretools
docker build -t poretools .
docker run poretools --help

Or use the pre-built image from Docker Hub:

docker pull stephenturner/poretools
docker run stephenturner/poretools --help

To run the poretools container on data residing on the host machine, run docker run -h and look at the help for the -v option.