Table Of Contents

Previous topic

Developer Documentation

Next topic


This Page


Quick installation instructions

The following command sequence will generate a virtual environment ratatosk and install all necessary modules and requirements.

mkvirtualenv --no-site-packages -p python2.7 ratatosk
git clone $INSTALL_PREFIX/luigi
cd $INSTALL_PREFIX/luigi && python develop
pip install numpy
git clone $INSTALL_PREFIX/ratatosk
cd $INSTALL_PREFIX/ratatosk && python develop
cd $INSTALL_PREFIX/ratatosk/test && nosetests -v -s


It is recommended that you first create a virtual environment in which to install the packages. Install virtualenvwrapper and use mkvirtualenv to create a virtual environment. Note that you need to pass the --no-site-packages -p python2.7 options. Finally, add the following to your .bashrc:

source path/to/bin/
export WORKON_HOME=~/.virtualenvs

(if you’ve used virtualenv-burrito <>_ to install virtualenvwrapper, is located in ~/.venvburrito).


You can download and install ratatosk from the Python Package Index with the command

pip install ratatosk

Alternatively, to install the development version of ratatosk, do

git clone
python develop

Known installation issues


The current luigi Python Package Index is out of date. You may therefore need to manually install the development version from github.


Installing Pygraphviz with pip install pygraphviz often fails because the installer cannot find the graphviz library. One solution lies in modifying the that comes with the pygrahviz package. After a failed pip install in virtual environment virtualenv (or whatever you called it), you will typically find the failed build in ~/.virtualenvs/virtualenv/build/pygraphviz. In that directory, modify the following section in

# If the setup script couldn't find your graphviz installation you can
# specify it here by uncommenting these lines or providing your own:
# You must set both 'library_path' and 'include_path'

# Linux, generic UNIX


To begin with, you may need to install Tornado and Pygraphviz (see Luigi for further information).

The tests depend on the following software to run:

  1. bwa
  2. samtools
  3. GATK - set an environment variable GATK_HOME to point to your installation path
  4. picard - set an environment variable PICARD_HOME to point to your installation path
  5. fastqc

Running the tests

Make sure that an instance of the daemon ratatoskd is running in the background. It may be convenient to run it in a screen session.

ratatoskd &

Cd to the test directory (test) and run

nosetests -v -s

To run a given task (e.g. TestCommand.test_bwaaln), do

nosetests -v -s

Task visualization and tabulation

By default, the tests use a local scheduler, implemented in luigi. For production purposes, there is also a central planner. Among other things, it allows for visualization of the task flow by using Tornado and Pygraphviz. Results are displayed in http://localhost:8081, results “collected” at http://localhost:8082/api/graph.

In addition, I have extended the luigi daemon and server code to generate a table representation of the tasks (in http://localhost:8083). The aim here would be to define a grouping function that groups task lists according to a given feature (e.g. sample, project).

In order to view tasks, run

ratatoskd &

in the background and run the tests:

nosetests -v -s