DISCOVER co-occurrence and mutual exclusivity analysis

This page provides the software implementing the DISCOVER method described in the paper A novel independence test for somatic alterations in cancer shows that biology drives mutual exclusivity but chance explains co-occurrence.



DISCOVER is available for both Python and R.


The easiest way to install the DISCOVER Python package is by using Miniconda or Anaconda. We provide precompiled DISCOVER packages for 64-bit Linux, Windows, and Mac OS X. The following steps assume that Miniconda or Anaconda has been installed.

To create a new conda environment containing DISCOVER and its dependencies, execute the following command in a terminal (Linux/Mac OS X) or command prompt (Windows).

conda create -n discover -c discover

On Linux or Mac OS X, this environment can be activated using:

source activate discover

On Windows, the correct command is:

activate discover

Note that this environment contains the bare minimum to use DISCOVER. It does not, for example, include IPython. Trying to run IPython anyway might start a version installed in a different environment, and hence, importing DISCOVER will not succeed. Consult the conda documentation to find out how to install additional packages (such as IPython). Alternatively, DISCOVER can be installed in an existing environment as follows.

conda install -c discover

Check the documentation for instructions on how to use this package.


We provide precompiled R packages for 64-bit Windows (R 3.1, 3.2, 3.3), and Mac OS X (R 3.2, 3.3), as well as a source package for installation on Linux. To install the DISCOVER package, execute the following in an R session.

options(repos=c(getOption("repos"), ""))

Check the documentation for instructions on how to use this package.


Jupyter notebooks

Jupyter notebooks contain the code required to reproduce all results and figures from the manuscript. These notebooks can be viewed in two different ways.

  1. The HTML versions are the easiest way to inspect the analyses and their results. These versions are static exports of the notebooks, and do not allow re-executing the code.

  2. To fully reproduce all results from scratch, Jupyter notebook files can be found in the source code download. To work with these files, Jupyter, IPython, and several Python packages should be installed. If you have an installed version of Miniconda (see above), the following command creates an environment that contains all required packages to execute the notebooks.

    conda create -n discover-notebooks -c \
        corclust==0.1 \
        discover==0.9 \
        matplotlib==1.5.1 \
        networkx==1.11 \
        numpy==1.10.4 \
        pandas==0.17.1 \
        pytables==3.2.2 \
        scipy==0.17.0 \
        statsmodels==0.6.1 \
        notebook \

    Only for the notebook named Group test a few more packages need to be installed using the following command.

    conda install -n discover-notebooks -c -c r -c msys2 \
        switching==0.1 \
        ccomet-with-timeout==1.0.2 \
        rpy2 \

    Next, activate the created environment and start the Jupyter notebook using the following two commands. Make sure <notebook-dir> is replaced by the location of the .ipynb files after unzipping the downloaded file.

    source activate discover-notebooks
    jupyter notebook --notebook-dir=<notebook-dir>

    On Windows, the first command should be replaced by:

    activate discover-notebooks

Source code

This file contains:


For questions, suggestions, or bug reports, please send an e-mail to