Skip to content
Interview @ Broad Institute
Python JavaScript HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
public
src
.DS_Store
.gitattributes
config.ini
config.py
data.py
drug_data.xml
load_data.py
package-lock.json
package.json
readme.md
requirements.txt
server.py

readme.md

Drug Search

  1. Search drugs and mechanisms
  2. Get more details about a drug
  3. Get all the drugs which have a particular mechanism

Installation

  1. required react packages (npm)
  2. elasticsearch (homebrew)
  3. flask and required modules (conda)

Front-end - React

  1. src/index.js => load one page app and routing
  2. src/Search.js => search box and search results
  3. src/Drug.js => load info for one drug
  4. src/Mechanism.js => load info for one mechanism
  5. public/index.html => html template
  6. package.json => specify packages and running scripts

Application - Flask

  1. load_data.py => read files/store data to elasticsearch
  2. data.py => index/query from elasticsearch
  3. server.py => runs flask and routes api calls

APIs

  1. GET /api/search/
  2. GET /api/drug/
  3. GET /api/mechanism/

Database - Elasticsearch

Indexes

  1. Drugs
  2. Mechanisms
  3. Search index

APIs

  1. Get
  2. Post

Run

# run elasticsearch server
# if running on host or port other than localhost:9200
# please update the same on config.ini file of this program

# install client-side dependencies
npm install

# install server-side dependencies
pip install -r requirements.txt

# start the Flask server on port 8000
python server.py

# index data into elasticsearch
python load_data.py /path/to/.xml

# in a 2nd terminal, start the node development server on port 3000
npm run start
You can’t perform that action at this time.