Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Generative MaxEnt Model for Protein Sequence Analysis

This repository provides a workflow for analyzing mutation effects on proteins using a Maximum Entropy (MaxEnt) model trained on multiple sequence alignment (MSA) data.

More details of the MaxEnt model can be found at Enhancing computational enzyme design by a maximum entropy strategy

🧠 Concept Overview

The MaxEnt model assigns a sequence probability P(S) for each sequence S, representing the likelihood of observing S within the natural sequence space.

The statistical energy of a sequence is defined as: E(S) = -log P(S). In the model training, we minimize E(S). The algorithm therefore outputs statistical energy values for any input sequence S. The repository includes scripts to compute site-saturation mutagenesis energies, enabling the evaluation of all possible single-point variants at each site.

We also define the evolutionary score as: Φ(S) = log P(S). This score is simply the negative of the statistical energy: Φ(S) = -E(S). Higher Φ(S) values indicate sequences more consistent with natural evolutionary constraints.

🔧 Installation

git clone https://github.com/EvoCatalysis/MaxEnt-Pytorch.git
cd MaxEnt-Pytorch
pip install -r requirements.txt

🧬 Workflow Overview

1. Preprocess MSA

Convert a FASTA file into one-hot encoded matrix and compute sequence weights.

python msa_lib.py --msa input.fasta --gap_cutoff 0.7

2. Train MaxEnt Model

Train a MaxEnt model using the processed MSA.

python train_maxent.py --device 'cuda' --n_epochs 1000

3. Predict Mutation Energies

Predict mutation energy changes compared to the wild-type based on the trained model.

python mut_energy_maxent_single_all.py

🧾 Files

File Description
msa_lib.py Preprocess MSA file
train_maxent.py Train MaxEnt model on one-hot encoded MSA
mut_energy_maxent_single_all.py Compute mutation energies
requirements.txt Python dependencies

📚 References

Please cite: Xie, W. J., Asadi, M., & Warshel, A. (2022). Enhancing computational enzyme design by a maximum entropy strategy . Proceedings of the National Academy of Sciences USA, 119(7), e2122355119.

About

No description, website, or topics provided.

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages