Skip to content
mjsull edited this page Jul 11, 2015 · 4 revisions

DiscoPlot is a commandline application. If you're not familiar with the commandline we recommend you ask local IT support to help you install it.

You will need to install/have installed:
  • python >= 2.7 (Python 3 is not supported)
To automatically generate BLAST aligments (For long read DiscoPlots) using DiscoPlot you will need to install/have installed:
  • ncbiblast+ >= 2.2.27

You can check these are installed by:

$ python --version
$ blastn -version

Installation of python or blastn (without a package manager) is beyond the scope of this document.

If you have both python and blastn you need to (if not already present) install pip.

You can check if pip exists with:

$ which pip

If you get a "not found", please read the pip installation instructions.

If you already have pip we do suggest you upgrade it. We are using version 1.5.6 at the time of writing this document.

You can upgrade pip like this:

$ pip install --upgrade pip

The following python libraries should be installed (automatically) if you follow the installation instructions detailed below.

We use the following python libraries:
  • numpy >= 1.8.1
  • matplotlib >= 1.3.1
  • pysam >= 0.8.1

Pysam is only required for generating DiscoPlots with BAM files. SAM compatability has been included to allow windows users to generate DiscoPlots. PySam will not install on Windows, don't bother trying (or if you've succeeded please let me know how).

Linux (Ubuntu)

Discoplot uses 3rd party packages that are extremely important for scientific computing but may be difficult to install. While pip install * *--user DiscoPlot may work we recommend you install these 3rd party packages using apt-get.

Run

$ sudo apt-get install python-numpy python-matplotlib

Now pip install DiscoPlot

$ pip install --user DiscoPlot

We use the --user option of pip to put DiscoPlot in: /home/$USER/.local/bin/ You need to add this location to you ~/.bash_profile.

Add DiscoPlot to your path:

$ echo 'export PATH=$PATH:/home/$USER/.local/bin/' >> ~/.bash_profile

Finally install BLAST+:

$ sudo apt-get install ncbi-blast+

MacOSX (Mavericks)

You'll need to have the equivalents of python-dev libatlas-dev liblapack-dev gfortran libfreetype6-dev libfreetype6 & libpng-dev installed. We had no problems installing DiscoPlot on a recently acquired OSX Mavericks machine using the homebrew package manager.

The installed packages on this machine via:

$ brew list

Are available at this gist.

pip install DiscoPlot:

$ pip install --user DiscoPlot

We use the --user option of pip to put DiscoPlot in: /Users/$HOME/Library/Python/2.7/bin You need to add this location to you ~/.bash_profile.

Add DiscoPlot to your path:

$ echo 'export PATH=$PATH:/Users/$HOME/Library/Python/2.7/bin/ >> ~/.bash_profile'

Finally install BLAST+:

$ sudo brew install blast

Windows

Download and install numpy and matplotlib. To make this process easier you can download a distribution of python with matplotlib and numpy already installed such as anaconda.

Alternatively unofficial windows versions of these packages may be found at http://www.lfd.uci.edu/~gohlke/pythonlibs.

pip install DiscoPlot:

$ pip install DiscoPlot

Finally download and install BLAST.

Testing DiscoPlot Installation

Run:

$ DiscoPlot -h
$ python -c 'import DiscoPlot; print DiscoPlot'

Upgrading DiscoPlot

You can upgrade like this:

pip install --upgrade DiscoPlot

Please regularly check back to make sure you're running the most recent DiscoPlot version.

Clone this wiki locally