Overview

HTTPS SSH
Arabidopsis Heat Tree Generator

Requirements:
-OS: tested on Ubuntu 11.04-12.04
-Packages:
    -apache2, with libapache2-mod-wsgi (not necessary for local testing)
    -python 2.7
    -flask (to simplify installation, you need python-pip. 
        Depends on Werkzeug and Jinja2)
    -clustalw
    -python-biopython

Getting the databases:
-Currently, I have a package with the code and all the databases on Dropbox.
The address is https://www.dropbox.com/s/3u3povel121d7qu/heat_tree_deployment.tar.gz?dl=1.
After cloning the repository and downloading this file, move all the .db files 
into the heat_tree folder of your repository.

Testing:
-run "python flask_web.py", and visit the displayed url.

Deployment onto a server using Apache:
-Note: wherever you see a hard-coded directory, you can edit that to whatever is relevant for your system.
-Run server_setup.sh to install necessary software.
-Edit server/app_wsgi.conf, uncommenting the ServerName and ServerAlias lines, and replacing yjzhang.com with your domain name.
-In server/app_wsgi.conf, change the Directory (home/yjzhang/heat_tree_deployment) to your deployment directory.
-Put server/app_wsgi.conf and server/apache2.conf into /etc/apache2 
-Run heat_tree_server.sh on the server (edit this based on username, etc).
-Put server/app.wsgi into the deployment folder (/home/yjzhang/heat_tree_deployment by default)
-Edit config/config_dev.json to use the absolute path to the deployment directory.
-Run the command "apachectl restart"

Development:
-Web pages are located in the templates folder. They're all written in the Jinja2 templating language.
-Javascript and CSS files are located in the static folder.
-The most important Python files are flask_web.py, tree_generate.py, and make_database.py. You might need tree_cache_generate.py.


Possible improvements:
-Migrating database from sqlite to postgres (problem: my vps doesn't have enough memory for a real database system)
-Moving the data downloads/processing into a script (problem: expression data is normalized in a very custom way)
-Write some unit/system tests