Setup - VCCRI/PAD GitHub Wiki
Target OS: ubuntu 14.04 Environment tested: AWS EC2
sudo apt-get install python-pip
sudo pip install django
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)
sudo apt-get install mysql-server
sudo apt-get install libmysqlclient-dev
sudo apt-get install python-dev
sudo pip install mysql-python
sudo pip install django-crispy-forms
sudo pip install django-multiupload
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
wget https://github.com/arq5x/bedtools2/releases/download/v2.25.0/bedtools-2.25.0.tar.gz
tar -zxvf bedtools-2.25.0.tar.gz
cd bedtools2
make
sudo make install
sudo pip install pybedtools
Download and unzip mm9-peak-files.zip
in static_env/media_root/peak_file_db
to create the folder containing the peak files used in PAD.
Edit tfpro/settings.py
to update the login information
Run mysql (mysql -u username -p
) and create a new database as per the name in settings.py
python manage.py 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.
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>
<Directory /home/ubuntu/source/src/tfpro>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
WSGIDaemonProcess tfpro python-path=/home/ubuntu/source/src
WSGIProcessGroup tfpro
WSGIScriptAlias / /home/ubuntu/source/src/tfpro/wsgi.py
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.