Installation

The following sections describe how to install the cgatcore framework.

Conda Installation

The our preffered method of installation is using conda. If you dont have conda installed then please install conda using miniconda or anaconda.

cgatcore is currently installed using the bioconda channel and the recipe can be found on github. To install cgatcore:

conda install -c conda-forge -c bioconda cgatcore

Pip installation

We recommend installation through conda because it manages the dependancies. However, cgatcore is generally lightweight and can be installed easily using pip package manager. However, you may also have to install other dependancies manually:

pip install cgatcore

Automated installation

The following sections describe how to install the cgatcore framework.

The preferred method to install the cgatcore is using conda but we have also created a bash installation script, which uses conda under the hood.

Here are the steps:

# download installation script:
curl -O https://raw.githubusercontent.com/cgat-developers/cgat-core/master/install.sh

# see help:
bash install.sh

# install the development version (recommended, no production version yet):
bash install.sh --devel [--location </full/path/to/folder/without/trailing/slash>]

# the code is downloaded in zip format by default. If you want to get a git clone, use:
--git # for an HTTPS clone
--git-ssh # for a SSH clone (you need to be a cgat-developer contributor on GitHub to do this)

# enable the conda environment as requested by the installation script
# NB: you probably want to automate this by adding the instructions below to your .bashrc
source </full/path/to/folder/without/trailing/slash>/conda-install/etc/profile.d/conda.sh
conda activate base
conda activate cgat-c

The installation script will put everything under the specified location. The aim of the script is to provide a portable installation that does not interfere with the existing software. As a result, you will have a conda environment working with the cgat-core which can be enabled on demand according to your needs.

Manual installation

To obtain the latest code, check it out from the public git repository and activate it:

git clone https://github.com/cgat-developers/cgat-core.git
cd cgat-core
python setup.py develop

Once checked-out, you can get the latest changes via pulling:

git pull

Installing additonal software

When building your own workflows we recomend using conda to install software into your environment where possible.

This can easily be performed by:

conda search <package>
conda install <package>

Access libdrmaa shared library

You may also need access to the libdrmaa.so.1.0 C library, which can often be installed as part of the libdrmaa-dev package on most Unixes. Once you have installed that, you may need to tell DRMAA Python where it is installed by setting the DRMAA_LIBRARY_PATH environment variable, if it is not installed in a location that Python usually looks for libraries.

In order to set this correctly every time please add the following line to your bashrc, but set the library path to the location of the libdrmaa.so.1.0:

export DRMAA_LIBRARY_PATH=/usr/lib/libdrmaa.so.1.0