Installation

With pip

ngs_toolkit is available for Python 3 only. Is is tested in Python 3.6 and 3.7.

To install, simply do:

pip install ngs-toolkit

you might need to add a --user flag if not root or running in a virtual environment.

This will install all the Python dependencies needed too. See here a list of all Python dependencies used.

To install the latest development version:

pip install git+https://github.com/afrendeiro/toolkit.git#egg=ngs-toolkit

Using a conda environment

Get the latest Python 3 installation of miniconda from the conda website and follow the instructions for installation and activation of the environment.

Setup the bioconda channel:

conda config --add channels defaults
conda config --add channels bioconda
conda config --add channels conda-forge

Install non-Python dependencies:

conda install -y bedtools==2.27.1
conda install -y ucsc-twobittofa
conda install -y bioconductor-deseq2
conda install -y bioconductor-cqn

And then install the ngs-toolkit library with pip (available only through PyPi).

pip install ngs-toolkit

Non-Python requirements

ngs_toolkit makes use of some non-Python dependencies.

  • bedtools: version should be at least 2.27.1

The following are highly recommended only for some data or analysis types:

  • R and some bioconductor libraries (optional): - DESeq2 (optional): used for differential testing of genes/regulatory elements and variance stabilization transformation of data. - cqn (optional): used for GC-content aware normalization of NGS data.

  • Kent tools (optional): - the twoBitToFa binary from UCSC’s Kent bioinformatics toolkit is used to convert between the 2bit and FASTA formats.

For region-based enrichment analysis, you may also want to have the following software installed (entirely optional):

You can see how to install all requirements in an Ubuntu-based system in the provided Dockerfile.

Docker

A Docker image containing ngs_toolkit and its dependencies is also available: https://hub.docker.com/r/afrendeiro/ngs-toolkit

To pull the image and run a module for example in this way:

docker pull afrendeiro/ngs-toolkit
docker run ngs-toolkit python3 -m ngs_toolkit.recipes.ngs_analysis --help

You can also run an interactive session of ngs_toolkit based on the docker image on Gitpod.

The Dockerfile that produced the image is available in the github repository: https://github.com/afrendeiro/toolkit/blob/master/Dockerfile