| 1 |
############ |
| 2 |
Installation |
| 3 |
############ |
| 4 |
|
| 5 |
|
| 6 |
==================== |
| 7 |
Basic Installation |
| 8 |
==================== |
| 9 |
.. code-block:: bash |
| 10 |
|
| 11 |
git clone https://github.com/arq5x/poretools |
| 12 |
cd poretools |
| 13 |
|
| 14 |
Install as root: |
| 15 |
|
| 16 |
.. code-block:: bash |
| 17 |
|
| 18 |
python setup.py install |
| 19 |
|
| 20 |
Install as a plain old user who has root access: |
| 21 |
|
| 22 |
.. code-block:: bash |
| 23 |
|
| 24 |
sudo python setup.py install |
| 25 |
|
| 26 |
Install as a plain old who lacks ``sudo`` privileges: |
| 27 |
|
| 28 |
.. code-block:: bash |
| 29 |
|
| 30 |
# details: https://docs.python.org/2/install/index.html#alternate-installation-the-user-scheme |
| 31 |
python setup.py install --user |
| 32 |
|
| 33 |
# now update your PATH such that it includes the directory to which poretools was just copied. |
| 34 |
# look for a line in the installation log like: Installing poretools script to /home/arq5x/.local/bin |
| 35 |
# in this case, I would either add that path to the PATH environment variable for the current session: |
| 36 |
export PATH=$PATH:/home/arq5x/.local/bin |
| 37 |
|
| 38 |
# or, better yet add it to your .bashrc file. |
| 39 |
# at this point you should be able to run the poretools executable from anywhere on your system. |
| 40 |
poretools --help |
| 41 |
|
| 42 |
================================= |
| 43 |
Installing on Windows with MinKNOW installed |
| 44 |
================================= |
| 45 |
|
| 46 |
MinKNOW installs the Anaconda distribution of Python, which means that h5py, matplotlib, and pandas are already installed. |
| 47 |
|
| 48 |
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: |
| 49 |
|
| 50 |
<https://raw.githubusercontent.com/arq5x/poretools/master/dist/poretools.reg> |
| 51 |
|
| 52 |
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. |
| 53 |
|
| 54 |
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``. |
| 55 |
|
| 56 |
conda install seaborn |
| 57 |
|
| 58 |
If conda cannot install seaborn, you could consider installing ``pip`` and running: |
| 59 |
|
| 60 |
pip install seaborn |
| 61 |
|
| 62 |
Then, to install poretools, simply download and run the Windows installer: |
| 63 |
|
| 64 |
<https://github.com/arq5x/poretools/blob/master/dist/poretools-0.5.1.win-amd64.exe?raw=true> |
| 65 |
|
| 66 |
|
| 67 |
================================= |
| 68 |
Installing on OS X |
| 69 |
================================= |
| 70 |
|
| 71 |
First, you should install a proper package manager for OS X. In our experience, `HomeBrew <http://brew.sh/>`_ works extremely well. |
| 72 |
|
| 73 |
To install HomeBrew, you run the following command (lifted from the HomeBrew site): |
| 74 |
|
| 75 |
.. code-block:: bash |
| 76 |
|
| 77 |
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" |
| 78 |
|
| 79 |
Using HomeBrew, install HDF5 from the HomeBrew Science "tap"; |
| 80 |
|
| 81 |
.. code-block:: bash |
| 82 |
|
| 83 |
brew tap homebrew/science |
| 84 |
brew install hdf5 |
| 85 |
|
| 86 |
You will also need Cython and numpy packages (if they are not already installed): |
| 87 |
|
| 88 |
.. code-block:: bash |
| 89 |
|
| 90 |
pip install cython |
| 91 |
pip install numpy |
| 92 |
|
| 93 |
Now, you will need to install the R statistical analysis software (you may already have this...). The `CRAN <http://cran.r-project.org/bin/macosx/>`_ website houses automatic installation packages for different versions of OS X. Here are links to such packages for `Snow Leopard and higher <http://cran.r-project.org/bin/macosx/R-3.1.1-snowleopard.pkg>`_ as well as `Mavericks <http://cran.r-project.org/bin/macosx/R-3.1.1-mavericks.pkg>`_. |
| 94 |
|
| 95 |
At this point, you can install poretools. |
| 96 |
|
| 97 |
.. code-block:: bash |
| 98 |
|
| 99 |
git clone https://github.com/arq5x/poretools |
| 100 |
cd poretools |
| 101 |
|
| 102 |
Install as an administrator of your machine: |
| 103 |
|
| 104 |
.. code-block:: bash |
| 105 |
|
| 106 |
sudo python setup.py install |
| 107 |
|
| 108 |
Install as a plain old who lacks ``sudo`` priveleges: |
| 109 |
|
| 110 |
.. code-block:: bash |
| 111 |
|
| 112 |
# details: https://docs.python.org/2/install/index.html#alternate-installation-the-user-scheme |
| 113 |
python setup.py install --user |
| 114 |
|
| 115 |
================================= |
| 116 |
Installing dependencies on Ubuntu |
| 117 |
================================= |
| 118 |
|
| 119 |
Package dependencies |
| 120 |
|
| 121 |
.. code-block:: bash |
| 122 |
|
| 123 |
sudo apt-get install git python-setuptools python-dev cython libhdf5-serial-dev |
| 124 |
|
| 125 |
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. |
| 126 |
|
| 127 |
.. code-block:: bash |
| 128 |
|
| 129 |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9 |
| 130 |
|
| 131 |
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: |
| 132 |
|
| 133 |
.. code-block:: bash |
| 134 |
|
| 135 |
deb http://www.stats.bris.ac.uk/R/bin/linux/ubuntu precise/ |
| 136 |
|
| 137 |
Or, for Ubuntu 14.04: |
| 138 |
|
| 139 |
.. code-block:: bash |
| 140 |
|
| 141 |
deb http://www.stats.bris.ac.uk/R/bin/linux/ubuntu trusty/ |
| 142 |
|
| 143 |
Then install poretools, finally: |
| 144 |
|
| 145 |
.. code-block:: bash |
| 146 |
|
| 147 |
git clone https://github.com/arq5x/poretools |
| 148 |
cd poretools |
| 149 |
sudo python setup.py install |
| 150 |
poretools |
| 151 |
|
| 152 |
============ |
| 153 |
In the cloud |
| 154 |
============ |
| 155 |
|
| 156 |
Amazon Web Services machine image ID: ami-4c0ec424 |
| 157 |
|
| 158 |
========== |
| 159 |
Via docker |
| 160 |
========== |
| 161 |
|
| 162 |
Build the docker container yourself (preferred): |
| 163 |
|
| 164 |
.. code-block:: bash |
| 165 |
|
| 166 |
git clone https://github.com/arq5x/poretools |
| 167 |
cd poretools |
| 168 |
docker build -t poretools . |
| 169 |
docker run poretools --help |
| 170 |
|
| 171 |
Or use the pre-built `image from Docker Hub <https://registry.hub.docker.com/u/stephenturner/poretools/>`_: |
| 172 |
|
| 173 |
.. code-block:: bash |
| 174 |
|
| 175 |
docker pull stephenturner/poretools |
| 176 |
docker run stephenturner/poretools --help |
| 177 |
|
| 178 |
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. |