A research study by the Scripps Research Translational Institute
Visit our site and get started with the study.
This repository contains the Django-REST API and wrapper for the computation layer of MyGeneRank, a study run by the Scripps Research Translational Institute.
The goal of this study is to determine how your genetic risk influences health decisions and other things that can be controlled in life. Our first genetic risk score is calculated for coronary artery disease (CAD).
It's recommended to run the MyGeneRank API in a virtual environment. This tutorial will assume you've already set that up.
Note: This repository does not contain any of the actual calculations for the Genetic Risk Scores or Combined Lifestyle Risk Scores. It requires an external module (supplied by the PIPELINE_DIRECTORY
environment variable). By default the API will use it's own Mock Pipeline for development purposes.
There are a few environment variables you'll need to set to use MyGeneRank's API locally.
EMAIL_HOST
EMAIL_PORT
EMAIL_HOST_USER
EMAIL_HOST_PASSWORD
REDDIT_CLIENT_ID
REDDIT_CLIENT_SECRET
REDDIT_USERNAME
REDDIT_PASSWORD
TTM_CLIENT_ID
TTM_CLIENT_SECRET
TTM_GRANT_TYPE
TTM_REDIRECT_URI
TTM_SCOPE
PIPELINE_DIRECTORY
APNS_CERTIFICATE
SECRET_KEY
Tests are run using nose
. Installing the project's dev dependencies will install everything needed to run the tests.
$ git clone https://github.com/TorkamaniLab/gene-pc-api.git && cd gene-pc-api
$ pip install -r dev_requirements.txt
$ pip install -r requirements.txt
$ ./manage.py migrate
$ ./manage.py test
Congrats! You've got a running development version of MyGeneRank's API.
To measure code coverage in MyGeneRank, run the following command to generate an HTML report of the current code coverage.
$ coverage run --branch --source=generank ./manage.py test && coverage html