Installation¶
Fundamental dependencies¶
python v2.7.*
gcc
hdf5
Python packages¶
numpy>=1.7.1
pysam == 0.10.0
h5py >= 2.0.1
pbcore >= 0.9.4
scipy >= 0.12.0
biopython >= 1.6.1
matplotlib >= 1.5.0
All but Numpy will be installed automatically during the standard installation as described below. Numpy, however, must be installed prior to mBin installation (see below):
Setting up virtualenv¶
mBin should be installed in a Python virtual environment using virtualenv, which creates a clean and isolated Python environment in which to install packages and their dependencies.
Virtualenv can be installed using pip
:
$ pip install virtualenv
Once installed, navigate to the directory where you would like to keep the virtual environment and create a virtual environment called venv
:
$ virtualenv venv
Finally, activate this virtual environment venv
:
$ . venv/bin/activate
Once activated, you are now operating inside the venv
and should see the following on you command line:
(venv)<COMMAND LINE>
Installing t-SNE¶
In order to create 2-D maps of methylation (and other) features for binning using mapfeatures, we must install the Barnes-Hut implementation of the t-SNE algorithm. Full details on the BH-tSNE algoritm and wrapper script can be found here. First, we pull the repository from GitHub and enter the directory:
$ git clone https://github.com/lvdmaaten/bhtsne.git
$ cd bhtsne
Next we compile the source code to get the executable bh_tsne
:
$ g++ sptree.cpp tsne.cpp tsne_main.cpp -o bh_tsne -O2
Once the executable bh_tsne
is compiled, add this directory to your $PATH
environmental variable:
$ export PATH=$PATH:`pwd`
If bh_tsne
is accessible in the path, the following should list usage instructions for mapfeatures:
$ mapfeatures --help