TADbit requires python2 >= 2.6 as well as several dependencies that are listed below.
Conda (http://conda.pydata.org/docs/index.html) is a package manager, mainly hosting python programs, that is very useful when no root access is available and the softwares have complicated dependencies.
To install it (in case you don't already have it) just download the installer from http://conda.pydata.org/miniconda.html
In [1]:
%%bash
wget -nv https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh
And run it with all the default options. The installer will create a miniconda2
folder in your home directory where all the programs that you need will be stored (including python).
Alternatively you can also use this oneliner:
In [2]:
%%bash
bash miniconda.sh -b -p $HOME/miniconda2
Required:
apt-get install python-scipy
apt-get install python-numpy
Optional packages (but highly recommended):
apt-get install python-matplotlib
.. note:: Alternative install, you can install python-setuptools and use easy_install to get these packages (e.g. "easy_install scipy
").
With conda you can install most of the needed dependencies:
In [ ]:
%%bash
## required
conda install -y -q scipy # scientific computing in python
conda install -y -q numpy # scientific computing in python
conda install -y -q matplotlib # to plot
conda install -y -q -c https://conda.anaconda.org/bcbio pysam # to deal with SAM/BAM files
## optional
conda install -y -q jupyter # this notebook :)
conda install -y -q -c bioconda sra-tools # to download raw data from released experiment
Since version 2.5 IMP is available in several repositories, like Ubuntu
sudo apt-get install imp
or in anaconda
conda install -c https://conda.anaconda.org/salilab imp
These options may be easier than the source compilation.
MCL is the program used for clustering the 3D models generated by IMP. It can be downloaded from http://micans.org/mcl/; on Debian/Ubuntu machines it can be automatically installed with:
sudo apt-get install mcl
or in anaconda http://conda.pydata.org/docs/intro.html
conda install -y -q -c bioconda mcl
Note: if the MCL executable is not found by TADbit, an alternative clustering method will be used. Nevertheless we strongly recommend to use MCL.
In this course we will use GEM, but any other alternative is just fine.
To install GEM, go to the download page: https://sourceforge.net/projects/gemlibrary/files/gem-library/Binary%20pre-release%202/
and download the i3
version (the other version is for older computers, and you usually won't have to use it).
In [1]:
%%bash
wget -nv -O GEM.tbz2 https://sourceforge.net/projects/gemlibrary/files/gem-library/Binary%20pre-release%203/GEM-binaries-Linux-x86_64-core_i3-20130406-045632.tbz2/download
Uncompress the archive:
In [2]:
%%bash
tar -xjvf GEM.tbz2
And copy the needed binaries to somewhere in your PATH, like:
In [4]:
%%bash
rm -f GEM-binaries-Linux-x86_64-core_i3-20130406-045632/bin/LICENCE
In [8]:
%%bash
cp GEM-binaries-Linux-x86_64-core_i3-20130406-045632/bin/* ~/miniconda2/bin/
Cleanup
In [7]:
%%bash
rm -rf GEM-binaries-Linux-x86_64-core_i3-20121106-022124
rm -f GEM.tbz2
Install dryhic from: https://github.com/qenvio/dryhic
From an R console type:
install.packages("devtools")
devtools::install_github("qenvio/dryhic")
Or execute this cell:
In [13]:
%%bash
R -e '
install.packages("devtools", repos="http://cran.us.r-project.org"); devtools::install_github("qenvio/dryhic")'
DSRC is a FASTQ compressor, it's not needed, but we use it as the size of the files is significantly smaller than using gunzip (>30%), and, more importantly, the access to them can be parallelized, and is much faster than any other alternative.
It can be downloaded from https://github.com/lrog/dsrc
In [9]:
%%bash
wget -nv http://sun.aei.polsl.pl/dsrc/download/2.0rc/dsrc
In [10]:
%%bash
chmod +x dsrc
And copy to somewhere in your PATH, like:
In [11]:
%%bash
mv dsrc ~/miniconda2/bin/
Chimera is a program used for visualization and analysis of molecular structures. It is used in TADbit to visualize the generated 3D models. Chimera is available at: http://www.cgl.ucsf.edu/chimera/
This software is only needed for the visualization of 3D models from inside TADbit.
TADbit provides a wrapper for the LiftOver tool [Fujita2011]_ (download it from: http://hgdownload.cse.ucsc.edu/admin/exe/ ).
This can be used to ease the conversion of genomic TAD coordinates (e.g.: to align human TADs with mouse TADs).
Once all the needed library/software have been installed, TADbit can be downloaded, unpacked and installed as:
wget https://github.com/3DGenomes/tadbit/archive/master.zip -O tadbit.zip
unzip tadbit.zip
cd tadbit-master
sudo python setup.py install
sudo PYTHONPATH=$PYTHONPATH python setup.py install
Finally, run the test script to check that the installation completed successfully.
To do so, move to the test directory and run:
cd test
python test_all.py