Skip to content
andr-kun edited this page Jan 19, 2017 · 1 revision

Target OS: ubuntu 14.04 Environment tested: AWS EC2

Install pip

sudo apt-get install python-pip

Install Django

sudo pip install django

Install apache

sudo apt-get install apache2
sudo apt-get install libapache2-mod-wsgi

To run apache service run sudo service apache2 (start|stop|restarts)

To find location of apache install see documentation. (For this tutorial, since we use apache2.2 and ubuntu, it will be under /etc/apache2)

Install MySQL

sudo apt-get install mysql-server
sudo apt-get install libmysqlclient-dev

Install mysql-python

sudo apt-get install python-dev
sudo pip install mysql-python

Install django related dependencies

sudo pip install django-crispy-forms
sudo pip install django-multiupload

Install numpy/scipy stack

sudo pip install numpy

sudo apt-get install libatlas-base-dev
sudo apt-get install gfortran
sudo apt-get install build-essential
sudo pip install scipy

sudo apt-get install python-matplotlib
sudo pip install pandas
sudo pip install plotly

Install Bedtools

tar -zxvf bedtools-2.25.0.tar.gz
cd bedtools2
sudo make install
sudo pip install pybedtools

Setting up peak files

Download and unzip in static_env/media_root/peak_file_db to create the folder containing the peak files used in PAD.

Setting up MySQL connection

Edit tfpro/ to update the login information

Run mysql (mysql -u username -p) and create a new database as per the name in

python migrate

Load the db dump to the database by running mysql -u username -p tf_pad < tfpad_db_dump.sql. Note that the location of the peak file in the sql may need to be manually changed to the location where the file exist.

Setting up Django

Set up django to run with apache and mod_wsgi using instruction from digital ocean.

For the /etc/apache2/sites-available/000-default.conf, add the following lines:

Alias /static /home/ubuntu/source/static_env/static_root
<Directory /home/ubuntu/source/static_env/static_root>
        Require all granted

<Directory /home/ubuntu/source/src/tfpro>
                Require all granted

WSGIDaemonProcess tfpro python-path=/home/ubuntu/source/src
WSGIProcessGroup tfpro
WSGIScriptAlias / /home/ubuntu/source/src/tfpro/

Restart apache for the change to take effect

sudo service apache2 restart


Make sure the entire source folder has 755 permission (recursive). Make sure the source/static_env/media_root/users_peak_files has 777 permission.

Clone this wiki locally
You can’t perform that action at this time.