Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deep Learning for Enzyme Activity Prediction

Python TensorFlow Keras License

Description

This project uses deep learning to predict the enzymatic activity of transaminase (TAM) enzymes on 18 different keto-acid substrates. Starting from raw experimental screening data and protein sequences (UniProt FASTA), we build an end-to-end pipeline that:

  1. Cleans and normalizes the activity dataset (Bradford normalization, negative clamping).
  2. Aligns protein sequences using ClustalW2 multiple sequence alignment.
  3. Encodes aligned sequences as integer class vectors (amino acid → 1-26, gap → 0).
  4. Trains two neural network architectures to predict multi-substrate activity profiles.

The goal is to accelerate enzyme engineering by predicting activity without wet-lab experiments.

Architecture

Two model architectures are explored:

1. Fully Connected Dense Network (~6.2M parameters)

Input(546) → Dense(2000) → BN → Dropout(0.2)
           → Dense(1500) → BN → Dropout(0.2)
           → Dense(1000) → BN → Dropout(0.2)
           → Dense(500)  → BN → Dropout(0.2)
           → Dense(200)  → BN
           → Dense(50)   → BN → Dropout(0.2)
           → Dense(18)

2. 1D Convolutional Neural Network with Embedding (~896K parameters)

Input(546) → Embedding(26, 50)
           → Conv1D(32, k=50) → MaxPool(2)
           → Conv1D(64, k=20) → MaxPool(2)
           → Conv1D(128, k=10) → MaxPool(2)
           → Conv1D(256, k=4)  → MaxPool(2)
           → Conv1D(512, k=4)  → MaxPool(2)
           → GlobalMaxPooling1D
           → Dense(64) → Dense(32) → Dense(18)

Project Structure

.
├── data/
│   ├── enzyme_activity_raw.csv      # Raw screening data (259 enzymes × 18 substrates)
│   ├── sequences_all.fasta          # All TAM protein sequences (UniProt FASTA)
│   ├── sequences_filtered.fasta     # Filtered sequences (matching dataset)
│   ├── sequences_filtered.dnd       # ClustalW2 guide tree
│   ├── aligned_sequences.json       # Pre-computed aligned sequences
│   ├── output.aln                   # ClustalW2 alignment output
│   ├── temp.fasta                   # Temporary alignment input
│   └── temp.aln                     # Temporary alignment file
├── notebooks/
│   ├── 01_data_preprocessing.ipynb          # Data cleaning & sequence alignment (silent)
│   ├── 01_data_preprocessing_verbose.ipynb  # Same pipeline with verbose output
│   └── 02_model_training.ipynb              # Model definition, training & evaluation
├── src/
│   ├── __init__.py                  # Package exports
│   ├── data_processing.py           # Dataset loading, cleaning, normalization
│   ├── sequence_utils.py            # FASTA parsing, ClustalW2 alignment, encoding
│   └── models.py                    # Dense and CNN model builders
├── requirements.txt
├── LICENSE
└── README.md

Technical Details

Aspect Detail
Dataset 259 transaminase enzymes screened on 18 keto-acid substrates
Input ClustalW2-aligned protein sequences encoded as integer vectors (length 546)
Output Activity values (U/mL) for 18 substrates
Loss Mean Squared Error (MSE)
Optimizer Adam
Train/Test Split 80/20 (random state 42)
Alignment Tool ClustalW2
Sequence Source UniProt accession codes (FASTA format)

Installation

Prerequisites

  • Python 3.8+
  • ClustalW2 (only needed to recompute alignments; pre-computed alignments are included)

Setup

git clone https://github.com/AstyanM/deep-learning-enzyme-activity.git
cd deep-learning-enzyme-activity
pip install -r requirements.txt

Usage

Using the modular package

from src.data_processing import load_and_clean_dataset, get_targets
from src.sequence_utils import get_aligned_sequences, letters_to_classes
from src.models import build_dense_model, build_cnn_model

# Load and clean data
df, bradford, purities = load_and_clean_dataset("data/enzyme_activity_raw.csv")
targets, substrate_dict, enzyme_dict = get_targets(df)

# Encode aligned sequences
sequences = get_aligned_sequences("data/aligned_sequences.json")
X = letters_to_classes(sequences).astype("float32")

# Build and train a model
model = build_cnn_model()
model.fit(X_train, y_train, validation_data=(X_test, y_test), epochs=60)

Using the notebooks

cd notebooks
jupyter notebook 02_model_training.ipynb

The training notebook (02_model_training.ipynb) automatically runs the preprocessing notebook via %run.

References

  • ClustalW2: Larkin, M.A., et al. (2007). Clustal W and Clustal X version 2.0. Bioinformatics, 23(21), 2947-2948.
  • UniProt: The UniProt Consortium. UniProt: the Universal Protein Knowledgebase. Nucleic Acids Research.

Author

Astyan - GitHub

License

This project is licensed under the MIT License. See LICENSE for details.

About

Deep learning pipeline for predicting transaminase enzyme activity across multiple substrates, combining sequence alignment and neural networks.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages