Installation

TRANSIT can be downloaded from the public GitHub server, http://github.com/mad-lab/transit. It is released under a GPL License. It can be downloaded with git as follows:

git clone https://github.com/mad-lab/transit/

TRANSIT is python-based You must have python installed (installed by default on most systems). In addition, TRANSIT relies on some python packages/libraries/modules that you might need to install. Below are the list of requirements:


Requirements

The following libraries/modules are required to run TRANSIT:

Generally, these requirements are install using the appropriate methods for your operating system, i.e. apt-get or yum for unix machines, pip or easy_install for OSX, or binary installers on Windows. Below more detailed instructions are provided.


Use as a Python Package

TRANSIT can be (optionally) installed as a python package. This can simplify the installation process as it will automatically install most of the requirements. In addition, it will allow users to use some of transit functions in their own scripts if they desire. Below is a brief example of importing transit functions into python. See the documentation of the package for further examples:

Example:
>>> import transit.norm_tools as norm_tools
>>> import transit.tnseq_tools as tnseq_tools
>>> (data, position) = tnseq_tools.get_data(["transit/data/glycerol_H37Rv_rep1.wig", "transit/data/glycerol_H37Rv_rep2.wig"])
>>> print data
array([[ 0.,  0.,  0., ...,  0.,  0.,  0.],
       [ 0.,  0.,  0., ...,  0.,  0.,  0.]])
>>> factors = norm_tools.TTR_factors(data)
>>> print factors
array([[ 1.        ],
       [ 0.62862886]])

See also

transit

Detailed Instructions: Linux

Method 1: Install as a Python Package

Most of the requirements are available in default package sources in most Linux distributions. The following commands will install python:

#Ubuntu:
sudo apt-get install python

#Fedora:
sudo yum install python

Next you need install pip which allows you automate the process of installing python packages, and wxPython to run in GUI mode:

#Ubuntu:
sudo apt-get install pip python-wxgtk3.0

#Fedora:
sudo yum install pip python-wxgtk3.0

Finally you can use pip to install the TRANSIT package:

sudo pip install https://github.com/mad-lab/transit/archive/master.zip

This will automatically download and install TRANSIT and all remaining requirements.

Optional: If you will be using the pre-processor, TPP, you will also need to install BWA. Download the source files:

`http://sourceforge.net/projects/bio-bwa/files/`_

Extract the files:

tar -xvjf bwa-0.7.12.tar.bz2

Go to the directory with the extracted source-code, and run make to create the executable files:

cd bwa-0.7.12
make

Method 2: Install Source Locally

Most of the requirements are available in default package sources in most Linux distributions. The following commands will install python, numpy, scipy, matplotlib on the Ubuntu or Fedora Linux distributions:

#Ubuntu:
sudo apt-get install python python-numpy python-scipy python-matplotlib python-wxgtk3.0

#Fedora:
sudo yum install python numpy scipy python-matplotlib python-wxgtk3.0

The final requirement left to install is Pillow. First you need install pip which simplifies the process of installing certain python modules like Pillow:

#Ubuntu:
sudo apt-get install pip

#Fedora:
sudo yum install pip

Next, using pip you must have a clean installation of Pillow, and the desired libraries. You can achieve this through the following commands:

#Ubuntu:
pip uninstall pillow
pip uninstall Pillow
sudo apt-get install libjpeg-dev zlib1g-dev
pip install -I Pillow

#Fedora:
pip uninstall pillow
pip uninstall Pillow
sudo yum install install libjpeg-dev zlib1g-dev
pip install -I Pillow

Optional: If you will be using the pre-processor, TPP, you will also need to install BWA. Download the source files:

`http://sourceforge.net/projects/bio-bwa/files/`_

Extract the files:

tar -xvjf bwa-0.7.12.tar.bz2

Go to the directory with the extracted source-code, and run make to create the executable files:

cd bwa-0.7.12
make

Detailed Instructions: OSX

Method 1: Install as a Python Package

First, download and install the latest Python 2.7.x installation file from the official python website:

Next make sure you have pip installed. Pip can be installed through easy_install, which should come with OSX:

sudo easy_install pip

Download and install the OSX binary of wxpython (cocoa version) for python 2.7:

`http://downloads.sourceforge.net/wxpython/wxPython3.0-osx-3.0.2.0-cocoa-py2.7.dmg`_

Finally you can use pip to install the TRANSIT package:

sudo pip install https://github.com/mad-lab/transit/archive/master.zip

This will automatically download and install TRANSIT and all remaining requirements.


Optional: If you will be using the pre-processor, TPP, you will also need to install BWA. Download the source files:

`http://sourceforge.net/projects/bio-bwa/files/`_

Extract the files:

tar -xvjf bwa-0.7.12.tar.bz2

Go to the directory with the extracted source-code, and run make to create the executable files:

cd bwa-0.7.12
make

Method 2: Install Source Locally

First, download and install the latest Python 2.7.x installation file from the official python website:

Next make sure you have pip installed. Pip can be installed through easy_install, which should come with OSX:

sudo easy_install pip

Next install numpy, scipy, and matplotlib and pillow using pip:

sudo pip install numpy
sudo pip install scipy
sudo pip install matplotlib
sudo pip install pillow

Download and install the OSX binary of wxpython (cocoa version) for python 2.7:

`http://downloads.sourceforge.net/wxpython/wxPython3.0-osx-3.0.2.0-cocoa-py2.7.dmg`_

Optional: If you will be using the pre-processor, TPP, you will also need to install BWA . Download the source files:

`http://sourceforge.net/projects/bio-bwa/files/`_

Extract the files:

tar -xvjf bwa-0.7.12.tar.bz2

Go to the directory with the extracted source-code, and run make to create the executable files:

cd bwa-0.7.12
make

Detailed Instructions: Windows

First, download and install the latest Python 2.7.x installation file from the official python website:

`http://www.python.org/downloads/`_

Next, you will need to install pip. If you are using python 2.7.9+ then pip will come pre-installed and included in the default script directory (i.e. C:Python27Scripts ). If you are using python 2.7.8 or older, you will need to manually install pip by downloading and running the get-pip.py script:

python.exe get-pip.py

Make sure that “wheel” is installed. This is necessary to allow you to install .whl (wheel) files:

pip.exe install wheel

Download the .whl files for all the requirements (Note: Make sure to choose the files that match your Windows version i.e. 32/64 bit)

Source: These files were obtained from the Unofficial Windows Binaries for Python Extension Packages by Christoph Gohlke, Laboratory for Fluorescence Dynamics, University of California, Irvine.

Finally, install the files using pip:

pip.exe install numpy-1.9.2+mkl-cp27-none-win_amd64.whl
pip.exe install scipy-0.15.1-cp27-none-win_amd64.whl
pip.exe install matplotlib-1.4.3-cp27-none-win_amd64.whl
pip.exe install Pillow-2.8.1-cp27-none-win_amd64.whl
pip.exe install wxPython-3.0.2.0-cp27-none-win_amd64.whl
pip.exe install wxPython_common-3.0.2.0-py2-none-any.whl

Optional: If you will be using the pre-processor, TPP, you will also need to install BWA. We provide a windows executable (.exe) for Windows 64 bit:

bwa-0.7.12_windows.zip