1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178
|
############
Installation
############
====================
Basic Installation
====================
.. code-block:: bash
git clone https://github.com/arq5x/poretools
cd poretools
Install as root:
.. code-block:: bash
python setup.py install
Install as a plain old user who has root access:
.. code-block:: bash
sudo python setup.py install
Install as a plain old who lacks ``sudo`` privileges:
.. code-block:: bash
# 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:
<https://raw.githubusercontent.com/arq5x/poretools/master/dist/poretools.reg>
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:
<https://github.com/arq5x/poretools/blob/master/dist/poretools-0.5.1.win-amd64.exe?raw=true>
=================================
Installing on OS X
=================================
First, you should install a proper package manager for OS X. In our experience, `HomeBrew <http://brew.sh/>`_ works extremely well.
To install HomeBrew, you run the following command (lifted from the HomeBrew site):
.. code-block:: bash
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
Using HomeBrew, install HDF5 from the HomeBrew Science "tap";
.. code-block:: bash
brew tap homebrew/science
brew install hdf5
You will also need Cython and numpy packages (if they are not already installed):
.. code-block:: bash
pip install cython
pip install numpy
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>`_.
At this point, you can install poretools.
.. code-block:: bash
git clone https://github.com/arq5x/poretools
cd poretools
Install as an administrator of your machine:
.. code-block:: bash
sudo python setup.py install
Install as a plain old who lacks ``sudo`` priveleges:
.. code-block:: bash
# 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
.. code-block:: bash
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.
.. code-block:: bash
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:
.. code-block:: bash
deb http://www.stats.bris.ac.uk/R/bin/linux/ubuntu precise/
Or, for Ubuntu 14.04:
.. code-block:: bash
deb http://www.stats.bris.ac.uk/R/bin/linux/ubuntu trusty/
Then install poretools, finally:
.. code-block:: bash
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):
.. code-block:: bash
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 <https://registry.hub.docker.com/u/stephenturner/poretools/>`_:
.. code-block:: bash
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.
|