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:
- Cleans and normalizes the activity dataset (Bradford normalization, negative clamping).
- Aligns protein sequences using ClustalW2 multiple sequence alignment.
- Encodes aligned sequences as integer class vectors (amino acid → 1-26, gap → 0).
- 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.
Two model architectures are explored:
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)
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)
.
├── 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
| 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) |
- Python 3.8+
- ClustalW2 (only needed to recompute alignments; pre-computed alignments are included)
git clone https://github.com/AstyanM/deep-learning-enzyme-activity.git
cd deep-learning-enzyme-activity
pip install -r requirements.txtfrom 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)cd notebooks
jupyter notebook 02_model_training.ipynbThe training notebook (02_model_training.ipynb) automatically runs the preprocessing notebook via %run.
- 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.
Astyan - GitHub
This project is licensed under the MIT License. See LICENSE for details.