YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
EnzymeHunter
Overview
EnzymeHunter: Achieving fine-grained enzyme function prediction with a hierarchically-aware contrastive learning framework. This source code was developed and tested on Linux (CentOS) with Python 3.9.
EnzymeHunter Architecture
Architecture and workflow of the EnzymeHunter modelοΌ
Installation & Setup
Clone the repository
git clone https://github.com/cgxbio/EnzymeHunter.git cd EnzymeHunterCreate and activate the virtual environment
conda env create -f environment.yml conda activate EnzymeHunter
Data and Model Download
Please download the pretrained data and model files from Zenodo:
After downloading, place the contents into the following directories:
EnzymeHunter/
βββ data/ # Place dataset files here
β βββ pdb/ # (PDB mode) Place PDB files here, named {UNIPROT_ID}.pdb
βββ model/ # Place model files here
βββ EnzymeHunter.py
βββ ...
Usage Example
Here are the common examples of using the EnzymeHunter, corresponding to different running modes:
1. Normal Mode (Default Mode)
Use this mode when you need the program to automatically distinguish between enzymes and non-enzymes, and only predict EC numbers for proteins classified as enzymes:
# Example: run prediction on a dataset where not all proteins are enzymes
python EnzymeHunter.py --dataset example_test --all_are_enzymes False
Explanation:
- --example_test is your test dataset name (without the .fasta extension)
- --The program will first perform enzyme/non-enzyme classification prediction
- --Only proteins predicted as enzymes (pred_label=1) will undergo subsequent EC number prediction
- --Non-enzyme proteins will be marked with EC number 0.0.0.0
2. All-Enzymes Mode
Use this mode when you know all proteins in the dataset are enzymes and want to skip the enzyme/non-enzyme classification step, proceeding directly to EC number prediction:
# Example: run prediction assuming all proteins are enzymes
python EnzymeHunter.py --dataset example_test --all_are_enzymes True
Explanation:
- --example_test is your enzyme dataset name (without the .fasta extension)
- --The --all_are_enzymes flag forces the program to treat all proteins as enzymes
- --Skips the enzyme/non-enzyme classification step and proceeds directly to EC number prediction
- --All proteins will have pred_label set to 1 and pred_prob set to 1.0
3. PDB-Based Contact Map Mode
By default, EnzymeHunter uses ESM2-predicted contact maps. You can switch to PDB-based contact maps (computed from AlphaFold or ESMFold 3D structures) by setting --contact_map_source pdb:
- Place your PDB structure files (named
{UNIPROT_ID}.pdb) into./data/pdb/ - Run the pipeline with
--contact_map_source pdb:
In this mode, EnzymeHunter will use the model trained with PDB-derived contact maps.
# Normal mode with PDB contact maps
python EnzymeHunter.py --dataset example_test --all_are_enzymes False --contact_map_source pdb
# All-enzymes mode with PDB contact maps
python EnzymeHunter.py --dataset example_test --all_are_enzymes True --contact_map_source pdb
Output
After running, the prediction results will be saved to:
./results/example_test_final_pred_results.csv
