A learn-to-rank approach for protein variant effect prediction
ESMRank is a pipeline for ranking protein variants according to their predicted functional impact.
The method frames variant effect prediction as a learning-to-rank problem, leveraging protein language models and sequence-derived features to prioritize mutations based on fitness, activity, or stability.
- Python 3.10 (recommended)
- Linux / macOS environment
bash
-
Clone the repository
git clone https://github.com/j3rk0/ESMRank.git
-
Move into the repository directory
cd ESMRank -
Create a virtual environment
python -m venv ESMRank_venv
-
Activate the virtual environment
source ESMRank_venv/bin/activate -
Install Python dependencies
pip install -r requirements.txt
-
Download pretrained models
Download
ESMRank_models.tar.gzfrom:https://zenodo.org/records/18773439Then extract it in the repository root:
tar -xvf ESMRank_models.tar.gz
-
move the
modelsdirectory into the repository root:mv ESMRank/model ./
The main pipeline can be executed via:
run_esmrank_pipeline.sh [-h] --input INPUT [-csv] [-sub] [-indel] [-alanines]ESMRank supports two input modes: CSV mode and FASTA mode.
In CSV mode, the input file must be a CSV containing three mandatory columns:
| Column name | Description |
|---|---|
hgvsp |
Variant identifier |
seq_wt |
Wild-type protein sequence |
seq_mu |
Mutant protein sequence |
Example:
hgvsp,seq_wt,seq_mu
p.A123V,MSEQNNTEMTFQIQRIYTKDISFEAPNAPHVFQ...,MSEQNNTEMTFQIQRIYTKDISFEVPNAPHVFQ...To run in CSV mode:
run_esmrank_pipeline.sh --input variants.csv -csvIn FASTA mode, the input must be a single wild-type protein sequence in FASTA format.
The pipeline will automatically generate variants based on the selected mutation types:
-sub: generate all possible missense substitutions-indel: generate all possible insertions and deletions-alanines: mutually exclusive to sub and indel, generate only alanines substitutions for each aminoacid
Example FASTA:
>protein_X
MSEQNNTEMTFQIQRIYTKDISFEAPNAPHVFQ...
Example execution:
generating all missenses variants:
run_esmrank_pipeline.sh --input protein.fasta -subgenerating all single single indel
run_esmrank_pipeline.sh --input protein.fasta -indelgenerating all missenses and single indel
run_esmrank_pipeline.sh --input protein.fasta -sub -indelgenerate alanine scanning ( alanines substitution only )
run_esmrank_pipeline.sh --input protein.fasta -alanines| Argument | Description |
|---|---|
-h |
Show help message |
--input |
Path to input file (CSV or FASTA) |
-csv |
Enable CSV input mode (default: FASTA mode) |
-sub |
Generate all possible missense substitutions |
-indel |
Generate all possible insertions and deletions |
-alanines |
Generate alanine substitutions for each position |
- CSV and FASTA modes are mutually exclusive.
- In FASTA mode, at least one of
-subor-indelmust be specified. - Runtime and memory usage scale with protein length and number of generated variants.
If you use ESMRank in your research, please cite:
@article{esmrank,
title={ESMRank reveals a transferable axis of protein mutational constraint from overlapping variant effect assays},
author={Riccardo Arnese, Gennaro Gambardella},
journal={TBD},
year={TBD}
}