2. Installation

CpGtools is written in Python and requires Python 3.5 or later. Some tools within CpGtools also require R and specific R libraries to generate plots and fit linear or beta-binomial models.

2.1. Prerequisites

If these dependencies are not already installed on your system, please install them first:

2.2. Dependencies

You do not need to install these manually — pip3 will automatically install them when you install CpGtools.

2.3. Install CpGtools using pip3

You can install CpGtools directly from PyPI or GitHub:

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

2.4. Install CpGtools from Source

To install CpGtools from source:

  1. Download the latest release from CpGtools on SourceForge.

  2. Extract and install:

$ tar zxf cpgtools-VERSION.tar.gz
$ cd cpgtools-VERSION
$ python3 setup.py install          # install to the default location
# or
$ python3 setup.py install --root=/home/my_pylib/  # install to a custom location

After installation, you may need to set up your environment variables. Below is an example (adjust the path to match your setup):

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

2.5. Upgrade CpGtools

To upgrade to the latest version:

$ pip3 install --upgrade cpgtools