Development - prparikh02/Region-Graph-Exploration GitHub Wiki

The Moving Parts

User Interface

The UI is written mostly in plain JavaScript (with the help of jQuery). The network visualizations are done using Vis.js. Why Vis instead of, say, D3? Vis offered many useful operations out of the box and offered a very easy-to-use network-centric API.

Backend

The backend is written in Python. We use Flask as the web framework. Both the graph preprocessing (e.g. computing the Hierarchy Tree) and UI endpoints that require on-the-fly computations use graph-tool, a powerful Python graph library.

The project structure follows the typical Flask paradigm as defined here.

Net Clustering

Clustering graph views uses a technique called Net Clustering. This portion of the project is written in C++ and a separate repo can be found here: Net Clustering. Any new clustering methods compiled from source can be placed into the app/bin/cluster_methods directory (please have a .bin extension). The UI will detect binaries in that directory and allow you to cluster using them.

Functional Documentation

All .py files have docstrings or help menus where deemed necessary. Run the following to view docstrings:

pydoc <name_of_file>.py

Important Notes

  • There are TODO's sprinkled all throughout the code base. Addressing these will help in the long run, but are not entirely necessary.
  • Switching between databases requires a one-line code change in Database_Handlers.py at the module-level variables section. A worthwhile TODO would be to make this database selection on the front-end or as a command-line argument to ./run.py.

Known Bugs

TODO