Website for viewing transcription factor predictions for gene lists and custom DNA sequences.
Predictions Config File
predictionsconf.yaml - this config file determines what will be downloaded and how prediction database will work
Predictions Database
Postgres database contains indexed gene lists, custom user data and predicitions data for use by webserver.py
Database Loading Script
load.py - downloads files and loads the database based on predictionsconf.yaml
Webserver
webserver.py serves web portal and API for accessing the 'pred' database
Database Vacuum Script
vacuum.py deletes old user data from the 'pred' database
Web Portal
Directory portal/ contains the reactjs project that builds static/js/bunde.js for webserver.py to serve.
Custom Prediction/Preference Worker
Calculates predictions and preferences for user uploaded sequences. https://github.com/Duke-GCB/Predict-TF-Binding-Worker
Deployment
We use playbook tf_dna_predictions.yml from https://github.com/Duke-GCB/gcb-ansible.
Run via docker-compose
Download docker-compose.yml
and .env_sample
.
Rename .env_sample
to .env
Change DB_PASS_ENV and POSTGRES_PASSWORD to be whatever password you want.
Start the database and webserver.
docker-compose up -d
Populate the database. (This will take quite a while depending upon predictionsconf.yaml)
docker-compose run --no-deps --rm web python load.py
Requires mocha and chai. Setup:
cd portal
npm install -g mocha
npm install --dev
To run:
cd portal
npm run test
From the root directory run this:
nosetests
Integration tests are skipped (they are run by circleci). See tests/test_integration.py skip_postgres_tests for instructions for running them manually.
Under the util
directory there is a python script for updating the config file.
It can be run like so:
cd util
python create_conf.py
This will lookup the latest predictions based on the DATA_SOURCE_URL in create_conf.yaml. If you want to add a new gene list you will need to update GENOME_SPECIFIC_DATA in create_conf.yaml.