Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,83 @@
|
|
1 |
-
---
|
2 |
-
license: mit
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: mit
|
3 |
+
tags:
|
4 |
+
- METL
|
5 |
+
---
|
6 |
+
|
7 |
+
# METL
|
8 |
+
|
9 |
+
<!-- Provide a quick summary of what the model is/does. -->
|
10 |
+
|
11 |
+
Mutational Effect Transfer Learning (METL) is a framework for pretraining and finetuning biophysics-informed protein language models.
|
12 |
+
|
13 |
+
|
14 |
+
## Model Details
|
15 |
+
|
16 |
+
This 🤗 repository contains a wrapper meant to facilitate the ease of use of METL models. Usage of this wrapper will be provided below. Models are hosted on (Zenodo)[https://zenodo.org/records/11051645] and will be downloaded by this wrapper when used.
|
17 |
+
|
18 |
+
### Model Description
|
19 |
+
|
20 |
+
METL is discussed in the (paper)[https://www.biorxiv.org/content/10.1101/2024.03.15.585128v1] in further detail.
|
21 |
+
|
22 |
+
### Model Sources [optional]
|
23 |
+
|
24 |
+
<!-- Provide the basic links for the model. -->
|
25 |
+
|
26 |
+
- **Repository:** [https://github.com/gitter-lab/metl]
|
27 |
+
- **Paper:** [https://www.biorxiv.org/content/10.1101/2024.03.15.585128v1]
|
28 |
+
- **Demo:** [https://huggingface.co/spaces/gitter-lab/METL_demo]
|
29 |
+
|
30 |
+
## How to Get Started with the Model
|
31 |
+
|
32 |
+
Use the code below to get started with the model.
|
33 |
+
|
34 |
+
Running METL requires the following packages:
|
35 |
+
```
|
36 |
+
transformers==4.42.4
|
37 |
+
numpy>=1.23.2
|
38 |
+
networkx>=2.6.3
|
39 |
+
scipy>=1.9.1
|
40 |
+
biopandas>=0.2.7
|
41 |
+
```
|
42 |
+
|
43 |
+
In order to run the example, a PDB file must be installed. It is provided (here)[https://github.com/gitter-lab/metl-pretrained/blob/main/pdbs/2qmt_p.pdb] and in raw format (here)[https://raw.githubusercontent.com/gitter-lab/metl-pretrained/main/pdbs/2qmt_p.pdb].
|
44 |
+
|
45 |
+
After installing those packages and the above file, you may run METL with the following code example (assuming the downloaded file is in the same place as the script):
|
46 |
+
|
47 |
+
```python
|
48 |
+
from transformers import AutoModel
|
49 |
+
import torch
|
50 |
+
|
51 |
+
metl = AutoModel.from_pretrained('gitter-lab/METL', trust_remote_code=True)
|
52 |
+
|
53 |
+
|
54 |
+
model = "metl-l-2m-3d-gb1"
|
55 |
+
wt = "MQYKLILNGKTLKGETTTEAVDAATAEKVFKQYANDNGVDGEWTYDDATKTFTVTE"
|
56 |
+
variants = '["T17P,T54F", "V28L,F51A"]'
|
57 |
+
pdb_path = './2qmt_p.pdb'
|
58 |
+
|
59 |
+
metl.load_from_ident(model_id)
|
60 |
+
|
61 |
+
metl.eval()
|
62 |
+
|
63 |
+
encoded_variants = metl.encoder.encode_variants(sequence, variant)
|
64 |
+
|
65 |
+
with torch.no_grad():
|
66 |
+
predictions = metl(torch.tensor(encoded_variants), pdb_fn=pdb_path)
|
67 |
+
|
68 |
+
```
|
69 |
+
|
70 |
+
## Training Details
|
71 |
+
|
72 |
+
<!-- Do we want something here? -->
|
73 |
+
|
74 |
+
## Citation [optional]
|
75 |
+
|
76 |
+
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
77 |
+
|
78 |
+
Biophysics-based protein language models for protein engineering
|
79 |
+
Sam Gelman, Bryce Johnson, Chase Freschlin, Sameer D’Costa, Anthony Gitter, Philip A. Romero
|
80 |
+
bioRxiv 2024.03.15.585128; doi: https://doi.org/10.1101/2024.03.15.585128
|
81 |
+
|
82 |
+
## Model Card Contact
|
83 |
+
|