The MINE Database contains code for generating (through Pickaxe) and storing and retrieving compounds from a database. Pickaxe applies reaction rules, representing reaction transformation patterns, to a list of user-specified compounds in order to predict reactions.
For general information on MINE Databases, please consult JJeffryes et al. 2015..
Documentation is hosted at https://mine-database.readthedocs.io/en/latest/. It gives more detailed descriptions and example uses of the software.
You need the uv
package manager. If you don't have it, install it with the following command:
# On macOS and Linux.
curl -LsSf https://astral.sh/uv/install.sh | sh
# On Windows.
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
Also be sure to install MongoDB (https://docs.mongodb.com/manual/installation/) if you are using the write_db = True
option in Pickaxe.
Installation information on Ubuntu system https://www.mongodb.com/docs/manual/tutorial/install-mongodb-on-ubuntu/
Using MetaCyc rules and coreactants.
uv run mine_database/pickaxe_commons.py -C ./mine_database/data/metacyc_rules/metacyc_coreactants.tsv -r ./mine_database/data/metacyc_rules/metacyc_generalized_rules.tsv -g 1 -c ./example_data/lotus_10.csv -o ./data/
Using original rules and coreactants (Enzymatic)
uv run mine_database/pickaxe_commons.py \
--coreactant_list ./mine_database/data/original_rules/EnzymaticCoreactants.tsv \
--rule_list ./mine_database/data/original_rules/EnzymaticReactionRules.tsv \
--generations 1 \
--compound_file ./example_data/Solanum_1000.csv \
--output_dir ./data/ \
--processes 8 \
--explicit_h \
--database testing-mine
or
uv run mine_database/pickaxe_commons.py -C ./mine_database/data/original_rules/EnzymaticCoreactants.tsv -r ./mine_database/data/original_rules/EnzymaticReactionRules.tsv -g 1 -c ./example_data/lotus_1000.csv -o ./data/ -m 60
Complete command (writing to database):
uv run mine_database/pickaxe_commons.py --coreactant_list ./mine_database/data/original_rules/EnzymaticCoreactants.tsv --rule_list ./mine_database/data/original_rules/EnzymaticReactionRules.tsv --generations 1 --compound_file ./example_data/230106_frozen_metadata_for_mines.csv --output_dir ./data/ --processes 60 --verbose --explicit_h --database lotus_mines
Command without writing to database:
uv run mine_database/pickaxe_commons.py --coreactant_list ./mine_database/data/original_rules/EnzymaticCoreactants.tsv --rule_list ./mine_database/data/original_rules/EnzymaticReactionRules.tsv --generations 1 --compound_file ./example_data/lotus_10.csv --output_dir ./data/ --processes 60 --verbose --explicit_h
Command with generalized rules and full LOTUS dataset without writing to database:
uv run mine_database/pickaxe_commons.py --coreactant_list ./mine_database/data/metacyc_rules/metacyc_coreactants.tsv --rule_list ./mine_database/data/metacyc_rules/metacyc_generalized_rules.tsv --generations 1 --compound_file ./data/LOTUS_inputfiles/230106_frozen_metadata_inchy_smiles.csv --output_dir ./data/ --processes 60 --verbose --explicit_h
To access the mongodb database, you can use the following command:
mongosh
Then, you can use the following commands to access the database:
use example_db
db.compounds.find()
Optionally the DB can be observed using MongoDB Compass. See https://www.mongodb.com/docs/compass/current/install/