The Virtual Flask is a cheminformatic application designed to generate reaction networks given a set of initial molecules and a corpus of templates. A suite of supporting tools facilitate the analysis and visualization of generated chemical reaction data. This guide provides detailed instructions for setting up and running the Virtual Flask locally for development purposes. Both the Corpus and Analysis dashboards can be hosted locally and run simultaneously.
Follow the steps below to set up and run Virtual Flask locally for development purposes.
First, clone the Virtual Flask repository to your local machine:
git clone https://github.com/coleygroup/virtual_flask.git
Change directories to enter the project folder:
cd virtual_flask
Create a Python virtual environment to manage dependencies:
python3 -m venv env
Activate the virtual environment:
- On Linux/macOS:
source env/bin/activate
- On Windows (PowerShell):
.\env\Scripts\Activate.ps1
Install the package in editable mode:
pip install -e .
Note: To enable network visualizations, you will need to install
graphviz
separately and then installpygraphviz
.
Make the script that runs the app executable:
chmod +x bin/run
To learn how to use the Flask application and its filtering features, as well as review the code used for figures in the related manuscript, explore the provided Jupyter notebooks:
- Navigate to the
notebooks
directory.
To start the Corpus Dashboard locally:
bin/run corpus
Then, open http://127.0.0.1:8000/ in your browser to view the app.
To start the Analysis Dashboard:
bin/run analysis
Open http://127.0.0.1:8001/ in your browser to view the analysis app.
Note: You will need reduced pathway data stored in your local PostgreSQL server to fully utilize this dashboard.
Both the Corpus and Analysis dashboards can be run at the same time without any conflicts.
- HTML templates for the dashboards are located in the
shared/templates
directory.
-
HPC Suite: An HPC suite is included in
shared/hpc
. This suite allows for the execution of high-performance computational workflows. To use it:-
Navigate to the
shared/hpc
directory:cd shared/hpc
-
Customize the available scripts to fit your workload requirements. The scripts are designed to help automate and streamline batch processing on high-performance computing clusters.
-
Run the desired script using a compatible job scheduler, such as
SLURM
orPBS
.
Note: The HPC suite is a work in progress, and additional quality-of-life improvements are still being developed.
-
-
JavaScript for Visualizations: To work on the underlying JavaScript for dashboard visualizations, you'll need
npx
installed. This is useful for updating or customizing the interactive features of the dashboards.-
Install JavaScript Dependencies:
To install the necessary JavaScript packages, navigate to the directory containing the
package.json
file and run:npm install
-
Run Webpack:
To bundle the JavaScript code using Webpack, run the following command:
npx webpack
-
Feel free to reach out if you need further details on PostgreSQL setup, installing graphviz
, or configuring the HPC suite!