Installation¶
lib5c
can be installed directly via pip
$ pip install lib5c
If you are having trouble with this step, make sure pip
is up to date by
running
$ pip install --upgrade pip
Prerequisites¶
lib5c
currently only supports Python 2.7.
pip
will install all required prerequisites automatically.
The complete list of dependencies is:
python-daemon>=2.1.1
numpy>=1.10.4
scipy>=0.16.1
matplotlib>=1.4.3
pandas>=0.18.0
seaborn>=0.8.0
statsmodels>=0.6.1
dill>=0.2.5
decorator>=4.0.10
luigi>=2.1.1
scikit-learn>=0.17.1
interlap>=0.2.3
powerlaw>=1.4.3
Virtualenv installation walkthrough¶
It is highly recommended to install lib5c
inside a fresh virtual environment
to avoid package version conflicts.
If you don’t have virtualenv
you may install it via
$ pip install virtualenv
The step-by-step procedure for installing lib5c
inside a fresh virtual
environment is then:
$ deactivate # deactivate existing virtualenv
$ virtualenv -p $(which python2) venv # create new python2 virtualenv
$ source venv/bin/activate # activate the new virtualenv
(venv)$ pip install -U pip # make sure pip is up to date
(venv)$ pip install numpy # install numpy first in case anything else depends on it
(venv)$ pip install lib5c # install lib5c
(venv)$ lib5c -v # check version number
Docker image¶
A Docker image for lib5c
is also provided and can be used as shown here:
$ docker pull creminslab/lib5c:latest
$ docker run -it creminslab/lib5c:latest
root@<container_id>:/# lib5c -v
It is recommended to bind a directory containing input files. For example:
$ docker run -it -v c:/data:/data creminslab/lib5c:latest
root@<container_id>:/# cd /data
root@<container_id>:/data# lib5c pipeline
Installing from a tarball¶
Prior to paper acceptance, lib5c
cannot be made available on the Python
package repository and must be downloaded as a tarball instead.
Package tarball (into clean virtual environment)¶
To install lib5c
from a downloaded tarball of the package, saving it as
lib5c.tar.gz
:
$ deactivate # deactivate existing virtualenv
$ virtualenv -p $(which python2) venv # create new python2 virtualenv
$ source venv/bin/activate # activate the new virtualenv
(venv)$ pip install -U pip # make sure pip is up to date
(venv)$ tar -xzf lib5c.tar.gz # untar the tarball
(venv)$ pip install numpy # install numpy first in case anything else depends on it
(venv)$ pip install ./lib5c # install lib5c
(venv)$ lib5c -v # check version number
Docker image tarball¶
To import the lib5c
Docker image from a downloaded tarball (saved as
creminslab_lib5c_latest.tar
):
$ docker load -i creminslab_lib5c_latest.tar
$ docker run -it creminslab/lib5c:latest
root@<container_id>:/# lib5c -v
Optional dependencies¶
You can install lib5c
with all optional dependencies included by running
$ pip install lib5c[complete]
The individual optional dependencies can also be installed one-at-a-time; they are described in detail in the following sub-sections.
bsub
integration¶
If you use the LSF job scheduling system (also known as bsub), you should also
install the bsub
package to enable lib5c
to leverage the job scheduler.
$ pip install bsub>=0.3.5
ICE matrix balancing¶
If you want to use the ICE matrix balancing algorithm in your analyses, you
should also install the iced
package to enable it in lib5c
.
$ pip install iced>=0.4.0
This package may be difficult or impossible to install on Windows systems, in which case you can use the Knight-Ruiz matrix balancing algorithm as an alternative.
BigWig file support¶
In order to support interaction with BigWig formatted files, you should also
install the pyBigWig
package to enable it in lib5c
.
$ pip install pyBigWig>=0.3.4
This package may be difficult or impossible to install on Windows systems.
Special notes¶
lib5c
plots output using the matplotlib
Python package. Instead of
forcing a particular backend to be used, lib5c
will respect the backend set
in your matplotlibrc
. As an example, the following matplotlibrc
sets the
backend to ‘agg’:
$ cat ~/.config/matplotlib/matplotlibrc
backend: agg
On Windows systems the matplotlibrc
is usually located at
C:\Users\<username>\.matplotlib\matplotlibrc