A prototype web portal for genomic information
Python 2.7.8 or greater on Mac OSX. Elasticsearch 2.4
Ensure you've installed pip, virtualenv, nodejs, elasticsearch (Note: This has all been done for you already if you are actually taking the test)
Detailed install instructions (MacOSX):
>/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
>brew install python@2
>brew install git
>pip install virtualenv
>brew cask install homebrew/cask-versions/java8
>brew install [email protected]
>brew link [email protected]
This application is designed to mimic a typical web programming environment in the Cherry Lab. The stack uses Python (Flask) as a web framework and API, Javascript (ReactJS) for the web front end, and Elasticsearch as a ~static, searchable database. The database is designed to connect the genomes (list of genes), the functional annotations (GO terms), and disease associations for each gene from OMIM. These data are loaded and indexed into elasticsearch and results provided by the api using /api/search/ endpoint. The system is set up to load the data from the worm C. elegans. During the test you will be asked to extend the functionality of the software.
Contains this README various python and node package requirements, and a Makefile
Contains the code for loading the data and indexing it in Elasticsearch. The data files are located in scripts/elastic_search/data.
Contains the python Flask code to handle routing, search, and API functions (and dev server).
ReactJS code for the front end
A single boilerplate jinja file.
Compile JS from node; recreated with make build.
Public libraries for Select CSS and Sigma plugin
Create a virtualenv for isolating the python dependencies:
See: Elasticsearch Docs for more info
elasticsearch
:
virtualenv -p python2 prototype
source prototype/bin/activate (csh)
OR
. prototype/bin/activate
make build
make index
make run
To run tests
source prototype/bin/activate
make tests
Assets are compiled using webpack.
To enable hot module replacement in your development environment,
run npm start
while the dev server is running and refresh the page.
Subsequent JavaScript changes will go to your browser as a "hot
update" without refreshing.
You can run JavaScript unit tests automatically on each file change by
running npm run test:watch
.
JavaScript coding style is enforced with ESLint. The rules are configured in the .eslintrc file.