Pankegg_app.py


Pankegg’s web server for interactive data exploration.

Input file

Pankegg_app.py is using the output of pankegg_make_db.py.

Usage APP

To start the Pankegg web server with your database, use the following command (replace with your actual database path):

python /path/to/pankegg_app.py --d /Path/to/YOUR_PANKEGG.db

(Replace /path/to/pankegg_app.py and /Path/to/YOUR_PANKEGG.db with your actual paths.)

Note:
Before running the web application, it is highly recommended to change the app.secret_key (located around line 24 in pankegg_app.py) to a secure value of your choice. This key is used by Flask for session security. Leaving it as the default (‘local’) is fine for local or testing use, but for any real-world or multi-user deployment, you should generate and use a strong, unique secret key to prevent session tampering and increase security.

Parameters APP

  • --d or --db
    Path to the SQLite database you want to browse.
    Example: --d /Path/to/YOUR_PANKEGG.db

  • --help
    Display a help message with all available options.

Output APP

By default, the web server will start on your local IP address (host 0.0.0.0) and port 5000.
Once started, you can access the Pankegg interface in your browser by navigating to:

http://0.0.0.0:5000

You will be able to browse, filter, and visualize all results contained in your selected database.

Run with Testdata

You can test the web interface using either the database provided with the repository, example databases from the test data, or your own generated databases.
Here are example commands (replace BASH with the actual commands):

  • To run the app on the database shipped with the GitHub repository (data/pankegg.db):
python pankegg_app.py --d data/pankegg.db
  • To run the app on the example Sourmash test database (pankegg_test_data/sourmash_example.db):
python pankegg_app.py --d pankegg_test_data/sourmash_example.db
  • To run the app on the example GTDB-TK test database (pankegg_test_data/gtdbtk_example.db):
python pankegg_app.py --d pankegg_test_data/gtdbtk_example.db
  • To run the app on the Sourmash database you created during the test (pankegg_test_data/test_sourmash.db):
python pankegg_app.py --d pankegg_test_data/test_sourmash.db
  • To run the app on the GTDB-TK database you created during the test (pankegg_test_data/test_gtdbtk.db):
python pankegg_app.py --d pankegg_test_data/test_gtdbtk.db

Troubleshooting

For more details or troubleshooting, please consult the Reporting Bugs & Contributing section.