ProteinGym: Large-Scale Benchmarks for Protein Design and Fitness Prediction
Project description
ProteinGym
Overview
ProteinGym is an extensive set of Deep Mutational Scanning (DMS) assays and annotated human clinical variants curated to enable thorough comparisons of various mutation effect predictors in different regimes. Both the DMS assays and clinical variants are divided into 1) a substitution benchmark which currently consists of the experimental characterisation of ~2.7M missense variants across 217 DMS assays and 2,525 clinical proteins, and 2) an indel benchmark that includes ∼300k mutants across 74 DMS assays and 1,555 clinical proteins.
Each processed file in each benchmark corresponds to a single DMS assay or clinical protein, and contains the following variables:
- mutant (str): describes the set of substitutions to apply on the reference sequence to obtain the mutated sequence (eg., A1P:D2N implies the amino acid 'A' at position 1 should be replaced by 'P', and 'D' at position 2 should be replaced by 'N'). Present in the the ProteinGym substitution benchmark only (not indels).
- mutated_sequence (str): represents the full amino acid sequence for the mutated protein.
- DMS_score (float): corresponds to the experimental measurement in the DMS assay. Across all assays, the higher the DMS_score value, the higher the fitness of the mutated protein. This column is not present in the clinical files, since they are classified as benign/pathogenic, and do not have continuous scores
- DMS_score_bin (int): indicates whether the DMS_score is above the fitness cutoff (1 is fit (pathogenic for clinical variants), 0 is not fit (benign for clinical variants))
Additionally, we provide two reference files for each benchmark that give further details on each assay and contain in particular:
- The UniProt_ID of the corresponding protein, along with taxon and MSA depth category
- The target sequence (target_seq) used in the assay
- For the assays, details on how the DMS_score was created from the raw files and how it was binarized
To download the benchmarks, please see DMS benchmark: Substitutions
and DMS benchmark: Indels
in the "Resources" section below.
Fitness prediction performance
The benchmarks folder provides detailed performance files for all baselines on the DMS and clinical benchmarks.
Metrics for DMS assays (both supervised and zero-shot): Spearman, NDCG, AUC, MCC and Top-K recall Metrics for clinical benchmark: AUC
Metrics are aggregated as follows:
- Aggregating by UniProt ID (to avoid biasing results towards proteins for which several DMS assays are available in ProteinGym)
- Aggregating by different functional categories, and taking the mean across those categories.
These files are named e.g. DMS_substitutions_Spearman_DMS_level.csv
, DMS_substitutions_Spearman_Uniprot_level
and DMS_substitutions_Spearman_Uniprot_Selection_Type_level
respectively for these different steps.
For other deep dives (performance split by taxa, MSA depth, mutational depth and more), these are all contained in the benchmarks/DMS_zero_shot/substitutions/Spearman/Summary_performance_DMS_substitutions_Spearman.csv
folder (resp. DMS_indels/clinical_substitutions/clinical_indels & their supervised counterparts). These files are also what are hosted on the website.
We also include, as on the website, a bootstrapped standard error of these aggregated metrics to reflect the variance in the final numbers with respect to the individual assays.
To calculate the DMS substitution benchmark metrics:
- Download the model scores from the website
- Run
./scripts/scoring_DMS_zero_shot/performance_substitutions.sh
And for indels, follow step #1 and run ./scripts/scoring_DMS_zero_shot/performance_substitutions_indels.sh
.
ProteinGym benchmarks - Leaderboard
The full ProteinGym benchmarks performance files are also accessible via our dedicated website: https://www.proteingym.org/. It includes leaderboards for the substitution and indel benchmarks, as well as detailed DMS-level performance files for all baselines. The current version of the substitution benchmark includes the following baselines:
ESM-1v | Protein language model | Meier, J., Rao, R., Verkuil, R., Liu, J., Sercu, T., & Rives, A. (2021). Language models enable zero-shot prediction of the effects of mutations on protein function. NeurIPS. VESPA | Protein language model | Marquet, C., Heinzinger, M., Olenyi, T., Dallago, C., Bernhofer, M., Erckert, K., & Rost, B. (2021). Embeddings from protein language models predict conservation and variant effects. Human Genetics, 141, 1629 - 1647. RITA | Protein language model | Hesslow, D., Zanichelli, N., Notin, P., Poli, I., & Marks, D.S. (2022). RITA: a Study on Scaling Up Generative Protein Sequence Models. ArXiv, abs/2205.05789. ProtGPT2 | Protein language model | Ferruz, N., Schmidt, S., & Höcker, B. (2022). ProtGPT2 is a deep unsupervised language model for protein design. Nature Communications, 13. ProGen2 | Protein language model | Nijkamp, E., Ruffolo, J.A., Weinstein, E.N., Naik, N., & Madani, A. (2022). ProGen2: Exploring the Boundaries of Protein Language Models. ArXiv, abs/2206.13517. MSA Transformer | Hybrid |Rao, R., Liu, J., Verkuil, R., Meier, J., Canny, J.F., Abbeel, P., Sercu, T., & Rives, A. (2021). MSA Transformer. ICML. Tranception | Hybrid | Notin, P., Dias, M., Frazer, J., Marchena-Hurtado, J., Gomez, A.N., Marks, D.S., & Gal, Y. (2022). Tranception: protein fitness prediction with autoregressive transformers and inference-time retrieval. ICML. TranceptEVE | Hybrid | Notin, P., Van Niekerk, L., Kollasch, A., Ritter, D., Gal, Y. & Marks, D.S. & (2022). TranceptEVE: Combining Family-specific and Family-agnostic Models of Protein Sequences for Improved Fitness Prediction. NeurIPS, LMRL workshop. CARP | Protein language model | Yang, K.K., Fusi, N., Lu, A.X. (2022). Convolutions are competitive with transformers for protein sequence pretraining. MIF | Inverse folding | Yang, K.K., Yeh, H., Zanichelli, N. (2022). Masked Inverse Folding with Sequence Transfer for Protein Representation Learning.
Except for the WaveNet model (which only uses alignments to recover a set of homologous protein sequences to train on, but then trains on non-aligned sequences), all alignment-based methods are unable to score indels given the fixed coordinate system they are trained on. Similarly, the masked-marginals procedure to generate the masked-marginals for ESM-1v and MSA Transformer requires the position to exist in the wild-type sequence. All the other model architectures listed above (eg., Tranception, RITA, ProGen2) are included in the indel benchmark.
For clinical baselines, we used dbNSFP 4.4a as detailed in the manuscript appendix (and in proteingym/clinical_benchmark_notebooks/clinical_subs_processing.ipynb
).
Resources
To download and unzip the data, run the following commands for each of the data sources you would like to download, e.g. for all the baseline scores on the DMS substitution scores:
curl -o scores_all_models_proteingym_substitutions.zip https://marks.hms.harvard.edu/proteingym/scores_all_models_proteingym_substitutions.zip
unzip scores_all_models_proteingym_substitutions.zip
rm scores_all_models_proteingym_substitutions.zip
Then we also host the raw DMS assays (before preprocessing)
Data | Size (unzipped) | Link |
---|---|---|
DMS benchmark: Substitutions (raw) | 500MB | https://marks.hms.harvard.edu/proteingym/substitutions_raw_DMS.zip |
DMS benchmark: Indels (raw) | 450MB | https://marks.hms.harvard.edu/proteingym/indels_raw_DMS.zip |
Clinical benchmark: Substitutions (raw) | 58MB | https://marks.hms.harvard.edu/proteingym/substitutions_raw_clinical.zip |
Clinical benchmark: Indels (raw) | 12.4MB | https://marks.hms.harvard.edu/proteingym/indels_raw_clinical.zip |
How to contribute?
New assays
If you would like to suggest new assays to be part of ProteinGym, please raise an issue on this repository with a `new_assay' label. The criteria we typically consider for inclusion are as follows:
- The corresponding raw dataset needs to be publicly available
- The assay needs to be protein-related (ie., exclude UTR, tRNA, promoter, etc.)
- The dataset needs to have insufficient number of measurements
- The assay needs to have a sufficiently high dynamic range
- The assay has to be relevant to fitness prediction
New baselines
If you would like new baselines to be included in ProteinGym (ie., website, performance files, detailed scoring files), please follow the following steps:
- Submit a PR to our repo with two things:
- A new subfolder under proteingym/baselines named with your new model name. This subfolder should include a python scoring script similar to this script, as well as all code dependencies required for the scoring script to run properly
- An example bash script (e.g., under scripts/scoring_DMS_zero_shot) with all relevant hyperparameters for scoring, similar to this script
- Raise an issue with a 'new model' label, providing instructions on how to download relevant model checkpoints for scoring, and reporting the performance of your model on the relevant benchmark using our performance scripts (e.g., for zero-shot DMS benchmarks). Please note that our DMS performance scripts correct for various biases (e.g., number of assays per protein family and function groupings) and thus the resulting aggregated performance is not the same as the arithmetic average across assays.
At this point we are only considering new baselines satisfying the following conditions:
- The model is able to score all mutants in the relevant benchmark (to ensure all models are compared exactly on the same set of mutants everywhere);
- The corresponding model is open source (we should be able to reproduce scores if needed).
At this stage, we are only considering requests for which all model scores for all mutants in a given benchmark (substitution or indel) are provided by the requester; but we are planning on regularly scoring new baselines ourselves for methods with wide adoption by the community and/or suggestions with many upvotes.
Notes
12 December 2023: The code for training and evaluating supervised models is currently shared in https://github.com/OATML-Markslab/ProteinNPT. We are in the process of moving the code to this repo.
Instructions
If you would like to compute all performance metrics for the various benchmarks, please follow the following steps:
- Download locally all relevant files as per instructions above (see Resources)
- Update the paths for all files downloaded in the prior step in the config script
- If adding a new model, adjust the config.json file accordingly and add the model scores to the relevant path (e.g., DMS_output_score_folder_subs)
- If focusing on DMS benchmarks, run the merge script. This will create a single file for each DMS assay, with scores for all model baselines
- Run the relevant performance script (eg., scripts/scoring_DMS_zero_shot/performance_substitutions.sh)
Acknowledgements
Our codebase leveraged code from the following repositories to compute baselines:
We would like to also thank the teams of experimentalists who developed and performed the assays that ProteinGym is built on. If you are using ProteinGym in your work, please consider citing the corresponding papers. To facilitate this, we have prepared a file (assays.bib) containing the bibtex entries for all these papers.
License
This project is available under the MIT license found in the LICENSE file in this GitHub repository.
Reference
If you use ProteinGym in your work, please cite the following paper: ProteinGym: Large-Scale Benchmarks for Protein Design and Fitness Prediction
Links
Website: https://www.proteingym.org/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file proteingym-1.0.tar.gz
.
File metadata
- Download URL: proteingym-1.0.tar.gz
- Upload date:
- Size: 23.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65e9bbb45ca8e7874170d8604db71798ddd047c0ce58bcf5bca4f77592bfa2cb |
|
MD5 | 4821bd3fe7113addc680ad754599307f |
|
BLAKE2b-256 | c7f3f9fc17784360a35487a6c843c607585e648464ce886fe9f010ae7f4fd95d |
File details
Details for the file proteingym-1.0-py3-none-any.whl
.
File metadata
- Download URL: proteingym-1.0-py3-none-any.whl
- Upload date:
- Size: 19.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81e7459613096d7e18698194da56721de96f4e7417e370d4d2b0b19f8f50166a |
|
MD5 | ccc63f2e8e52ee8e7a77e2bde43fabb2 |
|
BLAKE2b-256 | a8e3b568ca3dc88cbe7d325437e5b0a13841549b21aeaef1f28c0d1d657ca245 |