2. Installation

CpGtools are written in Python. Python3 (v3.5.x) is required to run all programs in CpGtools. Some programs also need R and R libraries to generate graphs and fit linear and beta-binomial models.

2.1. Prerequisites

Note: You need to install these tools if they are not available from your computer.

2.2. Python Dependencies

Note: You do NOT need to install these packages manually, as they will be automatically installed if you use pip3 to install CpGtools.

2.3. Install CpGtools using pip3 from PyPI or github

$ pip3 install cpgtools
or
$ pip3 install git+https://github.com/liguowang/cpgtools.git

2.4. Install CpGtools from source code

First, download the latest CpGtools, and then execute the following commands

$ tar zxf cpgtools-VERSION.tar.gz
$ cd cpgtools-VERSION
$ python3 setup.py install  #install CpGtools to the default location
or
$ python3 setup.py install --root-/home/my_pylib/  #install CpGtools to user specified location

After the installation is completed, you probably need to setup up the environment variables (Below is only an example. Change according to your system configuration)

$ export PYTHONPATH-/home/my_pylib/python3.7/site-packages:$PYTHONPATH

2.5. Upgrade CpGtools

$ pip3 install cpgtools --upgrade