Spaces:
Build error
Build error
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,72 +1,83 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: SoluProtMut
|
| 3 |
+
emoji: 🔬
|
| 4 |
+
colorFrom: red
|
| 5 |
+
colorTo: blue
|
| 6 |
+
sdk: gradio
|
| 7 |
+
sdk_version: 4.44.1
|
| 8 |
+
app_file: app.py
|
| 9 |
+
pinned: false
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
## Installation
|
| 13 |
+
|
| 14 |
+
Clone the repository `???`.
|
| 15 |
+
Then, extract the [FoldX](https://foldxsuite.crg.eu/products#foldx) distribution for your operating system into `external/foldx` in the cloned project folder, _make sure_ the binary is named `foldx`.
|
| 16 |
+
Finally, install the dependencies and check the installation works:
|
| 17 |
+
```bash
|
| 18 |
+
pip install -r requirements.in
|
| 19 |
+
python -m tests.inference
|
| 20 |
+
```
|
| 21 |
+
|
| 22 |
+
If the installation *fails*, or the application *crashes*, try to install *pinned dependencies* instead: `pip install -r requirements.txt`. Also check the table below.
|
| 23 |
+
|
| 24 |
+
#### Tested configurations:
|
| 25 |
+
|
| 26 |
+
| OS | Python | PyTorch | Engine | Project version |
|
| 27 |
+
|-------|--------|---------|-----------|--------------------------------|
|
| 28 |
+
| Win 10 | 3.8.18 | 2.1.2 | CPU | January 16, 2024 |
|
| 29 |
+
| Linux | 3.9.19 | 2.1.2 | CPU | January 16, 2024 |
|
| 30 |
+
| Linux | 3.8.13 | 1.10.0 | CUDA 11.3 | January 16, 2024 |
|
| 31 |
+
|
| 32 |
+
### Usage
|
| 33 |
+
|
| 34 |
+
```
|
| 35 |
+
wrapper.py [-h] [-v] pdb-code [chain] wild-type location mutation
|
| 36 |
+
|
| 37 |
+
Solubility change preditor:
|
| 38 |
+
Predicts the change in the solubility of a given protein variant
|
| 39 |
+
|
| 40 |
+
positional arguments:
|
| 41 |
+
pdb-code PDB code
|
| 42 |
+
chain target chain character; default=A
|
| 43 |
+
wild-type wild-type residue(s) amino-acid[n]
|
| 44 |
+
location mutated position(s) integer[n]
|
| 45 |
+
mutation 1 or n substituents amino-acid|amino-acid[n]
|
| 46 |
+
|
| 47 |
+
optional arguments:
|
| 48 |
+
-h, --help show this help message and exit
|
| 49 |
+
-v, --verbose
|
| 50 |
+
|
| 51 |
+
Amino acids can be specified by both 1- or 3-letter code.
|
| 52 |
+
```
|
| 53 |
+
|
| 54 |
+
Example usage (double-point mutant in [erythropoietin](https://www.rcsb.org/sequence/1EER))`and its outpus:
|
| 55 |
+
```bash
|
| 56 |
+
./wrapper.py 1EER F,R 48,150 D --verbose
|
| 57 |
+
```
|
| 58 |
+
|
| 59 |
+
```
|
| 60 |
+
Predicted solubility change: 5.000398e-01 (solubilizing)
|
| 61 |
+
```
|
| 62 |
+
|
| 63 |
+
## Development
|
| 64 |
+
|
| 65 |
+
### Reproducible environment
|
| 66 |
+
|
| 67 |
+
`requirements.in` – project (direct) dependencies required for *inference*. Keep the PyTorch version specified here in sync with the link for the *pyg* wheels specified ibidem.
|
| 68 |
+
|
| 69 |
+
`requirements.txt` – _resolved_ and _pinned_ dependencies based on the file above, a result of `pip install -r requirements.in && pip freeze` in a fresh Python environment.
|
| 70 |
+
note: `pip-compile` of pip-tools does not seem to work with complex PyTorch ecosystem
|
| 71 |
+
|
| 72 |
+
### Style guide
|
| 73 |
+
#### Indentation
|
| 74 |
+
Use tabs `\t` for an indentation, spaces (after tabs) for an alignment ([reasoning](https://stackoverflow.com/a/5048130/1908192), [reasoning2](https://www.reddit.com/r/javascript/comments/c8drjo/nobody_talks_about_the_real_reason_to_use_tabs/
|
| 75 |
+
))
|
| 76 |
+
|
| 77 |
+
#### Naming conventions (PEP8-based)
|
| 78 |
+
module_name, CONSTANT_NAME, ClassName (capitalize first letters of words), subroutine_name, variable_name
|
| 79 |
+
|
| 80 |
+
ClassName, function_name: keep acronyms in their original case: GetPDB, get_PDB
|
| 81 |
+
|
| 82 |
+
|
| 83 |
+
|