MITE (Minimum Information about a Tailoring Enzyme) is a community-driven database for the characterization of tailoring enzymes. These enzymes play crucial roles in the biosynthesis of secondary or specialized metabolites. These naturally occurring molecules often show strong biological activities, and many drugs (e.g. antibiotics) derive from them.
This repository manages the code for the MITE Database webapp.
For more information, visit the MITE Data Standard Organization page or read our publication.
This repository contains code for the MITE Webpage, allowing to visualize data and receive submissions for new and updates for existing entries.
Note that the web presence does not store MITE entries per se. The MITE ground truth dataset lives in mite_data.
While the MITE Database is primarily intended to be used online, it can also be used offline.
Nota bene: while this application should work on any OS, it has only been tested on Ubuntu Linux 20.04 and 22.04. For an online version, see the MITE Website.
Assuming that Docker is installed:
docker run -p 8000:8000 ghcr.io/mite-standard/mite_web:latest
You can now use the database running on http://127.0.0.1:8000/.
By default, the application runs in development mode.
Data submission and review are restricted in this mode:
- No submission dashboard
- Newly created entries can only be downloaded, but not submitted to GitHub
- Entries cannot be reviewed.
If entries are to be submitted to the repository, please contact the developers.
mite_web is an open source tool licensed under the MIT license (see LICENSE).
See CITATION.cff or MITE online for information on citing MITE.
This work was supported by the Netherlands Organization for Scientific Research (NWO) KIC grant KICH1.LWV04.21.013.
Nota bene: while this application should work on any OS, it has only been tested on Ubuntu Linux 20.04 and 22.04.
Since mite_web 2.0.0, the application follows 12-factor-app principles.
Data from mite_data is baked into the image, alongside a read-only SQLite DB for relational querying.
All parameters are provided as environment variables.
The app itself is stateless, with mite_data's GitHub repository acting as stateful backend (data transfer via the GitHub API).
This build simplifies development by hot reloading (recursively watching directories for changes. Data from mite_data is downloaded once and then injected into the image. Variables are read from an .env file (see .env.example).
Nota bene: assumes that uv is installed.
- Download and install dependencies
git clone git@github.com:mite-standard/mite_data.git
uv sync
uv run pre-commit install
- Run tests
uv run pytest
Tests will also run via pre-commit and GitHub Actions on PRs into main
- Run script to download data from Zenodo.
uv run python scripts/prepare_data.py <mite_data Zenodo record ID> <mite_web_extras Zenodo record ID> # positional args: order must be exact
This data is considered dummy data for dev purposes only. Make sure to remove it before any (manual) production builds.
- Run script to build database
uv run python -m scripts.create_db
- Run docker compose
docker compose -f dev-compose.yml build
docker compose -f dev-compose.yml up --watch
Sometimes, the hot reloading doesn't work perfectly (e.g. dependency updates).
In these cases, terminate with ctrl+c and rebuild.
The main software artifact produced by this repo are Docker containers deposited in the GitHub Container Repository. These containers are created automatically via GitHub Actions on every new Release.
There are two "types" of releases for Mite Web
- Only code update
- Update of code and of baked-in data (mite_data and mite_web_extras)
- Branch out
- Perform code updates
- Update version in
pyproject.toml - Describe changes in
CHANGELOG - Merge to main
- Create a new release
- As in 1., with addition of:
- In build_docker.sh, update mite_data's
MITE_DATA_VERSIONandMITE_DATA_RECORDand mite_web_extras'MITE_WE_VERSIONandMITE_WE_RECORD
Nota bene: production build should be exclusively deployed from Docker images (e.g. from GHCR)
Nota bene: make sure to announce the downtime in the Web App Status thread.
Mite Web requires certain parameters to be run in production mode. These parameters should be provided as environment variables as specified by the respective platform provider. An example can be found in .env.example.
If parameters are not provided, the application will automatically start in development mode, where any GitHub API interaction is prevented.
While most parameters are self-explanatory, the reviewer orcids, GitHub tags, and passwords need to be provided as a base64-encoded string.
The easiest way to get this is to create a csv file (see reviewers.example.csv) and run uv run python scripts/hash_pw.py <input.csv> on it.
- Download the content of the bioinformatics.nl directory (e.g. with
curl --output <filename> <URL>) - Specify the desired container version in compose.yml
- Add parameters in an
.envfile (see .env.example - Run
docker compose -f compose.yml up