metapredict 2.65.0__tar.gz → 3.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- metapredict-3.0.0/PKG-INFO +156 -0
- metapredict-3.0.0/README.md +134 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/changelog.md +27 -0
- metapredict-3.0.0/docs/getting_started.rst +248 -0
- metapredict-3.0.0/docs/images/confidence_scores_disorder.png +0 -0
- metapredict-3.0.0/docs/images/meta_predict_disorder.png +0 -0
- metapredict-3.0.0/docs/images/python_meta_predict_MadeUpProtein.png +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/docs/requirements.txt +4 -1
- metapredict-3.0.0/docs/usage/acknowledgements.rst +22 -0
- metapredict-3.0.0/docs/usage/command-line.rst +765 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/docs/usage/troubleshooting.rst +2 -2
- {metapredict-2.65.0 → metapredict-3.0.0}/docs/usage/using-in-python.rst +552 -132
- metapredict-3.0.0/metapredict/__init__.py +291 -0
- metapredict-3.0.0/metapredict/_version.py +1 -0
- metapredict-3.0.0/metapredict/analysis/caid1_and_2_disorder_pdb.fasta +3000 -0
- metapredict-3.0.0/metapredict/analysis/caid1_disorder_pdb.fasta +1956 -0
- metapredict-3.0.0/metapredict/analysis/caid2_analysis.py +339 -0
- metapredict-3.0.0/metapredict/analysis/caid2_disorder_pdb.fasta +1044 -0
- metapredict-3.0.0/metapredict/analysis/seq_caid_plddt.tsv +794 -0
- metapredict-3.0.0/metapredict/analysis/test_different_predictors.py +263 -0
- metapredict-3.0.0/metapredict/backend/architectures.py +255 -0
- metapredict-3.0.0/metapredict/backend/creating_V2_and_V3_scores.py +320 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/backend/cython/domain_definition.c +125 -125
- metapredict-3.0.0/metapredict/backend/data_structures.py +61 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/backend/encode_sequence.py +8 -32
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/backend/meta_graph.py +21 -25
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/backend/meta_tools.py +164 -65
- metapredict-3.0.0/metapredict/backend/network_parameters.py +418 -0
- metapredict-3.0.0/metapredict/backend/networks/epoch-49-step-42600.ckpt +0 -0
- metapredict-3.0.0/metapredict/backend/networks/epoch023_val_loss1529.48.ckpt +0 -0
- metapredict-3.0.0/metapredict/backend/networks/epoch029_val_loss791.84.ckpt +0 -0
- metapredict-3.0.0/metapredict/backend/networks/epoch029_val_loss959.58.ckpt +0 -0
- metapredict-3.0.0/metapredict/backend/networks/epoch096_val_loss1584.14.ckpt +0 -0
- metapredict-3.0.0/metapredict/backend/networks/epoch099_val_loss1107.08.ckpt +0 -0
- metapredict-3.0.0/metapredict/backend/networks/epoch179_val_loss1095.24.ckpt +0 -0
- metapredict-3.0.0/metapredict/backend/networks/non_bin_PAE_hs40_nl2.pt +0 -0
- metapredict-3.0.0/metapredict/backend/networks/smoothed_v3_real_plddt_re.pt +0 -0
- metapredict-3.0.0/metapredict/backend/ppLDDT/networks/alpha_fold_networkV7_hs100_nL2_200e_all_prot.pt +0 -0
- metapredict-3.0.0/metapredict/backend/ppLDDT/networks/epoch019_val_loss1477.45.ckpt +0 -0
- metapredict-3.0.0/metapredict/backend/predictor.py +1455 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/meta.py +711 -406
- metapredict-3.0.0/metapredict/parameters.py +11 -0
- metapredict-3.0.0/metapredict/scripts/metapredict_caid.py +26 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/scripts/metapredict_graph_disorder.py +11 -13
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/scripts/metapredict_graph_pLDDT.py +6 -5
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/scripts/metapredict_name.py +9 -10
- metapredict-3.0.0/metapredict/scripts/metapredict_predict_disorder.py +58 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/scripts/metapredict_predict_idrs.py +27 -34
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/scripts/metapredict_predict_pLDDT.py +22 -1
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/scripts/metapredict_quick_graph.py +13 -10
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/scripts/metapredict_quick_predict.py +6 -7
- metapredict-3.0.0/metapredict/scripts/metapredict_uniprot.py +95 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/tests/.pytest_cache/v/cache/lastfailed +9 -1
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/tests/.pytest_cache/v/cache/nodeids +8 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/tests/cli_tests/__init__.py +1 -1
- metapredict-3.0.0/metapredict/tests/input_data/test_scores_100_v3.npy +0 -0
- metapredict-3.0.0/metapredict/tests/local_data.py +21 -0
- metapredict-3.0.0/metapredict/tests/output/1_Q8N6T3.png +0 -0
- metapredict-3.0.0/metapredict/tests/output/2_p53.png +0 -0
- metapredict-3.0.0/metapredict/tests/output/3_sp_P0DMV8_HS71.png +0 -0
- metapredict-3.0.0/metapredict/tests/output/Q8N6T3.pdf +0 -0
- metapredict-3.0.0/metapredict/tests/output/Q8N6T3.png +0 -0
- metapredict-3.0.0/metapredict/tests/output/Q8N6T3.ps +1219 -0
- metapredict-3.0.0/metapredict/tests/output/demo1.pdf +0 -0
- metapredict-3.0.0/metapredict/tests/output/demo1.png +0 -0
- metapredict-3.0.0/metapredict/tests/output/demo1.ps +1243 -0
- metapredict-3.0.0/metapredict/tests/output/demo1_custom_title.png +0 -0
- metapredict-3.0.0/metapredict/tests/output/demo1_disorder_thresh0p5.png +0 -0
- metapredict-3.0.0/metapredict/tests/output/demo1_dpi_500.png +0 -0
- metapredict-3.0.0/metapredict/tests/output/demo1_shaded_1_20.png +0 -0
- metapredict-3.0.0/metapredict/tests/output/demo1_shaded_1_20_80_200.png +0 -0
- metapredict-3.0.0/metapredict/tests/output/demo1_shaded_1_20_80_200_yellow.png +0 -0
- metapredict-3.0.0/metapredict/tests/output/p53.pdf +0 -0
- metapredict-3.0.0/metapredict/tests/output/p53.png +0 -0
- metapredict-3.0.0/metapredict/tests/output/p53.ps +1139 -0
- metapredict-3.0.0/metapredict/tests/output/sp_P0DMV8_HS71.pdf +0 -0
- metapredict-3.0.0/metapredict/tests/output/sp_P0DMV8_HS71.png +0 -0
- metapredict-3.0.0/metapredict/tests/output/sp_P0DMV8_HS71.ps +1358 -0
- metapredict-3.0.0/metapredict/tests/output/test.csv +3 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/tests/test_batch_vs_single.py +17 -59
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/tests/test_cython_v_python.py +1 -3
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/tests/test_metapredict.py +81 -25
- metapredict-3.0.0/metapredict/tests/test_metapredict_CPU_GPU.py +337 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/tests/test_uniprot_functionality.py +8 -20
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/tests/test_write_fasta.py +2 -3
- metapredict-3.0.0/metapredict.egg-info/PKG-INFO +156 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict.egg-info/SOURCES.txt +46 -8
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict.egg-info/entry_points.txt +1 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict.egg-info/requires.txt +1 -1
- {metapredict-2.65.0 → metapredict-3.0.0}/pyproject.toml +4 -1
- {metapredict-2.65.0 → metapredict-3.0.0}/setup.py +1 -1
- metapredict-2.65.0/PKG-INFO +0 -20
- metapredict-2.65.0/README.md +0 -107
- metapredict-2.65.0/docs/getting_started.rst +0 -172
- metapredict-2.65.0/docs/images/confidence_scores_disorder.png +0 -0
- metapredict-2.65.0/docs/images/meta_predict_disorder.png +0 -0
- metapredict-2.65.0/docs/images/python_meta_predict_MadeUpProtein.png +0 -0
- metapredict-2.65.0/docs/usage/acknowledgements.rst +0 -21
- metapredict-2.65.0/docs/usage/command-line.rst +0 -470
- metapredict-2.65.0/metapredict/__init__.py +0 -143
- metapredict-2.65.0/metapredict/_version.py +0 -1
- metapredict-2.65.0/metapredict/backend/batch_predict.py +0 -590
- metapredict-2.65.0/metapredict/backend/brnn_architecture.py +0 -113
- metapredict-2.65.0/metapredict/backend/data_structures.py +0 -142
- metapredict-2.65.0/metapredict/backend/meta_predict_disorder.py +0 -321
- metapredict-2.65.0/metapredict/backend/metameta_hybrid_predict.py +0 -90
- metapredict-2.65.0/metapredict/backend/py_predictor_v2.py +0 -142
- metapredict-2.65.0/metapredict/backend/uniprot_predictions.py +0 -167
- metapredict-2.65.0/metapredict/parameters.py +0 -3
- metapredict-2.65.0/metapredict/scripts/metapredict_predict_disorder.py +0 -41
- metapredict-2.65.0/metapredict/scripts/metapredict_uniprot.py +0 -69
- metapredict-2.65.0/metapredict/tests/local_data.py +0 -21
- metapredict-2.65.0/metapredict/tests/output/readme.txt +0 -1
- metapredict-2.65.0/metapredict.egg-info/PKG-INFO +0 -20
- metapredict-2.65.0/old_readem.md +0 -1092
- {metapredict-2.65.0 → metapredict-3.0.0}/.codecov.yml +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/.gitignore +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/.lgtm.yml +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/.travis.yml +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/CODE_OF_CONDUCT.md +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/CONTRIBUTING.md +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/LICENSE +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/MANIFEST.in +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/colab/metapredict_colab.ipynb +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/devtools/README.md +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/devtools/conda-envs/test_env.yaml +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/devtools/scripts/create_conda_env.py +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/devtools/travis-ci/before_install.sh +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/docs/.DS_Store +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/docs/Makefile +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/docs/README.md +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/docs/_static/README.md +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/docs/_templates/README.md +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/docs/changes.rst +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/docs/conf.py +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/docs/how_to_cite.rst +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/docs/index.rst +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/docs/make.bat +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/docs/usage/api.rst +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/.DS_Store +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/backend/.DS_Store +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/backend/cython/domain_definition.pyx +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/backend/domain_definition.py +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/backend/networks/.DS_Store +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/backend/networks/metaDisorder.pt +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/backend/networks/meta_predict_disorder_100e_v1.pt +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/backend/networks/metameta_2_7_22_nl2_hs20_b32_V3.pt +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/backend/networks/metapredict_network_v2_200epochs_nl1_hs20.pt +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/backend/networks/metapredict_network_v3_200epochs_nl2_hs20.pt +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/backend/ppLDDT/.DS_Store +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/data/.DS_Store +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/data/README.md +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/data/test_data.fasta +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/metapredict_exceptions.py +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/scripts/__init__.py +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/tests/.DS_Store +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/tests/.pytest_cache/.gitignore +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/tests/.pytest_cache/CACHEDIR.TAG +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/tests/.pytest_cache/README.md +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/tests/.pytest_cache/v/cache/stepwise +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/tests/__init__.py +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/tests/cli_tests/input/three_seqs.fasta +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/tests/cli_tests/test_metapredict-predict-disorder.py +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/tests/cli_tests/test_metapredict-predict-idrs.py +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/tests/input_data/DisorderPredictionssp_P04637_P53_HUMANC.txt +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/tests/input_data/build_data.ipynb +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/tests/input_data/test_scores_100.npy +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/tests/input_data/test_seqs_100.fasta +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/tests/input_data/testing.fasta +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/tests/input_data/three_seqs.fasta +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/tests/pytest.ini +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/tests/test_domain_functions.py +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/tests/test_graph_disorder.py +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict/tests/test_graph_fasta.py +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict.egg-info/dependency_links.txt +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict.egg-info/not-zip-safe +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/metapredict.egg-info/top_level.txt +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/readthedocs.yml +0 -0
- {metapredict-2.65.0 → metapredict-3.0.0}/setup.cfg +0 -0
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: metapredict
|
|
3
|
+
Version: 3.0.0
|
|
4
|
+
Summary: A machine learning-based tool for predicting protein disorder.
|
|
5
|
+
Author-email: Ryan Emenecker <remenecker@wustl.edu>
|
|
6
|
+
License: MIT
|
|
7
|
+
Requires-Python: >=3.8
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Requires-Dist: cython
|
|
11
|
+
Requires-Dist: torch
|
|
12
|
+
Requires-Dist: numpy
|
|
13
|
+
Requires-Dist: matplotlib
|
|
14
|
+
Requires-Dist: protfasta
|
|
15
|
+
Requires-Dist: scipy
|
|
16
|
+
Requires-Dist: urllib3
|
|
17
|
+
Requires-Dist: tqdm
|
|
18
|
+
Requires-Dist: pytorch_lightning
|
|
19
|
+
Requires-Dist: getSequence>=2.2.1
|
|
20
|
+
Provides-Extra: test
|
|
21
|
+
Requires-Dist: pytest>=6.1.2; extra == "test"
|
|
22
|
+
|
|
23
|
+
# metapredict: A machine learning-based tool for predicting protein disorder.
|
|
24
|
+
|
|
25
|
+
### Last updated November 2024
|
|
26
|
+
|
|
27
|
+
## Current default version: V3
|
|
28
|
+
In November 2024, we changed the default version of metapredict from V2 to V3. Small increments (3.0.x) may be made as bug fixes or feature enhancements.
|
|
29
|
+
|
|
30
|
+
For context, V3 provides major improvements to V2. Metapredict V3 uses a **new network to predict disorder** that in our benchmarks is the most accurate version to date. In addition, *V3 is backwards compatible with V2* and can be used as a drop-in replacement for V2. Although the Python API has been improved to massively simplify how you can use metapredict, we have **for the time being** updated it such that all previously created functions *should still work*. If they do not, please raise an issue and we will fix the problem ASAP!
|
|
31
|
+
|
|
32
|
+
## What are the major changes for metapredict V3?
|
|
33
|
+
|
|
34
|
+
1. **A new disorder prediction network**: Metapredict V3 uses a new (more accurate) network for disorder prediction. V1 and V2 are still available!
|
|
35
|
+
2. **A new pLDDT prediction network**: metapredict used to rely on an external package called [alphaPredict](https://github.com/ryanemenecker/alphaPredict) for pLDDT prediction. This same network is still available in metapredict when using ``meta.predict_pLDDT()`` by setting ``pLDDT_version=1``. However, the default V2 network is by all metrics better for pLDDT prediction, so we recommend using V2!
|
|
36
|
+
3. **Easier batch predictions**: V2 previously required you to use ``predict_disorder_batch()`` to take advantage of the 10-100x improvement in prediction speed on CPUs and GPUs. However, you can now use a single function - ``predict_disorder()`` - on individual sequences, lists of sequences, and dictionaries of sequences, and metapredict will automatically take care of the rest for you including running batch predictions if you input more than 1 sequence.
|
|
37
|
+
4. **Easier access to DisorderObject**. You can now return the ``DisorderObject`` by setting ``return_domains=True`` when using ``predict_disorder()``.
|
|
38
|
+
5. **Batch prediction for all**: Previously, batch predictions were only available for the V2 disorder prediction network of metapredict. Now, you can do batch predictions using all of the disorder prediction networks - V1 (previously called legacy), V2, and V3!
|
|
39
|
+
6. **Batch pLDDT predictions**: Batch predictions (and therefore the massive increases in prediction speed) are now available for pLDDT predictions using the `predict_pLDDT()` function.
|
|
40
|
+
7. **More device selection**: Newer versions of Torch (>2.0) support MacOS GPU utilization through the Metal Performance Shaders (MPS) framework, so you can now choose to use *mps* on MacOS.
|
|
41
|
+
8. **More clear device selection**: Metapredict used to fall back to using CPU for predictions if it failed to use GPU for whatever reason. This had good intentions but made troubleshooting GPU usage very tricky. Now if you specify using a specific device and it does not work, metapredict will not automatically fall back to CPU.
|
|
42
|
+
9. **Ability to get protein isoforms from Uniprot**: We updated ``metapredict-uniprot`` to work with the new version of [getSequence](https://github.com/ryanemenecker/getSequence), which enables you to input a valid Uniprot ID including designations for different protein isoforms. If you want to predict a sequence from the CLI using the name of the protein and the organism name (optional but recommended), please use ``metapredict-name`` as **``metapredict-uniprot`` will only work with valid Uniprot Accession numbers**.
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
## Installation
|
|
46
|
+
Metapredict is a software package written in Python. It can be installed from [PyPI](https://pypi.org/project/metapredict/) (the Python Package Index) using the tool `pip`. We always recommend managing your Python environment with conda. If these ideas are foreign to you, we recommend reading up a bit on Python package management and [conda](https://conda.io/projects/conda/en/latest/user-guide/getting-started.html) before continuing.
|
|
47
|
+
|
|
48
|
+
#### TL/DR: Recommended install commands are:
|
|
49
|
+
In most situations, the following two commands will ensure all the necessary dependencies are installed and work correctly:
|
|
50
|
+
```bash
|
|
51
|
+
# ensure dependencies are from the same ecosystem (conda)
|
|
52
|
+
conda install -c conda-forge -c pytorch python=3.11 numpy pytorch scipy cython matplotlib
|
|
53
|
+
|
|
54
|
+
# install from PyPI
|
|
55
|
+
pip install metapredict
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
To check the installation has worked run:
|
|
59
|
+
```bash
|
|
60
|
+
metapredict-predict-disorder --help
|
|
61
|
+
```
|
|
62
|
+
from the command line; this should yield help info on the `metapredict-predict-disorder` command.
|
|
63
|
+
|
|
64
|
+
#### WARNING: Segfault when mixing `conda` and `pip` installs (March 2024)
|
|
65
|
+
As of at least PyTorch 2.2.2 on macOS, there are binary incompatibilities between `pip` and `conda` versions of PyTorch and numpy. Therefore, it is essential your numpy and PyTorch installs are from the same package manager. metapredict will - by default - pull dependencies from PyPI. However, other packages installed from conda may require conda-dependent numpy installations, which can "brick" a previously-working installation.
|
|
66
|
+
|
|
67
|
+
#### WARNING: Problems with installing Torch with propert CUDA version (November 2024).
|
|
68
|
+
**This is only relevent if you are trying to run metapredict on a CUDA-enabled GPU!**
|
|
69
|
+
|
|
70
|
+
If you are on an older version of CUDA, a torch version that *does not have the correct CUDA version* will be installed. This can cause a segfault when running metapredict. To fix this, you need to install torch for your specific CUDA version. For example, to install PyTorch on Linux using pip with a CUDA version of 12.1, you would run:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
pip install torch --index-url https://download.pytorch.org/whl/cu121
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
To figure out which version of CUDA you currently have (assuming you have a CUDA-enabled GPU that is set up correctly), you need to run:
|
|
77
|
+
```bash
|
|
78
|
+
nvidia-smi
|
|
79
|
+
```
|
|
80
|
+
Which should return information about your GPU, NVIDIA driver version, and your CUDA version at the top.
|
|
81
|
+
|
|
82
|
+
Please see the [PyTorch install instructions](https://pytorch.org/get-started/locally/) for more info.
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
### Extended installation info
|
|
86
|
+
|
|
87
|
+
The current stable version of **metapredict** is available through GitHub or the Python Package Index (PyPI).
|
|
88
|
+
|
|
89
|
+
To install from PyPI, run:
|
|
90
|
+
```bash
|
|
91
|
+
pip install metapredict
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
You can also install the current development version from
|
|
95
|
+
```bash
|
|
96
|
+
pip install git+https://git@github.com/idptools/metapredict
|
|
97
|
+
```
|
|
98
|
+
To clone the GitHub repository and gain the ability to modify a local copy of the code, run
|
|
99
|
+
```bash
|
|
100
|
+
git clone https://github.com/idptools/metapredict.git
|
|
101
|
+
cd metapredict
|
|
102
|
+
pip install -e .
|
|
103
|
+
```
|
|
104
|
+
Note you will need the -e flag to ensure the `cython` code compiles correctly, but this also means the installed version is linked to the local version of the code.
|
|
105
|
+
|
|
106
|
+
This will install **metapredict** locally. If you modify the source code in the local repository, be sure to re-install with `pip`.
|
|
107
|
+
|
|
108
|
+
## Documentation
|
|
109
|
+
Documentation for metapredict V3 automatically builds from the `/doc` directory in this repository and is hosted at [https://metapredict.readthedocs.io/](https://metapredict.readthedocs.io/).
|
|
110
|
+
|
|
111
|
+
In brief, metapredict provides both command-line tools and a set of user-face functions from the metapredict python module. Both sets of tools are fully documented online.
|
|
112
|
+
|
|
113
|
+
## How can I use metapredict?
|
|
114
|
+
Metapredict can be used in five different ways:
|
|
115
|
+
|
|
116
|
+
1. As a stand-alone command-line tool (installable via pip - the code in this repository).
|
|
117
|
+
2. As a Python library for integrating into your favorite bioinformatics pipeline (installable via pip - the code in this repository).
|
|
118
|
+
3. As a web-server for examining disorder predictions on individual sequences found at [https://metapredict.net/](https://metapredict.net/).
|
|
119
|
+
4. *NEW as of August 2022:* as a Google Colab notebook for batch-predicting disorder scores for larger numbers of sequences: [**LINK HERE**](https://colab.research.google.com/github/idptools/metapredict/blob/master/colab/metapredict_colab.ipynb). Performance-wise, batch mode can predict the entire yeast proteome in ~1.5 min using the Colab Notebook and much faster if using a local GPU.
|
|
120
|
+
5. *NEW as of May 2023:* as part of the [ALBATROSS paper](https://www.nature.com/articles/s41592-023-02159-5), we provide a colab notebook for predicting IDRs on a proteome-wide scale [**LINK HERE**](https://colab.research.google.com/github/holehouse-lab/ALBATROSS-colab/blob/main/idrome_constructor/idrome_constructor.ipynb).
|
|
121
|
+
|
|
122
|
+
## How to cite
|
|
123
|
+
|
|
124
|
+
If you use metapredict for your work, please cite the metapredict paper:
|
|
125
|
+
|
|
126
|
+
Emenecker, R. J., Griffith, D. & Holehouse, A. S. Metapredict: a fast, accurate, and easy-to-use predictor of consensus disorder and structure. Biophys. J. 120, 4312–4319 (2021).
|
|
127
|
+
|
|
128
|
+
Note that in addition to the [original paper](https://www.cell.com/biophysj/fulltext/S0006-3495(21)00725-6), there's a [V2 preprint](https://www.biorxiv.org/content/10.1101/2022.06.06.494887v2); HOWEVER, we ask you only cite the original paper and describe the version being used (V1, V2, V2-FF, or V3).
|
|
129
|
+
|
|
130
|
+
We are hoping to get a paper out for V3 in the near future (we will update this section once the V3 paper is available)...
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
## Changes
|
|
134
|
+
|
|
135
|
+
For changes see the `changelog.md` file in this directory or check them out in Github [here](https://github.com/idptools/metapredict/blob/master/changelog.md).
|
|
136
|
+
|
|
137
|
+
## Running tests
|
|
138
|
+
Note that to run tests you must compile the cython code in place. We suggest doing this by running the following set of commands:
|
|
139
|
+
```bash
|
|
140
|
+
pip uninstall metapredict; rm -rf build dist *.egg-info; python -m build; pip install .*
|
|
141
|
+
```
|
|
142
|
+
## Acknowledgements
|
|
143
|
+
|
|
144
|
+
A modified version of PARROT, created by Dan Griffith, was used to generate the network used for metapredict V3. The original implementation of PARROT was used to generate the V1 and V2 networks. See [https://pypi.org/project/idptools-parrot/](https://pypi.org/project/idptools-parrot/) for some very cool machine learning stuff. You can also check out the [PARROT paper](https://elifesciences.org/articles/70576).
|
|
145
|
+
|
|
146
|
+
In addition to using Dan Griffith's tool for creating metapredict, the original code for `encode_sequence.py` was written by Dan.
|
|
147
|
+
|
|
148
|
+
We would like to thank the **DeepMind** team for developing AlphaFold2 and EBI/UniProt for making these data so readily available.
|
|
149
|
+
|
|
150
|
+
We would also like to thank the team at MobiDB for creating the database that was used to train metapredict V1. Check out their awesome stuff at [https://mobidb.bio.unipd.it](https://mobidb.bio.unipd.it)
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
## Copyright
|
|
154
|
+
Copyright (c) 2020-2024, Holehouse Lab - Washington University School of Medicine
|
|
155
|
+
|
|
156
|
+
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# metapredict: A machine learning-based tool for predicting protein disorder.
|
|
2
|
+
|
|
3
|
+
### Last updated November 2024
|
|
4
|
+
|
|
5
|
+
## Current default version: V3
|
|
6
|
+
In November 2024, we changed the default version of metapredict from V2 to V3. Small increments (3.0.x) may be made as bug fixes or feature enhancements.
|
|
7
|
+
|
|
8
|
+
For context, V3 provides major improvements to V2. Metapredict V3 uses a **new network to predict disorder** that in our benchmarks is the most accurate version to date. In addition, *V3 is backwards compatible with V2* and can be used as a drop-in replacement for V2. Although the Python API has been improved to massively simplify how you can use metapredict, we have **for the time being** updated it such that all previously created functions *should still work*. If they do not, please raise an issue and we will fix the problem ASAP!
|
|
9
|
+
|
|
10
|
+
## What are the major changes for metapredict V3?
|
|
11
|
+
|
|
12
|
+
1. **A new disorder prediction network**: Metapredict V3 uses a new (more accurate) network for disorder prediction. V1 and V2 are still available!
|
|
13
|
+
2. **A new pLDDT prediction network**: metapredict used to rely on an external package called [alphaPredict](https://github.com/ryanemenecker/alphaPredict) for pLDDT prediction. This same network is still available in metapredict when using ``meta.predict_pLDDT()`` by setting ``pLDDT_version=1``. However, the default V2 network is by all metrics better for pLDDT prediction, so we recommend using V2!
|
|
14
|
+
3. **Easier batch predictions**: V2 previously required you to use ``predict_disorder_batch()`` to take advantage of the 10-100x improvement in prediction speed on CPUs and GPUs. However, you can now use a single function - ``predict_disorder()`` - on individual sequences, lists of sequences, and dictionaries of sequences, and metapredict will automatically take care of the rest for you including running batch predictions if you input more than 1 sequence.
|
|
15
|
+
4. **Easier access to DisorderObject**. You can now return the ``DisorderObject`` by setting ``return_domains=True`` when using ``predict_disorder()``.
|
|
16
|
+
5. **Batch prediction for all**: Previously, batch predictions were only available for the V2 disorder prediction network of metapredict. Now, you can do batch predictions using all of the disorder prediction networks - V1 (previously called legacy), V2, and V3!
|
|
17
|
+
6. **Batch pLDDT predictions**: Batch predictions (and therefore the massive increases in prediction speed) are now available for pLDDT predictions using the `predict_pLDDT()` function.
|
|
18
|
+
7. **More device selection**: Newer versions of Torch (>2.0) support MacOS GPU utilization through the Metal Performance Shaders (MPS) framework, so you can now choose to use *mps* on MacOS.
|
|
19
|
+
8. **More clear device selection**: Metapredict used to fall back to using CPU for predictions if it failed to use GPU for whatever reason. This had good intentions but made troubleshooting GPU usage very tricky. Now if you specify using a specific device and it does not work, metapredict will not automatically fall back to CPU.
|
|
20
|
+
9. **Ability to get protein isoforms from Uniprot**: We updated ``metapredict-uniprot`` to work with the new version of [getSequence](https://github.com/ryanemenecker/getSequence), which enables you to input a valid Uniprot ID including designations for different protein isoforms. If you want to predict a sequence from the CLI using the name of the protein and the organism name (optional but recommended), please use ``metapredict-name`` as **``metapredict-uniprot`` will only work with valid Uniprot Accession numbers**.
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
## Installation
|
|
24
|
+
Metapredict is a software package written in Python. It can be installed from [PyPI](https://pypi.org/project/metapredict/) (the Python Package Index) using the tool `pip`. We always recommend managing your Python environment with conda. If these ideas are foreign to you, we recommend reading up a bit on Python package management and [conda](https://conda.io/projects/conda/en/latest/user-guide/getting-started.html) before continuing.
|
|
25
|
+
|
|
26
|
+
#### TL/DR: Recommended install commands are:
|
|
27
|
+
In most situations, the following two commands will ensure all the necessary dependencies are installed and work correctly:
|
|
28
|
+
```bash
|
|
29
|
+
# ensure dependencies are from the same ecosystem (conda)
|
|
30
|
+
conda install -c conda-forge -c pytorch python=3.11 numpy pytorch scipy cython matplotlib
|
|
31
|
+
|
|
32
|
+
# install from PyPI
|
|
33
|
+
pip install metapredict
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
To check the installation has worked run:
|
|
37
|
+
```bash
|
|
38
|
+
metapredict-predict-disorder --help
|
|
39
|
+
```
|
|
40
|
+
from the command line; this should yield help info on the `metapredict-predict-disorder` command.
|
|
41
|
+
|
|
42
|
+
#### WARNING: Segfault when mixing `conda` and `pip` installs (March 2024)
|
|
43
|
+
As of at least PyTorch 2.2.2 on macOS, there are binary incompatibilities between `pip` and `conda` versions of PyTorch and numpy. Therefore, it is essential your numpy and PyTorch installs are from the same package manager. metapredict will - by default - pull dependencies from PyPI. However, other packages installed from conda may require conda-dependent numpy installations, which can "brick" a previously-working installation.
|
|
44
|
+
|
|
45
|
+
#### WARNING: Problems with installing Torch with propert CUDA version (November 2024).
|
|
46
|
+
**This is only relevent if you are trying to run metapredict on a CUDA-enabled GPU!**
|
|
47
|
+
|
|
48
|
+
If you are on an older version of CUDA, a torch version that *does not have the correct CUDA version* will be installed. This can cause a segfault when running metapredict. To fix this, you need to install torch for your specific CUDA version. For example, to install PyTorch on Linux using pip with a CUDA version of 12.1, you would run:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
pip install torch --index-url https://download.pytorch.org/whl/cu121
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
To figure out which version of CUDA you currently have (assuming you have a CUDA-enabled GPU that is set up correctly), you need to run:
|
|
55
|
+
```bash
|
|
56
|
+
nvidia-smi
|
|
57
|
+
```
|
|
58
|
+
Which should return information about your GPU, NVIDIA driver version, and your CUDA version at the top.
|
|
59
|
+
|
|
60
|
+
Please see the [PyTorch install instructions](https://pytorch.org/get-started/locally/) for more info.
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
### Extended installation info
|
|
64
|
+
|
|
65
|
+
The current stable version of **metapredict** is available through GitHub or the Python Package Index (PyPI).
|
|
66
|
+
|
|
67
|
+
To install from PyPI, run:
|
|
68
|
+
```bash
|
|
69
|
+
pip install metapredict
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
You can also install the current development version from
|
|
73
|
+
```bash
|
|
74
|
+
pip install git+https://git@github.com/idptools/metapredict
|
|
75
|
+
```
|
|
76
|
+
To clone the GitHub repository and gain the ability to modify a local copy of the code, run
|
|
77
|
+
```bash
|
|
78
|
+
git clone https://github.com/idptools/metapredict.git
|
|
79
|
+
cd metapredict
|
|
80
|
+
pip install -e .
|
|
81
|
+
```
|
|
82
|
+
Note you will need the -e flag to ensure the `cython` code compiles correctly, but this also means the installed version is linked to the local version of the code.
|
|
83
|
+
|
|
84
|
+
This will install **metapredict** locally. If you modify the source code in the local repository, be sure to re-install with `pip`.
|
|
85
|
+
|
|
86
|
+
## Documentation
|
|
87
|
+
Documentation for metapredict V3 automatically builds from the `/doc` directory in this repository and is hosted at [https://metapredict.readthedocs.io/](https://metapredict.readthedocs.io/).
|
|
88
|
+
|
|
89
|
+
In brief, metapredict provides both command-line tools and a set of user-face functions from the metapredict python module. Both sets of tools are fully documented online.
|
|
90
|
+
|
|
91
|
+
## How can I use metapredict?
|
|
92
|
+
Metapredict can be used in five different ways:
|
|
93
|
+
|
|
94
|
+
1. As a stand-alone command-line tool (installable via pip - the code in this repository).
|
|
95
|
+
2. As a Python library for integrating into your favorite bioinformatics pipeline (installable via pip - the code in this repository).
|
|
96
|
+
3. As a web-server for examining disorder predictions on individual sequences found at [https://metapredict.net/](https://metapredict.net/).
|
|
97
|
+
4. *NEW as of August 2022:* as a Google Colab notebook for batch-predicting disorder scores for larger numbers of sequences: [**LINK HERE**](https://colab.research.google.com/github/idptools/metapredict/blob/master/colab/metapredict_colab.ipynb). Performance-wise, batch mode can predict the entire yeast proteome in ~1.5 min using the Colab Notebook and much faster if using a local GPU.
|
|
98
|
+
5. *NEW as of May 2023:* as part of the [ALBATROSS paper](https://www.nature.com/articles/s41592-023-02159-5), we provide a colab notebook for predicting IDRs on a proteome-wide scale [**LINK HERE**](https://colab.research.google.com/github/holehouse-lab/ALBATROSS-colab/blob/main/idrome_constructor/idrome_constructor.ipynb).
|
|
99
|
+
|
|
100
|
+
## How to cite
|
|
101
|
+
|
|
102
|
+
If you use metapredict for your work, please cite the metapredict paper:
|
|
103
|
+
|
|
104
|
+
Emenecker, R. J., Griffith, D. & Holehouse, A. S. Metapredict: a fast, accurate, and easy-to-use predictor of consensus disorder and structure. Biophys. J. 120, 4312–4319 (2021).
|
|
105
|
+
|
|
106
|
+
Note that in addition to the [original paper](https://www.cell.com/biophysj/fulltext/S0006-3495(21)00725-6), there's a [V2 preprint](https://www.biorxiv.org/content/10.1101/2022.06.06.494887v2); HOWEVER, we ask you only cite the original paper and describe the version being used (V1, V2, V2-FF, or V3).
|
|
107
|
+
|
|
108
|
+
We are hoping to get a paper out for V3 in the near future (we will update this section once the V3 paper is available)...
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
## Changes
|
|
112
|
+
|
|
113
|
+
For changes see the `changelog.md` file in this directory or check them out in Github [here](https://github.com/idptools/metapredict/blob/master/changelog.md).
|
|
114
|
+
|
|
115
|
+
## Running tests
|
|
116
|
+
Note that to run tests you must compile the cython code in place. We suggest doing this by running the following set of commands:
|
|
117
|
+
```bash
|
|
118
|
+
pip uninstall metapredict; rm -rf build dist *.egg-info; python -m build; pip install .*
|
|
119
|
+
```
|
|
120
|
+
## Acknowledgements
|
|
121
|
+
|
|
122
|
+
A modified version of PARROT, created by Dan Griffith, was used to generate the network used for metapredict V3. The original implementation of PARROT was used to generate the V1 and V2 networks. See [https://pypi.org/project/idptools-parrot/](https://pypi.org/project/idptools-parrot/) for some very cool machine learning stuff. You can also check out the [PARROT paper](https://elifesciences.org/articles/70576).
|
|
123
|
+
|
|
124
|
+
In addition to using Dan Griffith's tool for creating metapredict, the original code for `encode_sequence.py` was written by Dan.
|
|
125
|
+
|
|
126
|
+
We would like to thank the **DeepMind** team for developing AlphaFold2 and EBI/UniProt for making these data so readily available.
|
|
127
|
+
|
|
128
|
+
We would also like to thank the team at MobiDB for creating the database that was used to train metapredict V1. Check out their awesome stuff at [https://mobidb.bio.unipd.it](https://mobidb.bio.unipd.it)
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
## Copyright
|
|
132
|
+
Copyright (c) 2020-2024, Holehouse Lab - Washington University School of Medicine
|
|
133
|
+
|
|
134
|
+
|
|
@@ -1,6 +1,33 @@
|
|
|
1
1
|
## Changelog
|
|
2
2
|
This section is a log of recent changes with metapredict. My hope is that as I change things, this section can help you figure out why a change was made and if it will break any of your current workflows. The first major changes were made for the 0.56 release, so tracking will start there. Reasons are not provided for bug fixes for because the reason can assumed to be fixing the bug...
|
|
3
3
|
|
|
4
|
+
#### V3.0 (November 2024)
|
|
5
|
+
Changes:
|
|
6
|
+
|
|
7
|
+
* Made the default pLDDT prediction network V2
|
|
8
|
+
|
|
9
|
+
* Removed alphaPredict as a dependency
|
|
10
|
+
|
|
11
|
+
* Made the default disorder prediction network V3
|
|
12
|
+
|
|
13
|
+
* Updated user-facing pLDDT predictions to allow specification of pLDDT network
|
|
14
|
+
|
|
15
|
+
* Added compatibility for doing batch predictions of pLDDT
|
|
16
|
+
|
|
17
|
+
* Added new pLDDT prediction network (V2)
|
|
18
|
+
|
|
19
|
+
* Overhaul of backend to accomadate pytorch-lightning architecture
|
|
20
|
+
|
|
21
|
+
* Massive change to how predictor is implemented. You can now do batch prediction on CPU, GPU (CUDA), or Mac GPU (MPS) for V1 (legacy), V2, and V3.
|
|
22
|
+
|
|
23
|
+
* Update to user-facing docs to make changes of setting 'legacy=True' to specifying "version='V#'" when using different version of metapredict.
|
|
24
|
+
|
|
25
|
+
* Update to metapredict-uniprot to work with new version of getSequence. Allows for getting different protein isoforms if specified.
|
|
26
|
+
|
|
27
|
+
* Update to how networks used in metapredict are tracked. Now everything needs to be added to /backend/network_parameters.py to maintain compatibility between old and future networks.
|
|
28
|
+
|
|
29
|
+
* Reimplementation of pack-n-pad. Due to larger batch size in V3 network, it will likely be more useful to have fewer batches by using packing and padding instead of size collection under some scenarios.
|
|
30
|
+
|
|
4
31
|
#### V2.65 (October 2024)
|
|
5
32
|
Changes:
|
|
6
33
|
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
*********************************
|
|
2
|
+
Getting Started with metapredict
|
|
3
|
+
*********************************
|
|
4
|
+
|
|
5
|
+
What is metapredict?
|
|
6
|
+
====================
|
|
7
|
+
**metapredict** is a software tool to predict intrinsically disordered regions in protein sequences. It is provided as a downloadable Python tool that includes a Python application programming interface (API) and a set of command-line tools for working with FASTA files.
|
|
8
|
+
|
|
9
|
+
Our goal in building **metapredict** was to develop a robust, accurate, and high-performance predictor of intrinsic disorder that is also easy to install and use. As such, **metapredict** is implemented in Python and can be installed directly via `pip` (see below).
|
|
10
|
+
|
|
11
|
+
metapredict is ALSO available via a `webserver for single sequence prediction <http://https://metapredict.net>`__ and `a Google Colab notebook for batch prediction <https://colab.research.google.com/github/idptools/metapredict/blob/master/colab/metapredict_colab.ipynb>`__. However, this documentation here focuses on the Python package which provides both a set of Python library functions and a set of command-line tools.
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
Recent metapredict updates and news
|
|
15
|
+
====================================
|
|
16
|
+
|
|
17
|
+
November 2024: Update to default version (metapredict V3)
|
|
18
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
19
|
+
|
|
20
|
+
In November 2024, we changed the default version of metapredict from V2 to V3. Small increments (3.0.x) may be made as bug fixes or feature enhancements.
|
|
21
|
+
|
|
22
|
+
For context, V3 provides major improvements to V2. Metapredict V3 uses a **new network to predict disorder** that in our benchmarks is the most accurate version to date. In addition, *V3 is backwards compatible with V2* and can be used as a drop-in replacement for V2. Although the Python API has been improved to massively simplify how you can use metapredict, we have **for the time being** updated it such that all previously created functions *should still work*. If they do not, please raise an issue and we will fix the problem ASAP!
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
What are the major changes for metapredict V3?
|
|
26
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
27
|
+
|
|
28
|
+
#. **A new disorder prediction network**\ : Metapredict V3 uses a new (more accurate) network for disorder prediction. V1 and V2 are still available!
|
|
29
|
+
#. **A new pLDDT prediction network**\ : metapredict used to rely on an external package called `alphaPredict <https://github.com/ryanemenecker/alphaPredict>`_ for pLDDT prediction. This same network is still available in metapredict when using ``meta.predict_pLDDT()`` by setting ``pLDDT_version=1``. However, the default V2 network is by all metrics better for pLDDT prediction, so we recommend using V2!
|
|
30
|
+
#. **Easier batch predictions**\ : V2 previously required you to use ``predict_disorder_batch()`` to take advantage of the 10-100x improvement in prediction speed on CPUs and GPUs. However, you can now use a single function - ``predict_disorder()`` - on individual sequences, lists of sequences, and dictionaries of sequences, and metapredict will automatically take care of the rest for you including running batch predictions if you input more than 1 sequence.
|
|
31
|
+
#. **Easier access to DisorderObject**. You can now return the ``DisorderObject`` by setting ``return_domains=True`` when using ``predict_disorder()``.
|
|
32
|
+
#. **Batch prediction for all**\ : Previously, batch predictions were only available for the V2 disorder prediction network of metapredict. Now, you can do batch predictions using all of the disorder prediction networks - V1 (previously called legacy), V2, and V3!
|
|
33
|
+
#. **Batch pLDDT predictions**\ : Batch predictions (and therefore the massive increases in prediction speed) are now available for pLDDT predictions using the ``predict_pLDDT()`` function.
|
|
34
|
+
#. **More device selection**\ : Newer versions of Torch (>2.0) support MacOS GPU utilization through the Metal Performance Shaders (MPS) framework, so you can now choose to use *mps* on MacOS.
|
|
35
|
+
#. **More clear device selection**\ : Metapredict used to fall back to using CPU for predictions if it failed to use GPU for whatever reason. This had good intentions but made troubleshooting GPU usage very tricky. Now if you specify using a specific device and it does not work, metapredict will not automatically fall back to CPU.
|
|
36
|
+
#. **Ability to get protein isoforms from Uniprot**\ : We updated ``metapredict-uniprot`` to work with the new version of `getSequence <https://github.com/ryanemenecker/getSequence>`_\ , which enables you to input a valid Uniprot ID including designations for different protein isoforms. If you want to predict a sequence from the CLI using the name of the protein and the organism name (optional but recommended), please use ``metapredict-name`` as **\ ``metapredict-uniprot`` will only work with valid Uniprot Accession numbers**.
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
Installation
|
|
40
|
+
=============
|
|
41
|
+
|
|
42
|
+
Metapredict is a software package written in Python. It can be installed from `PyPI <https://pypi.org/project/metapredict/>`_ (the Python Package Index) using the tool ``pip``. We always recommend managing your Python environment with conda. If these ideas are foreign to you, we recommend reading up a bit on Python package management and `conda <https://conda.io/projects/conda/en/latest/user-guide/getting-started.html>`_ before continuing.
|
|
43
|
+
|
|
44
|
+
TL/DR: Recommended install commands are:
|
|
45
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
46
|
+
|
|
47
|
+
In most situations, the following two commands will ensure all the necessary dependencies are installed and work correctly:
|
|
48
|
+
|
|
49
|
+
.. code-block:: bash
|
|
50
|
+
|
|
51
|
+
# ensure dependencies are from the same ecosystem (conda)
|
|
52
|
+
conda install -c conda-forge -c pytorch python=3.11 numpy pytorch scipy cython matplotlib
|
|
53
|
+
|
|
54
|
+
# install from PyPI
|
|
55
|
+
pip install metapredict
|
|
56
|
+
|
|
57
|
+
To check the installation has worked run:
|
|
58
|
+
|
|
59
|
+
.. code-block:: bash
|
|
60
|
+
|
|
61
|
+
metapredict-predict-disorder --help
|
|
62
|
+
|
|
63
|
+
from the command line; this should yield help info on the ``metapredict-predict-disorder`` command.
|
|
64
|
+
|
|
65
|
+
WARNING: Segfault when mixing ``conda`` and ``pip`` installs (March 2024)
|
|
66
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
67
|
+
|
|
68
|
+
As of at least PyTorch 2.2.2 on macOS, there are binary incompatibilities between ``pip`` and ``conda`` versions of PyTorch and numpy. Therefore, it is essential your numpy and PyTorch installs are from the same package manager. metapredict will - by default - pull dependencies from PyPI. However, other packages installed from conda may require conda-dependent numpy installations, which can "brick" a previously-working installation.
|
|
69
|
+
|
|
70
|
+
WARNING: Problems with installing Torch with propert CUDA version (November 2024).
|
|
71
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
72
|
+
|
|
73
|
+
**This is only relevent if you are trying to run metapredict on a CUDA-enabled GPU!**
|
|
74
|
+
|
|
75
|
+
If you are on an older version of CUDA, a torch version that *does not have the correct CUDA version* will be installed. This can cause a segfault when running metapredict. To fix this, you need to install torch for your specific CUDA version. For example, to install PyTorch on Linux using pip with a CUDA version of 12.1, you would run:
|
|
76
|
+
|
|
77
|
+
.. code-block:: bash
|
|
78
|
+
|
|
79
|
+
pip install torch --index-url https://download.pytorch.org/whl/cu121
|
|
80
|
+
|
|
81
|
+
To figure out which version of CUDA you currently have (assuming you have a CUDA-enabled GPU that is set up correctly), you need to run:
|
|
82
|
+
|
|
83
|
+
.. code-block:: bash
|
|
84
|
+
|
|
85
|
+
nvidia-smi
|
|
86
|
+
|
|
87
|
+
Which should return information about your GPU, NVIDIA driver version, and your CUDA version at the top.
|
|
88
|
+
|
|
89
|
+
Please see the `PyTorch install instructions <https://pytorch.org/get-started/locally/>`_ for more info.
|
|
90
|
+
|
|
91
|
+
Extended installation info
|
|
92
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
93
|
+
|
|
94
|
+
The current stable version of **metapredict** is available through GitHub or the Python Package Index (PyPI).
|
|
95
|
+
|
|
96
|
+
To install from PyPI, run:
|
|
97
|
+
|
|
98
|
+
.. code-block:: bash
|
|
99
|
+
|
|
100
|
+
pip install metapredict
|
|
101
|
+
|
|
102
|
+
You can also install the current development version from
|
|
103
|
+
|
|
104
|
+
.. code-block:: bash
|
|
105
|
+
|
|
106
|
+
pip install git+https://git@github.com/idptools/metapredict
|
|
107
|
+
|
|
108
|
+
To clone the GitHub repository and gain the ability to modify a local copy of the code, run
|
|
109
|
+
|
|
110
|
+
.. code-block:: bash
|
|
111
|
+
|
|
112
|
+
git clone https://github.com/idptools/metapredict.git
|
|
113
|
+
cd metapredict
|
|
114
|
+
pip install -e .
|
|
115
|
+
|
|
116
|
+
Note you will need the -e flag to ensure the ``cython`` code compiles correctly, but this also means the installed version is linked to the local version of the code.
|
|
117
|
+
|
|
118
|
+
This will install **metapredict** locally. If you modify the source code in the local repository, be sure to re-install with ``pip``.
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
About metapredict
|
|
122
|
+
====================
|
|
123
|
+
It's important to understand how tools were built and developed. Below we provide a quick overview of how metapredict works and was trained.
|
|
124
|
+
|
|
125
|
+
How does metapredict work?
|
|
126
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
127
|
+
**metapredict** uses a machine-learning network to generate per-residue scores from amino acid sequences that reflect the likelihood that the residue is disordered.
|
|
128
|
+
|
|
129
|
+
How was metapredict V1 trained?
|
|
130
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
131
|
+
|
|
132
|
+
**metapredict V1** is a deep-learning-based predictor trained on consensus disorder data from 8 different predictors, as pre-computed and provided by `MobiDB <https://mobidb.bio.unipd.it/>`_. Functionally, this means each residue is assigned a score between 0 and 1 which reflects the confidence we have that the residue is disordered (or not). If the score was 0.5, this means half of the predictors predict that residue to be disordered. In this way, **metapredict V1** can determine the likelihood that residues are disordered by giving you an approximation of what other predictors would predict (things got pretty 'meta' there, hence the name **metapredict**).
|
|
133
|
+
|
|
134
|
+
Note that metapredict V1 predictions are available via the :code:`--version 1` from the CLI or :code: version=1 in Python.
|
|
135
|
+
|
|
136
|
+
How was metapredict V2 trained?
|
|
137
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
138
|
+
V2 was trained by generating an initial hybrid score that combined *predicted* AlphaFold2 pLDDT scores (pLDDT network V1) with consensus disorder (metapredict disorder scores V1) along with some signal process algorithms to make a new structure/disorder consensus prediction. Finally, we trained a new deep learning network to predict our hybrid network (meta meta), substantially improving accuracy with very little loss in performance.
|
|
139
|
+
|
|
140
|
+
These changes and new assessment of performance are available in our preprint: `An update to metapredict, a fast, accurate, and easy-to-use predictor of consensus disorder and structure. <https://www.biorxiv.org/content/10.1101/2022.06.06.494887v2>`_ In bioRxiv (p. 2022.06.06.494887). https://doi.org/10.1101/2022.06.06.494887
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
How does metapredict V2 differ from V2-FF
|
|
144
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
145
|
+
|
|
146
|
+
metapredict V2 and V2-FF are identical in terms of predictions and features, with the major difference being that metapredict V2-FF offers batched predictions. Batched predictions are automatically parallelized on either the CPU or GPU. In addition, we rewrote the metapredict domain decomposition algorithm in C to provide a 10-20x improvement in performance for this step.
|
|
147
|
+
|
|
148
|
+
We note that V2-FF was released after CAID, so the performance reported there is the V2 network performance. Because metapredict V2-FF is implemented in a `Google Colab notebook for batch prediction <https://colab.research.google.com/github/idptools/metapredict/blob/master/colab/metapredict_colab.ipynb>`__ you don't have to take our word for it that it's fast; just upload a proteome and see for yourself!
|
|
149
|
+
|
|
150
|
+
What is new as far as the disorder prediction in V3?
|
|
151
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
152
|
+
|
|
153
|
+
V2 and V3 are fairly similar given that they have the same underlying disorder prdiction approach in that both networks combine V1 consensus disorder scores and AlphaFold2 (AF2) pLDDT scores in some way to come up with a final 'disorder prediction score'. However, there are some important difference between V2 and V3 that allowed us to make a more accurate network. First, V3 was made at a time when **many more** AF2 structures (and therefore their AF2 pLDDT scores) were available. This allowed us to combine metapredict V1 scores with the *actual AF2 pLDDT scores* as opposed to V2 where we had to use *predicted pLDDT scores*. Second, we now have more powerful computational hardware available to us, allowing us to train on a larger dataset. Third, we used more advanced approaches to hyperparamter optimization during training. All of this allowed us to make a more accurate network for V3.
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
Generating predicted pLDDT (AlphaFold2 confidence) scores in metapredict
|
|
157
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
158
|
+
In addition to predicting disorder scores, metapredict offers predicted confidence scores from AlphaFold2. These confidence scores measure the local confidence that AlphaFold2 has in its predicted structure. The scores go from 0-100 where 0 represents low confidence and 100 represents high confidence. For more information, please see: *Highly accurate protein structure prediction with AlphaFold* https://doi.org/10.1038/s41586-021-03819-2. In describing these scores, the team states that regions with pLDDT scores of less than 50 should not be interpreted except as *possible* disordered regions.
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
What might the predicted confidence scores from AlphaFold2 be used for?
|
|
162
|
+
-----------------------------------------------------------------------------
|
|
163
|
+
These scores can be used for many applications such as generating a quick preview of which regions of your protein of interest AF2 might be able to predict with high confidence, or which regions of your protein *might* be disordered.
|
|
164
|
+
|
|
165
|
+
AF2 is not (strictly speaking) a disorder predictor, and the confidence scores are not directly representative of protein disorder. Therefore, any conclusions drawn with regards to disorder from predicted AF2 confidence scores should be interpreted with care, but they may be able to provide an additional metric to assess the likelihood that any given protein region may be disordered.
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
Why is metapredict useful?
|
|
169
|
+
===========================
|
|
170
|
+
We think **metapredict** is useful for three main reasons.
|
|
171
|
+
|
|
172
|
+
1. It's highly accurate and provides strong boundaries between disordered and folded regions.
|
|
173
|
+
2. It's incredibly fast; on CPUs one can predict every IDR in the human proteome in ~2.5 minutes. On modest GPUs one can predict every IDR in the human proteome in under 5 seconds. This stands in stark contrast to other predictors which place length caps on sequences and can take hours per sequence.
|
|
174
|
+
3. It is easy to use and is distributed via a wide range of channels. In addition to this Python package, metapredict is distributed as a stand-alone webserver **(see: https://metapredict.net/ )**, colab notebooks for large-scale predictions, and as an `API for SHEPHARD <https://shephard.readthedocs.io/en/latest/apis.html#metapredict>`__, our general-purpose toolkit for working with an annotating large protein datasets. This Python package further implements metapredict as both Python modules and as a set of command-line tools.
|
|
175
|
+
|
|
176
|
+
In summary, we believe metapredict provides the three key ingredients of a useful disorder predictor: it's extremely accurate, it's incredibly fast, and it's very easy to use.
|
|
177
|
+
|
|
178
|
+
How to cite
|
|
179
|
+
===========================
|
|
180
|
+
|
|
181
|
+
If you use metapredict for your work, please cite the metapredict paper:
|
|
182
|
+
|
|
183
|
+
Emenecker, R. J., Griffith, D. & Holehouse, A. S. Metapredict: a fast, accurate, and easy-to-use predictor of consensus disorder and structure. Biophys. J. 120, 4312–4319 (2021).
|
|
184
|
+
|
|
185
|
+
Note that in addition to the `original paper <https://www.cell.com/biophysj/fulltext/S0006-3495(21>`_\ 00725-6), there's a `V2 preprint <https://www.biorxiv.org/content/10.1101/2022.06.06.494887v2>`_\ ; HOWEVER, we ask you only cite the original paper and describe the version being used (V1, V2, V2-FF, or V3).
|
|
186
|
+
|
|
187
|
+
We are hoping to get a paper out for V3 in the near future (we will update this section once the V3 paper is available)...
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
Known installation issues
|
|
192
|
+
====================================
|
|
193
|
+
|
|
194
|
+
Below we include documentation on known issues.
|
|
195
|
+
|
|
196
|
+
macOS libiomp clash
|
|
197
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
198
|
+
|
|
199
|
+
PyTorch currently ships with its own version of the OpenMP library (``libiomp.dylib``). Unfortunately when numpy is installed from ``conda`` (although not from ``pip``) this leads to a collision because the ``conda``-derived numpy library also includes a local copy of the ``libiomp5.dylib`` library. This leads to the following error message (included here for google-ability).
|
|
200
|
+
|
|
201
|
+
.. code-block:: none
|
|
202
|
+
|
|
203
|
+
OMP: Error #15: Initializing libiomp5.dylib, but found libomp.dylib already initialized.
|
|
204
|
+
OMP: Hint This means that multiple copies of the OpenMP runtime have been linked into the program.
|
|
205
|
+
That is dangerous, since it can degrade performance or cause incorrect results. The best thing to
|
|
206
|
+
do is to ensure that only a single OpenMP runtime is linked into the process, e.g. by avoiding static
|
|
207
|
+
linking of the OpenMP runtime in any library. As an unsafe, unsupported, undocumented workaround you
|
|
208
|
+
can set the environment variable KMP_DUPLICATE_LIB_OK=TRUE to allow the program to continue to execute,
|
|
209
|
+
but that may cause crashes or silently produce incorrect results. For more information,
|
|
210
|
+
please see http://www.intel.com/software/products/support/.
|
|
211
|
+
|
|
212
|
+
To avoid this error we make the executive decision to ignore this clash. This has largely not appeared to have any deleterious issues on performance or accuracy across the tests run. If you are uncomfortable with this then the code in ``metapredict/__init__.py`` can be edited with ``IGNORE_LIBOMP_ERROR`` set to ``False`` and **metapredict** re-installed from the source directory.
|
|
213
|
+
|
|
214
|
+
Testing
|
|
215
|
+
========
|
|
216
|
+
|
|
217
|
+
To see if your installation of **metapredict** is working properly, you can run the unit test included in the package by navigating to the metapredict/tests folder within the installation directory and running:
|
|
218
|
+
|
|
219
|
+
.. code-block:: bash
|
|
220
|
+
|
|
221
|
+
$ pytest -v
|
|
222
|
+
|
|
223
|
+
Example datasets
|
|
224
|
+
==================
|
|
225
|
+
|
|
226
|
+
Example data that can be used with metapredict can be found in the metapredict/data folder on GitHub. The example data set is just a .fasta file containing 5 protein sequences.
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
Previous updates
|
|
230
|
+
==================
|
|
231
|
+
|
|
232
|
+
May 2023: Update to default version (metapredict V2-FF)
|
|
233
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
234
|
+
|
|
235
|
+
As of May 2023, we have pushed our improved version metapredict V2-FF. metapredict V2-FF does not change any of the predictions, but does implement substantial performance improvements. Notably these are realized by using the :code:`predict_disorder_batch()` function.
|
|
236
|
+
|
|
237
|
+
February 2022: Update to default version (metapredict V2)
|
|
238
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
239
|
+
|
|
240
|
+
As of February 15, 2022 we have updated metapredict to V2. This comes with important changes that improve the accuracy of metapredict. Please see the section on the update *Major update to metapredict predictions to increase overall accuracy* below. In addition, this update changes the functionality of the *predict_disorder_domains()* function, so please read the documentation on that function if you were using it previously.
|
|
241
|
+
|
|
242
|
+
These changes are detailed in a `permanent preprint <https://www.biorxiv.org/content/10.1101/2022.06.06.494887v2>`_ that lives on bioRxiv. We ask you still cite the original metapredict article rather than this preprint.
|
|
243
|
+
|
|
244
|
+
July 2021: Initial version (metapredict v1)
|
|
245
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
246
|
+
The initial version of metapredict was released in July 2021 with the corresponding paper published shortly thereafter in Biophysical Journal:
|
|
247
|
+
|
|
248
|
+
Emenecker, R. J., Griffith, D. & Holehouse, A. S. Metapredict: a fast, accurate, and easy-to-use predictor of consensus disorder and structure. Biophys. J. 120, 4312–4319 (2021).
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
####### requirements.txt #######
|
|
3
3
|
#
|
|
4
4
|
###### Requirements without Version Specifiers ######
|
|
5
|
+
versioningit
|
|
6
|
+
sphinx_rtd_theme
|
|
5
7
|
numpy
|
|
6
8
|
torch
|
|
7
9
|
argparse
|
|
@@ -10,8 +12,9 @@ protfasta
|
|
|
10
12
|
scipy
|
|
11
13
|
urllib3
|
|
12
14
|
tqdm
|
|
15
|
+
getSequence
|
|
16
|
+
pytorch_lightning
|
|
13
17
|
#
|
|
14
18
|
###### Requirements with Version Specifiers ######
|
|
15
19
|
# See https://www.python.org/dev/peps/pep-0440/#version-specifiers
|
|
16
20
|
#
|
|
17
|
-
alphaPredict == 1.0
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Acknowledgements
|
|
2
|
+
=================
|
|
3
|
+
|
|
4
|
+
A modified version of PARROT, created by Dan Griffith, was used to generate the network used for metapredict V3. The original implementation of PARROT was used to generate the V1 and V2 networks. See `https://pypi.org/project/idptools-parrot/ <https://pypi.org/project/idptools-parrot/>`_ for some very cool machine learning stuff. You can also check out the `PARROT paper <https://elifesciences.org/articles/70576>`_.
|
|
5
|
+
|
|
6
|
+
In addition to using Dan Griffith's tool for creating metapredict, the original code for ``encode_sequence.py`` was written by Dan.
|
|
7
|
+
|
|
8
|
+
We would like to thank the **DeepMind** team for developing AlphaFold2 and EBI/UniProt for making these data so readily available.
|
|
9
|
+
|
|
10
|
+
We would also like to thank the team at MobiDB for creating the database that was used to train metapredict V1. Check out their awesome stuff at `https://mobidb.bio.unipd.it <https://mobidb.bio.unipd.it>`_
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
Contributors
|
|
14
|
+
---------------
|
|
15
|
+
|
|
16
|
+
We'd also like to thank the following folks who have contribute code, reported errors, and suggested changes.
|
|
17
|
+
|
|
18
|
+
* The Fried lab (broadly defined)
|
|
19
|
+
* Broder Schmidt
|
|
20
|
+
* Sean Cascarina
|
|
21
|
+
* Keith Cheveralls
|
|
22
|
+
* Henrik Åhl for help with py3.12 compatibility.
|