EnzymeRanker-X

EnzymeRanker-X is a sequence-based enzyme classification system that predicts Enzyme Commission (EC) numbers from protein amino acid sequences.

The system uses MMseqs2 for sequence similarity search against a reference database built from the training dataset. The EC annotations associated with the best-matching reference sequence are used to generate the final prediction.

Method

The prediction pipeline consists of three main stages:

  1. Reference database construction: Training sequences are grouped by exact sequence identity, and their associated EC annotations are stored.
  2. Sequence retrieval: Input protein sequences are searched against the reference database using MMseqs2.
  3. EC prediction: The best matching reference sequence is selected, and one EC number is assigned to the query.

For sequences without a database match, the system uses a global frequency-based fallback prediction.

Repository Structure

EnzymeRanker-X/
β”œβ”€β”€ assets/
β”‚   β”œβ”€β”€ annotations.json
β”‚   β”œβ”€β”€ ec_vocabulary.json
β”‚   β”œβ”€β”€ label_counts.json
β”‚   β”œβ”€β”€ model_metadata.json
β”‚   └── targetDB*
β”œβ”€β”€ Dockerfile
β”œβ”€β”€ predict.py
β”œβ”€β”€ train_submission.py
β”œβ”€β”€ requirements.txt
└── README.md

The assets/ directory contains the generated reference database and annotation files required for inference.

Requirements

  • Python 3.11
  • MMseqs2
  • Docker
  • Git LFS (for downloading the large database files)

Building the Reference Database

The reference database can be generated from the training dataset using:

brew install mmseqs2

python train_submission.py \
    --train data/raw/train.parquet \
    --output assets \
    --threads 4

This generates the MMseqs2 database, EC annotation mappings, vocabulary, and label-frequency metadata.

The generated assets/ directory must be present when building the Docker image.

Building the Docker Image

Build the image for the competition's Linux x86-64 environment:

docker build --platform linux/amd64 -t enzymeranker-x .

Running Predictions

The prediction script accepts a Parquet file containing id and sequence columns and writes predictions in JSONL format.

Example:

mkdir -p output

docker run --rm \
    --platform linux/amd64 \
    --network none \
    --cpus 2 \
    --memory 16g \
    -v "$PWD/data:/input:ro" \
    -v "$PWD/output:/output" \
    enzymeranker-x \
    python /app/predict.py \
    --input /input/val_inputs.parquet \
    --output /output/predictions.jsonl

Adjust the input volume mount if the Parquet file is stored elsewhere.

Input and Output Format

Input β€” Parquet

Column Description
id Unique protein identifier
sequence Amino acid sequence

Output β€” JSONL

Each output line contains the identifier and its predicted EC number:

{"id": "protein_001", "prediction": ["3.2.2.6"]}

The inference pipeline retains the first identifier for each exact duplicate sequence and produces one top-1 EC prediction per unique sequence.

Inference Constraints

  • No network access is required during inference.
  • Predictions are generated using the packaged reference database.
  • Temporary inference files are stored under /tmp.
  • The prediction output contains one record per unique input sequence.
  • Each prediction contains one EC number.
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support