metapredict 3.0.2__tar.gz → 3.1.1__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.
Files changed (181) hide show
  1. {metapredict-3.0.2 → metapredict-3.1.1}/.gitignore +7 -0
  2. metapredict-3.1.1/MANIFEST.in +17 -0
  3. metapredict-3.1.1/PKG-INFO +275 -0
  4. metapredict-3.1.1/README.md +236 -0
  5. metapredict-3.1.1/changelog.md +321 -0
  6. metapredict-3.1.1/devtools/README.md +136 -0
  7. metapredict-3.1.1/docs/changes.rst +4 -0
  8. {metapredict-3.0.2 → metapredict-3.1.1}/docs/getting_started.rst +84 -26
  9. metapredict-3.1.1/docs/how_to_cite.rst +12 -0
  10. metapredict-3.1.1/docs/index.rst +46 -0
  11. {metapredict-3.0.2 → metapredict-3.1.1}/docs/requirements.txt +4 -5
  12. metapredict-3.1.1/docs/usage/api.rst +94 -0
  13. {metapredict-3.0.2 → metapredict-3.1.1}/docs/usage/command-line.rst +197 -31
  14. metapredict-3.1.1/docs/usage/troubleshooting.rst +67 -0
  15. {metapredict-3.0.2 → metapredict-3.1.1}/docs/usage/using-in-python.rst +541 -91
  16. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/__init__.py +43 -31
  17. metapredict-3.1.1/metapredict/_version.py +1 -0
  18. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/backend/architectures.py +59 -5
  19. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/backend/data_structures.py +17 -13
  20. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/backend/domain_definition.py +59 -17
  21. metapredict-3.1.1/metapredict/backend/encode_sequence.py +74 -0
  22. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/backend/meta_graph.py +2 -2
  23. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/backend/meta_tools.py +211 -16
  24. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/backend/network_parameters.py +19 -4
  25. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/backend/predictor.py +487 -177
  26. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/meta.py +626 -222
  27. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/parameters.py +6 -0
  28. metapredict-3.1.1/metapredict/scripts/__init__.py +289 -0
  29. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/scripts/metapredict_caid.py +32 -6
  30. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/scripts/metapredict_graph_disorder.py +45 -15
  31. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/scripts/metapredict_graph_pLDDT.py +32 -13
  32. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/scripts/metapredict_name.py +26 -8
  33. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/scripts/metapredict_predict_disorder.py +17 -4
  34. metapredict-3.1.1/metapredict/scripts/metapredict_predict_idrs.py +184 -0
  35. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/scripts/metapredict_predict_pLDDT.py +29 -10
  36. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/scripts/metapredict_quick_graph.py +8 -0
  37. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/scripts/metapredict_quick_predict.py +7 -0
  38. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/scripts/metapredict_uniprot.py +38 -19
  39. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/tests/__init__.py +11 -7
  40. metapredict-3.1.1/metapredict/tests/cli_tests/__init__.py +72 -0
  41. metapredict-3.1.1/metapredict/tests/cli_tests/test_batch_size_option.py +175 -0
  42. metapredict-3.1.1/metapredict/tests/cli_tests/test_cli_errors.py +435 -0
  43. metapredict-3.1.1/metapredict/tests/cli_tests/test_metapredict-predict-disorder.py +115 -0
  44. metapredict-3.1.1/metapredict/tests/cli_tests/test_metapredict-predict-idrs.py +117 -0
  45. metapredict-3.1.1/metapredict/tests/input_data/generate_ground_truth.py +78 -0
  46. metapredict-3.1.1/metapredict/tests/input_data/ground_truth_500_seqs.fasta +5872 -0
  47. metapredict-3.1.1/metapredict/tests/input_data/ground_truth_500_v1_cpu.npy +0 -0
  48. metapredict-3.1.1/metapredict/tests/input_data/ground_truth_500_v1_mps.npy +0 -0
  49. metapredict-3.1.1/metapredict/tests/input_data/ground_truth_500_v2_cpu.npy +0 -0
  50. metapredict-3.1.1/metapredict/tests/input_data/ground_truth_500_v2_mps.npy +0 -0
  51. metapredict-3.1.1/metapredict/tests/input_data/ground_truth_500_v3_cpu.npy +0 -0
  52. metapredict-3.1.1/metapredict/tests/input_data/ground_truth_500_v3_mps.npy +0 -0
  53. metapredict-3.1.1/metapredict/tests/pytest.ini +1 -0
  54. metapredict-3.1.1/metapredict/tests/test_batch_consistency.py +79 -0
  55. metapredict-3.1.1/metapredict/tests/test_batch_size.py +149 -0
  56. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/tests/test_batch_vs_single.py +26 -15
  57. metapredict-3.1.1/metapredict/tests/test_bug_regressions.py +401 -0
  58. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/tests/test_caid_output.py +40 -2
  59. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/tests/test_cython_v_python.py +8 -4
  60. metapredict-3.1.1/metapredict/tests/test_device_defaults.py +109 -0
  61. metapredict-3.1.1/metapredict/tests/test_ground_truth_regression.py +39 -0
  62. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/tests/test_metapredict.py +8 -3
  63. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/tests/test_metapredict_CPU_GPU.py +149 -3
  64. metapredict-3.1.1/metapredict/tests/test_predict_disorder_stream.py +279 -0
  65. metapredict-3.1.1/metapredict.egg-info/PKG-INFO +275 -0
  66. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict.egg-info/SOURCES.txt +19 -16
  67. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict.egg-info/requires.txt +5 -6
  68. metapredict-3.1.1/pyproject.toml +155 -0
  69. metapredict-3.1.1/setup.cfg +4 -0
  70. metapredict-3.1.1/setup.py +36 -0
  71. metapredict-3.0.2/.lgtm.yml +0 -9
  72. metapredict-3.0.2/.travis.yml +0 -51
  73. metapredict-3.0.2/MANIFEST.in +0 -10
  74. metapredict-3.0.2/PKG-INFO +0 -156
  75. metapredict-3.0.2/README.md +0 -134
  76. metapredict-3.0.2/changelog.md +0 -249
  77. metapredict-3.0.2/devtools/README.md +0 -59
  78. metapredict-3.0.2/devtools/travis-ci/before_install.sh +0 -39
  79. metapredict-3.0.2/docs/changes.rst +0 -4
  80. metapredict-3.0.2/docs/how_to_cite.rst +0 -11
  81. metapredict-3.0.2/docs/index.rst +0 -23
  82. metapredict-3.0.2/docs/usage/api.rst +0 -25
  83. metapredict-3.0.2/docs/usage/troubleshooting.rst +0 -49
  84. metapredict-3.0.2/metapredict/_version.py +0 -1
  85. metapredict-3.0.2/metapredict/analysis/caid1_and_2_disorder_pdb.fasta +0 -3000
  86. metapredict-3.0.2/metapredict/analysis/caid1_disorder_pdb.fasta +0 -1956
  87. metapredict-3.0.2/metapredict/analysis/caid2_analysis.py +0 -379
  88. metapredict-3.0.2/metapredict/analysis/caid2_disorder_pdb.fasta +0 -1044
  89. metapredict-3.0.2/metapredict/analysis/seq_caid_plddt.tsv +0 -794
  90. metapredict-3.0.2/metapredict/analysis/test_different_predictors.py +0 -263
  91. metapredict-3.0.2/metapredict/backend/creating_V2_and_V3_scores.py +0 -320
  92. metapredict-3.0.2/metapredict/backend/cython/domain_definition.c +0 -33859
  93. metapredict-3.0.2/metapredict/backend/encode_sequence.py +0 -59
  94. metapredict-3.0.2/metapredict/scripts/__init__.py +0 -0
  95. metapredict-3.0.2/metapredict/scripts/metapredict_predict_idrs.py +0 -141
  96. metapredict-3.0.2/metapredict/tests/cli_tests/__init__.py +0 -42
  97. metapredict-3.0.2/metapredict/tests/cli_tests/test_metapredict-predict-disorder.py +0 -175
  98. metapredict-3.0.2/metapredict/tests/cli_tests/test_metapredict-predict-idrs.py +0 -196
  99. metapredict-3.0.2/metapredict/tests/pytest.ini +0 -2
  100. metapredict-3.0.2/metapredict.egg-info/PKG-INFO +0 -156
  101. metapredict-3.0.2/pyproject.toml +0 -76
  102. metapredict-3.0.2/readthedocs.yml +0 -36
  103. metapredict-3.0.2/setup.cfg +0 -20
  104. metapredict-3.0.2/setup.py +0 -25
  105. {metapredict-3.0.2 → metapredict-3.1.1}/.codecov.yml +0 -0
  106. {metapredict-3.0.2 → metapredict-3.1.1}/CODE_OF_CONDUCT.md +0 -0
  107. {metapredict-3.0.2 → metapredict-3.1.1}/CONTRIBUTING.md +0 -0
  108. {metapredict-3.0.2 → metapredict-3.1.1}/LICENSE +0 -0
  109. {metapredict-3.0.2 → metapredict-3.1.1}/colab/metapredict_colab.ipynb +0 -0
  110. {metapredict-3.0.2 → metapredict-3.1.1}/devtools/conda-envs/test_env.yaml +0 -0
  111. {metapredict-3.0.2 → metapredict-3.1.1}/devtools/scripts/create_conda_env.py +0 -0
  112. {metapredict-3.0.2 → metapredict-3.1.1}/docs/Makefile +0 -0
  113. {metapredict-3.0.2 → metapredict-3.1.1}/docs/README.md +0 -0
  114. {metapredict-3.0.2 → metapredict-3.1.1}/docs/_static/README.md +0 -0
  115. {metapredict-3.0.2 → metapredict-3.1.1}/docs/_templates/README.md +0 -0
  116. {metapredict-3.0.2 → metapredict-3.1.1}/docs/conf.py +0 -0
  117. {metapredict-3.0.2 → metapredict-3.1.1}/docs/images/confidence_scores_disorder.png +0 -0
  118. {metapredict-3.0.2 → metapredict-3.1.1}/docs/images/meta_predict_disorder.png +0 -0
  119. {metapredict-3.0.2 → metapredict-3.1.1}/docs/images/python_meta_predict_MadeUpProtein.png +0 -0
  120. {metapredict-3.0.2 → metapredict-3.1.1}/docs/make.bat +0 -0
  121. {metapredict-3.0.2 → metapredict-3.1.1}/docs/usage/acknowledgements.rst +0 -0
  122. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/.DS_Store +0 -0
  123. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/backend/.DS_Store +0 -0
  124. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/backend/cython/domain_definition.pyx +0 -0
  125. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/backend/networks/.DS_Store +0 -0
  126. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/backend/networks/epoch-49-step-42600.ckpt +0 -0
  127. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/backend/networks/epoch023_val_loss1529.48.ckpt +0 -0
  128. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/backend/networks/epoch029_val_loss791.84.ckpt +0 -0
  129. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/backend/networks/epoch029_val_loss959.58.ckpt +0 -0
  130. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/backend/networks/epoch096_val_loss1584.14.ckpt +0 -0
  131. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/backend/networks/epoch099_val_loss1107.08.ckpt +0 -0
  132. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/backend/networks/epoch179_val_loss1095.24.ckpt +0 -0
  133. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/backend/networks/metaDisorder.pt +0 -0
  134. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/backend/networks/meta_predict_disorder_100e_v1.pt +0 -0
  135. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/backend/networks/metameta_2_7_22_nl2_hs20_b32_V3.pt +0 -0
  136. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/backend/networks/metapredict_network_v2_200epochs_nl1_hs20.pt +0 -0
  137. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/backend/networks/metapredict_network_v3_200epochs_nl2_hs20.pt +0 -0
  138. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/backend/networks/non_bin_PAE_hs40_nl2.pt +0 -0
  139. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/backend/networks/smoothed_v3_real_plddt_re.pt +0 -0
  140. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/backend/ppLDDT/.DS_Store +0 -0
  141. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/backend/ppLDDT/networks/alpha_fold_networkV7_hs100_nL2_200e_all_prot.pt +0 -0
  142. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/backend/ppLDDT/networks/epoch019_val_loss1477.45.ckpt +0 -0
  143. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/data/.DS_Store +0 -0
  144. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/data/README.md +0 -0
  145. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/data/test_data.fasta +0 -0
  146. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/metapredict_exceptions.py +0 -0
  147. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/tests/.DS_Store +0 -0
  148. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/tests/.pytest_cache/.gitignore +0 -0
  149. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/tests/.pytest_cache/CACHEDIR.TAG +0 -0
  150. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/tests/.pytest_cache/README.md +0 -0
  151. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/tests/.pytest_cache/v/cache/lastfailed +0 -0
  152. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/tests/.pytest_cache/v/cache/nodeids +0 -0
  153. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/tests/.pytest_cache/v/cache/stepwise +0 -0
  154. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/tests/cli_tests/input/three_seqs.fasta +0 -0
  155. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/tests/input_data/DisorderPredictionssp_P04637_P53_HUMANC.txt +0 -0
  156. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/tests/input_data/build_data.ipynb +0 -0
  157. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/tests/input_data/caid_default/Q8N6T3.caid +0 -0
  158. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/tests/input_data/caid_default/p53.caid +0 -0
  159. /metapredict-3.0.2/metapredict/tests/input_data/caid_default/sp|P0DMV8|HS71A_HUMAN Heat shock 70 kDa protein 1A OS=Homo sapiens OX=9606 GN=HSPA1A PE=1 SV=1.caid → /metapredict-3.1.1/metapredict/tests/input_data/caid_default/sp_P0DMV8_HS71A_HUMAN Heat shock 70 kDa protein 1A OS=Homo sapiens OX=9606 GN=HSPA1A PE=1 SV=1.caid +0 -0
  160. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/tests/input_data/caid_fixed_0p2/Q8N6T3.caid +0 -0
  161. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/tests/input_data/caid_fixed_0p2/p53.caid +0 -0
  162. /metapredict-3.0.2/metapredict/tests/input_data/caid_fixed_0p2/sp|P0DMV8|HS71A_HUMAN Heat shock 70 kDa protein 1A OS=Homo sapiens OX=9606 GN=HSPA1A PE=1 SV=1.caid → /metapredict-3.1.1/metapredict/tests/input_data/caid_fixed_0p2/sp_P0DMV8_HS71A_HUMAN Heat shock 70 kDa protein 1A OS=Homo sapiens OX=9606 GN=HSPA1A PE=1 SV=1.caid +0 -0
  163. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/tests/input_data/caid_fixed_0p5/Q8N6T3.caid +0 -0
  164. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/tests/input_data/caid_fixed_0p5/p53.caid +0 -0
  165. /metapredict-3.0.2/metapredict/tests/input_data/caid_fixed_0p5/sp|P0DMV8|HS71A_HUMAN Heat shock 70 kDa protein 1A OS=Homo sapiens OX=9606 GN=HSPA1A PE=1 SV=1.caid → /metapredict-3.1.1/metapredict/tests/input_data/caid_fixed_0p5/sp_P0DMV8_HS71A_HUMAN Heat shock 70 kDa protein 1A OS=Homo sapiens OX=9606 GN=HSPA1A PE=1 SV=1.caid +0 -0
  166. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/tests/input_data/test_scores_100.npy +0 -0
  167. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/tests/input_data/test_scores_100_v3.npy +0 -0
  168. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/tests/input_data/test_seqs_100.fasta +0 -0
  169. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/tests/input_data/testing.fasta +0 -0
  170. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/tests/input_data/three_seqs.fasta +0 -0
  171. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/tests/local_data.py +0 -0
  172. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/tests/test_domain_functions.py +0 -0
  173. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/tests/test_graph_disorder.py +0 -0
  174. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/tests/test_graph_fasta.py +0 -0
  175. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/tests/test_metapredict_init.py +0 -0
  176. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/tests/test_uniprot_functionality.py +0 -0
  177. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict/tests/test_write_fasta.py +0 -0
  178. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict.egg-info/dependency_links.txt +0 -0
  179. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict.egg-info/entry_points.txt +0 -0
  180. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict.egg-info/not-zip-safe +0 -0
  181. {metapredict-3.0.2 → metapredict-3.1.1}/metapredict.egg-info/top_level.txt +0 -0
@@ -108,6 +108,10 @@ celerybeat-schedule
108
108
  .venv
109
109
  venv/
110
110
  ENV/
111
+ # per-Python-version test environments created by devtools/test-python-versions.sh
112
+ .venvs/
113
+ # tox
114
+ .tox/
111
115
 
112
116
  # Spyder project settings
113
117
  .spyderproject
@@ -125,3 +129,6 @@ ENV/
125
129
  # profraw files from LLVM? Unclear exactly what triggers this
126
130
  # There are reports this comes from LLVM profiling, but also Xcode 9.
127
131
  *profraw
132
+
133
+ # Claude Code local session memory / handoff notes (Dropbox-synced, not committed)
134
+ .claude/
@@ -0,0 +1,17 @@
1
+ include LICENSE
2
+
3
+ # Ship the full package (including the trained network weight files under
4
+ # metapredict/backend/networks and metapredict/backend/ppLDDT/networks) in the
5
+ # source distribution. Compiled artifacts are rebuilt on install, so exclude them.
6
+ graft metapredict
7
+ # Development-only analysis scripts and their data are not part of the package
8
+ # (see the matching exclude in pyproject.toml).
9
+ prune metapredict/analysis
10
+ # Exclude compiled/generated build artifacts: bytecode, compiled extensions, and
11
+ # the Cython-generated C file (regenerated from the .pyx at build time by Cython,
12
+ # which is a build requirement). This guarantees the C source always matches the
13
+ # numpy/Cython used for the build rather than a stale copy left in the tree.
14
+ global-exclude *.py[cod] *.so *.c
15
+
16
+ # test outputs written by the test suite are never part of the package
17
+ prune metapredict/tests/output
@@ -0,0 +1,275 @@
1
+ Metadata-Version: 2.4
2
+ Name: metapredict
3
+ Version: 3.1.1
4
+ Summary: A machine learning-based tool for predicting protein disorder.
5
+ Author-email: Ryan Emenecker <remenecker@wustl.edu>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://metapredict.net
8
+ Project-URL: Documentation, https://metapredict.readthedocs.io
9
+ Project-URL: Repository, https://github.com/idptools/metapredict
10
+ Project-URL: Changelog, https://github.com/idptools/metapredict/blob/master/changelog.md
11
+ Project-URL: Paper, https://doi.org/10.1016/j.bpj.2021.08.039
12
+ Keywords: protein,intrinsic disorder,intrinsically disordered region,IDR,bioinformatics,machine learning,AlphaFold2,pLDDT
13
+ Classifier: Development Status :: 5 - Production/Stable
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.9
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Programming Language :: Python :: 3.14
23
+ Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
24
+ Requires-Python: >=3.9
25
+ Description-Content-Type: text/markdown
26
+ License-File: LICENSE
27
+ Requires-Dist: torch>=2.3
28
+ Requires-Dist: numpy>=2.0
29
+ Requires-Dist: matplotlib
30
+ Requires-Dist: protfasta>=0.1.25
31
+ Requires-Dist: scipy>=1.13
32
+ Requires-Dist: urllib3
33
+ Requires-Dist: tqdm
34
+ Requires-Dist: getSequence>=2.2.1
35
+ Provides-Extra: test
36
+ Requires-Dist: pytest>=6.1.2; extra == "test"
37
+ Requires-Dist: pytest-cov; extra == "test"
38
+ Dynamic: license-file
39
+
40
+ # metapredict: A machine learning-based tool for predicting protein disorder.
41
+
42
+ [![PyPI version](https://img.shields.io/pypi/v/metapredict.svg)](https://pypi.org/project/metapredict/)
43
+ [![Python versions](https://img.shields.io/pypi/pyversions/metapredict.svg)](https://pypi.org/project/metapredict/)
44
+ [![License: MIT](https://img.shields.io/pypi/l/metapredict.svg)](https://github.com/idptools/metapredict/blob/master/LICENSE)
45
+ [![Platforms](https://img.shields.io/badge/platform-linux%20%7C%20macOS%20%7C%20windows-lightgrey.svg)](https://pypi.org/project/metapredict/)
46
+ [![CI](https://github.com/idptools/metapredict/actions/workflows/ci.yml/badge.svg)](https://github.com/idptools/metapredict/actions/workflows/ci.yml)
47
+ [![Documentation Status](https://readthedocs.org/projects/metapredict/badge/?version=latest)](https://metapredict.readthedocs.io/en/latest/?badge=latest)
48
+ [![Downloads](https://static.pepy.tech/badge/metapredict)](https://pepy.tech/project/metapredict)
49
+ [![Last commit](https://img.shields.io/github/last-commit/idptools/metapredict.svg)](https://github.com/idptools/metapredict/commits/)
50
+
51
+ ### Last updated October 2026
52
+
53
+ ## Current default version: V3.1.0
54
+ 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, and in Oct. we released 3.1.0, which is the current default and introduces a number of small bug fixes and performance enhancements.
55
+
56
+ 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 backward compatible with V2* and can be used as a drop-in replacement for V2. Although we've improved the Python API to massively simplify how you use metapredict, we've updated it so that all previously created functions *should still work*. If they don't, please raise an issue, and we will fix it ASAP!
57
+
58
+ ## What are the major changes for metapredict V3?
59
+
60
+ 1. **A new disorder prediction network**: Metapredict V3 uses a new (more accurate) network for disorder prediction. V1 and V2 are still available!
61
+ 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 performs better on all metrics for pLDDT prediction, so we recommend using V2!
62
+ 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.
63
+ 4. **Easier access to DisorderObject**. You can now return the ``DisorderObject`` by setting ``return_domains=True`` when using ``predict_disorder()``.
64
+ 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!
65
+ 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.
66
+ 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.
67
+ 8. **Clearer device selection**: Metapredict used to fall back to CPU for predictions if it failed to use the GPU for any reason. This was well-intentioned 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.
68
+ 9. **Ability to get protein isoforms from UniProt**: We updated metapredict-uniprot to work with the new version of 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.
69
+
70
+
71
+ ## Installation
72
+ Metapredict is a Python package published on [PyPI](https://pypi.org/project/metapredict/). It supports Python 3.9–3.14; the instructions below use **Python 3.12**, which we recommend. Choose whichever of the three workflows — pip, conda, or uv — best matches your setup. If Python environments are new to you, we suggest reading up on Python package management and [conda](https://conda.io/projects/conda/en/latest/user-guide/getting-started.html) first.
73
+
74
+ Each option creates a clean, isolated Python 3.12 environment and then installs metapredict from PyPI.
75
+
76
+ metapredict needs PyTorch 2.3 or later, NumPy 2.0 or later and scipy 1.13 or later, and pip and uv install these (along with metapredict's other dependencies) automatically. If you install them with conda (Option 2), make sure conda provides at least these versions; otherwise pip will install newer copies from PyPI over them, mixing the two ecosystems (see the segfault warning below). Note that PyPI has no builds of PyTorch 2.3 or later for Intel (x86_64) Macs, so on an Intel Mac pip cannot install the PyTorch that metapredict needs.
77
+
78
+ #### Option 1 — pip (PyPI)
79
+ ```bash
80
+ # create and activate a Python 3.12 virtual environment
81
+ python3.12 -m venv metapredict-env
82
+ source metapredict-env/bin/activate # Windows: metapredict-env\Scripts\activate
83
+
84
+ # install metapredict from PyPI
85
+ pip install metapredict
86
+ ```
87
+
88
+ #### Option 2 — conda
89
+ ```bash
90
+ # create a Python 3.12 environment with the scientific dependencies from conda
91
+ conda create -n metapredict -c conda-forge -c pytorch python=3.12 numpy scipy pytorch cython matplotlib
92
+ conda activate metapredict
93
+
94
+ # install metapredict from PyPI
95
+ pip install metapredict
96
+ ```
97
+ Installing numpy and PyTorch from conda (rather than letting pip pull them) keeps them in the same ecosystem — see the segfault warning below.
98
+
99
+ #### Option 3 — uv
100
+ ```bash
101
+ # create a Python 3.12 environment (uv will download the interpreter if needed)
102
+ uv venv --python 3.12
103
+ source .venv/bin/activate # Windows: .venv\Scripts\activate
104
+
105
+ # install metapredict
106
+ uv pip install metapredict
107
+ ```
108
+
109
+ #### Check the installation
110
+ Once installed, run:
111
+ ```bash
112
+ metapredict-predict-disorder --help
113
+ ```
114
+ from the command line; this should yield help info on the `metapredict-predict-disorder` command.
115
+
116
+ #### WARNING: Segfault when mixing `conda` and `pip` installs (March 2024)
117
+ 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.
118
+
119
+ #### WARNING: Problems with installing Torch with proper CUDA version (November 2024).
120
+ **This is only relevant if you are trying to run metapredict on a CUDA-enabled GPU!**
121
+
122
+ On Linux, the PyTorch that pip installs from PyPI is built for a specific version of CUDA, and your NVIDIA driver must support that CUDA version. If your driver is older than that, a torch version that *does not have the correct CUDA version* will be installed. PyTorch then cannot use your GPU: `torch.cuda.is_available()` returns `False`, so metapredict quietly runs on the CPU (or raises an error if you asked for `device='cuda'`), and in some setups this can also cause a segfault. To fix this, you need to install torch for a CUDA version your driver supports. For example, to install PyTorch on Linux using pip with a CUDA version of 12.1, you would run:
123
+
124
+ ```bash
125
+ pip install torch --index-url https://download.pytorch.org/whl/cu121
126
+ ```
127
+
128
+ To figure out which version of CUDA your driver supports (assuming you have a CUDA-enabled GPU that is set up correctly), you need to run:
129
+ ```bash
130
+ nvidia-smi
131
+ ```
132
+ Which should return information about your GPU and NVIDIA driver version, and at the top the highest CUDA version your driver supports, so choose a PyTorch build for that CUDA version or an older one.
133
+
134
+ Please see the [PyTorch install instructions](https://pytorch.org/get-started/locally/) for more info.
135
+
136
+
137
+ ### Extended installation info
138
+
139
+ The current stable version of **metapredict** is available through GitHub or the Python Package Index (PyPI).
140
+
141
+ To install from PyPI, run:
142
+ ```bash
143
+ pip install metapredict
144
+ ```
145
+
146
+ You can also install the current development version from
147
+ ```bash
148
+ pip install git+https://git@github.com/idptools/metapredict
149
+ ```
150
+ To clone the GitHub repository and gain the ability to modify a local copy of the code, run
151
+ ```bash
152
+ git clone https://github.com/idptools/metapredict.git
153
+ cd metapredict
154
+ pip install -e .
155
+ ```
156
+ metapredict includes a compiled (Cython) extension that speeds up the IDR domain decomposition. The wheels published on PyPI already include it for Linux (x86_64 and aarch64), macOS (Apple silicon) and Windows (64-bit) on Python 3.9–3.14, so `pip install metapredict` needs no compiler on those platforms. Installing from source (from GitHub, from a local clone with or without `-e`, or on any other platform) compiles the extension during installation, which needs a C compiler: the Xcode Command Line Tools on macOS (`xcode-select --install`), `gcc` on Linux (for example the `build-essential` package), or the Microsoft C++ Build Tools on Windows.
157
+
158
+ The `-e` flag links the installed version to your local copy of the code, so edits to the Python files take effect immediately. If you change the Cython code (`metapredict/backend/cython/domain_definition.pyx`), re-run `pip install -e .` to recompile it. If metapredict ever warns that it is falling back to a slower pure-Python implementation, its compiled extension could not be loaded; reinstalling metapredict fixes this.
159
+
160
+ ## Documentation
161
+ Documentation for metapredict V3 automatically builds from the `/docs` directory in this repository and is hosted at [https://metapredict.readthedocs.io/](https://metapredict.readthedocs.io/).
162
+
163
+ 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.
164
+
165
+ ## How can I use metapredict?
166
+ Metapredict can be used in five different ways:
167
+
168
+ 1. As a stand-alone command-line tool (installable via pip - the code in this repository).
169
+ 2. As a Python library for integrating into your favorite bioinformatics pipeline (installable via pip - the code in this repository).
170
+ 3. As a web-server for examining disorder predictions on individual sequences found at [https://metapredict.net/](https://metapredict.net/).
171
+ 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/drive/1UOrOxun9i23XDE8lFo_4I89Tw8P3Z1D-?usp=sharing). 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.
172
+ 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).
173
+
174
+ ## How to cite
175
+
176
+ If you use metapredict for your work, please cite the original metapredict paper and describe which version of metapredict you used (V1, V2, V2-FF, or V3):
177
+
178
+ 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). doi:[10.1016/j.bpj.2021.08.039](https://doi.org/10.1016/j.bpj.2021.08.039)
179
+
180
+ You may additionally cite the preprints describing later updates to metapredict — the [V2 preprint](https://www.biorxiv.org/content/10.1101/2022.06.06.494887v2) and the metapredict "Tree of Life" preprint:
181
+
182
+ Emenecker, R. J., Griffith, D. & Holehouse, A. S. Metapredict V2: An update to metapredict, a fast, accurate, and easy-to-use predictor of consensus disorder and structure. bioRxiv 2022.06.06.494887 (2022). doi:10.1101/2022.06.06.494887
183
+
184
+ Lotthammer, J. M., Hernández-García, J., Griffith, D., Weijers, D., Holehouse, A. S. & Emenecker, R. J. Metapredict enables accurate disorder prediction across the Tree of Life. bioRxiv 2024.11.05.622168 (2024). doi:10.1101/2024.11.05.622168
185
+
186
+
187
+ ## Changes
188
+
189
+ For changes, see the `changelog.md` file in this directory or check them out on GitHub [here](https://github.com/idptools/metapredict/blob/master/changelog.md).
190
+
191
+ ## Running tests
192
+ There are two ways to run the test suite: a quick run of `pytest` in your local clone while you develop, and **tox**, which tests metapredict in clean, isolated environments exactly as it would be installed. Use tox before a release, or whenever you want to check that metapredict works on a given platform or Python version.
193
+
194
+ ### Quick check in your local clone
195
+ The tests run against the code in your local clone, including its compiled Cython extension, so first install metapredict in editable mode (which compiles the extension in place). Then run `pytest` from the `metapredict/tests` directory, because the tests load their input files using paths relative to that directory:
196
+ ```bash
197
+ pip install -e ".[test]"
198
+ python devtools/check_cython_extension.py # optional: confirms the compiled extension loads
199
+ cd metapredict/tests
200
+ pytest
201
+ ```
202
+
203
+ ### Testing with tox (macOS and Linux)
204
+ Each tox environment builds a wheel of metapredict (compiling the Cython extension), installs it with its test dependencies into a fresh, isolated environment, checks that the compiled extension loads and gives the right answers (`devtools/check_cython_extension.py`), and then runs the whole test suite against that installed copy. Your own Python environment is never touched.
205
+
206
+ #### What you need
207
+ - Python 3.9 or later, with `pip`.
208
+ - A C compiler and git to build the Cython extension: on macOS, the Xcode Command Line Tools (xcode-select --install); on Linux, gcc and git (for example, `sudo apt install build-essential git` on Debian/Ubuntu).
209
+ - tox itself. The simplest way to install it is with pip, into its own virtual environment so your system Python is left alone:
210
+ ```bash
211
+ python3 -m venv ~/tox-env
212
+ ~/tox-env/bin/pip install tox
213
+ ```
214
+ Then use `~/tox-env/bin/tox` wherever `tox` appears below (or add `~/tox-env/bin` to your `PATH`).
215
+
216
+ You don't need uv or any particular Python versions installed. The first time it runs, tox installs the `tox-uv` plugin that `tox.ini` asks for, which brings [uv](https://docs.astral.sh/uv/) with it, and uv downloads whichever Python versions (3.9–3.14) the tests need. If you already use uv, `uvx --with tox-uv tox ...` works in place of `tox ...` without installing anything.
217
+
218
+ #### Running the tests
219
+ Run these from the root of the repository. They are the same on macOS and Linux:
220
+ ```bash
221
+ tox -l # list the available environments
222
+ tox -e py312 # the test suite on Python 3.12
223
+ tox -e py39,py314 # several Python versions
224
+ tox -m python # every supported Python version (3.9 – 3.14)
225
+ tox -e py312 -- -k stream -x # anything after -- is passed to pytest
226
+ ```
227
+ The first run downloads PyTorch and the other dependencies (cached by uv in `~/.cache/uv`), so it takes a while; after that a full `tox -e py312` run takes about three minutes on an Apple-silicon laptop. tox keeps its environments in `.tox/` at the root of your checkout (ignored by git). If your checkout lives in a synced folder such as Dropbox or iCloud, add `--workdir /tmp/metapredict-tox` to keep them out of it, e.g. `tox --workdir /tmp/metapredict-tox -e py312`.
228
+
229
+ `tox.ini` also defines sweeps that find the oldest supported PyTorch and scipy versions (`tox -m torch`, `tox -m scipy`); see `devtools/README.md` for those and for the NumPy/Cython build sweeps.
230
+
231
+ #### On macOS
232
+ tox installs PyTorch from PyPI, which only has Apple-silicon builds for the PyTorch versions metapredict supports (2.3 and later), so these instructions are for Apple-silicon Macs. The tests that use the Apple GPU (MPS) run; the CUDA tests are skipped.
233
+
234
+ #### On Linux
235
+ - **Without an NVIDIA GPU:** PyPI's Linux PyTorch includes several GB of CUDA libraries you won't use. Ask for the CPU-only build instead:
236
+ ```bash
237
+ UV_TORCH_BACKEND=cpu tox -m python
238
+ ```
239
+ - **With an NVIDIA GPU:** let uv pick the PyTorch CUDA build that matches the machine's NVIDIA driver, and then check that the CUDA tests really ran (they should show `PASSED`, not `SKIPPED`):
240
+ ```bash
241
+ UV_TORCH_BACKEND=auto tox -m python
242
+ UV_TORCH_BACKEND=auto tox -e py312 -- -v -k cuda
243
+ ```
244
+ Without `UV_TORCH_BACKEND=auto`, a PyTorch build that needs a newer driver than the machine has will report no GPU, and the CUDA tests will quietly be skipped. The CUDA tests compare GPU predictions against CPU reference scores to within 1e-3.
245
+
246
+ #### Linux tests from a Mac (Docker)
247
+ The Linux environment runs any of the commands above inside an isolated Linux container, so you can check that metapredict builds and passes its tests on Linux without leaving your Mac. Docker Desktop must be running. Everything after `--` is passed to tox inside the container (the default is `-e py312`):
248
+ ```bash
249
+ tox -e linux # Python 3.12 on Linux
250
+ tox -e linux -- -m python # every Python version on Linux
251
+ tox -e linux -- -e py312 -- -k stream # tox arguments, then pytest arguments
252
+ METAPREDICT_DOCKER_PLATFORM=linux/amd64 tox -e linux # x86_64 Linux (emulated, so much slower)
253
+ ```
254
+ The same thing without tox on your Mac is `devtools/linux/run_tox_in_docker.sh [tox arguments]`.
255
+
256
+ Your working tree, including uncommitted changes, is mounted read-only and copied into the container, so nothing is ever written back. The image (`devtools/linux/Dockerfile`: gcc, git, uv and tox) is built the first time, and dependencies are cached in a Docker volume, so only the first run is slow. PyTorch's CPU-only build is used. By default, the container uses your Mac's own architecture (aarch64 on Apple Silicon). Docker on a Mac has no access to a GPU, so CUDA tests can only run on a Linux machine with an NVIDIA GPU (see above). To remove the image and cache afterward, find them with `docker images | grep metapredict-tox` and `docker volume ls | grep metapredict-tox`, then delete them with `docker rmi <image>` and `docker volume rm <volume>`.
257
+
258
+ #### Reading the results
259
+ Each environment prints the PyTorch and scipy versions it is testing with, then `OK: compiled extension gives the expected domains`, then the pytest summary, and finishes with `congratulations :)`. Some skipped tests are expected: the GPU tests in `test_metapredict_CPU_GPU.py` skip whenever that device isn't available (the CUDA tests everywhere except Linux with an NVIDIA GPU, and the MPS tests everywhere except Apple Silicon). If instead you see `FAIL: metapredict could not import its compiled Cython extension`, the extension did not build or load, which usually means no C compiler was found.
260
+
261
+ GitHub Actions also runs the test suite on Linux, macOS, and Windows for every push and pull request (`.github/workflows/ci.yml`), and builds and checks the release wheels for all three (`.github/workflows/wheels.yml`).
262
+
263
+ ## Acknowledgements
264
+
265
+ We used a modified version of PARROT, created by Dan Griffith, to generate the network used for metapredict V3. We used the original implementation of PARROT 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).
266
+
267
+ In addition to using Dan Griffith's tool to create metapredict, Dan wrote the original code for encode_sequence.py.
268
+
269
+ We thank the **DeepMind** team for developing AlphaFold2 and EBI/UniProt for making these data so readily available.
270
+
271
+ We also thank the team at MobiDB for creating the database used to train metapredict V1. Check out their awesome stuff at [https://mobidb.bio.unipd.it](https://mobidb.bio.unipd.it)
272
+
273
+
274
+ ## Copyright
275
+ Copyright (c) 2020-2026, Holehouse Lab - Washington University School of Medicine
@@ -0,0 +1,236 @@
1
+ # metapredict: A machine learning-based tool for predicting protein disorder.
2
+
3
+ [![PyPI version](https://img.shields.io/pypi/v/metapredict.svg)](https://pypi.org/project/metapredict/)
4
+ [![Python versions](https://img.shields.io/pypi/pyversions/metapredict.svg)](https://pypi.org/project/metapredict/)
5
+ [![License: MIT](https://img.shields.io/pypi/l/metapredict.svg)](https://github.com/idptools/metapredict/blob/master/LICENSE)
6
+ [![Platforms](https://img.shields.io/badge/platform-linux%20%7C%20macOS%20%7C%20windows-lightgrey.svg)](https://pypi.org/project/metapredict/)
7
+ [![CI](https://github.com/idptools/metapredict/actions/workflows/ci.yml/badge.svg)](https://github.com/idptools/metapredict/actions/workflows/ci.yml)
8
+ [![Documentation Status](https://readthedocs.org/projects/metapredict/badge/?version=latest)](https://metapredict.readthedocs.io/en/latest/?badge=latest)
9
+ [![Downloads](https://static.pepy.tech/badge/metapredict)](https://pepy.tech/project/metapredict)
10
+ [![Last commit](https://img.shields.io/github/last-commit/idptools/metapredict.svg)](https://github.com/idptools/metapredict/commits/)
11
+
12
+ ### Last updated October 2026
13
+
14
+ ## Current default version: V3.1.0
15
+ 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, and in Oct. we released 3.1.0, which is the current default and introduces a number of small bug fixes and performance enhancements.
16
+
17
+ 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 backward compatible with V2* and can be used as a drop-in replacement for V2. Although we've improved the Python API to massively simplify how you use metapredict, we've updated it so that all previously created functions *should still work*. If they don't, please raise an issue, and we will fix it ASAP!
18
+
19
+ ## What are the major changes for metapredict V3?
20
+
21
+ 1. **A new disorder prediction network**: Metapredict V3 uses a new (more accurate) network for disorder prediction. V1 and V2 are still available!
22
+ 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 performs better on all metrics for pLDDT prediction, so we recommend using V2!
23
+ 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.
24
+ 4. **Easier access to DisorderObject**. You can now return the ``DisorderObject`` by setting ``return_domains=True`` when using ``predict_disorder()``.
25
+ 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!
26
+ 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.
27
+ 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.
28
+ 8. **Clearer device selection**: Metapredict used to fall back to CPU for predictions if it failed to use the GPU for any reason. This was well-intentioned 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.
29
+ 9. **Ability to get protein isoforms from UniProt**: We updated metapredict-uniprot to work with the new version of 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.
30
+
31
+
32
+ ## Installation
33
+ Metapredict is a Python package published on [PyPI](https://pypi.org/project/metapredict/). It supports Python 3.9–3.14; the instructions below use **Python 3.12**, which we recommend. Choose whichever of the three workflows — pip, conda, or uv — best matches your setup. If Python environments are new to you, we suggest reading up on Python package management and [conda](https://conda.io/projects/conda/en/latest/user-guide/getting-started.html) first.
34
+
35
+ Each option creates a clean, isolated Python 3.12 environment and then installs metapredict from PyPI.
36
+
37
+ metapredict needs PyTorch 2.3 or later, NumPy 2.0 or later and scipy 1.13 or later, and pip and uv install these (along with metapredict's other dependencies) automatically. If you install them with conda (Option 2), make sure conda provides at least these versions; otherwise pip will install newer copies from PyPI over them, mixing the two ecosystems (see the segfault warning below). Note that PyPI has no builds of PyTorch 2.3 or later for Intel (x86_64) Macs, so on an Intel Mac pip cannot install the PyTorch that metapredict needs.
38
+
39
+ #### Option 1 — pip (PyPI)
40
+ ```bash
41
+ # create and activate a Python 3.12 virtual environment
42
+ python3.12 -m venv metapredict-env
43
+ source metapredict-env/bin/activate # Windows: metapredict-env\Scripts\activate
44
+
45
+ # install metapredict from PyPI
46
+ pip install metapredict
47
+ ```
48
+
49
+ #### Option 2 — conda
50
+ ```bash
51
+ # create a Python 3.12 environment with the scientific dependencies from conda
52
+ conda create -n metapredict -c conda-forge -c pytorch python=3.12 numpy scipy pytorch cython matplotlib
53
+ conda activate metapredict
54
+
55
+ # install metapredict from PyPI
56
+ pip install metapredict
57
+ ```
58
+ Installing numpy and PyTorch from conda (rather than letting pip pull them) keeps them in the same ecosystem — see the segfault warning below.
59
+
60
+ #### Option 3 — uv
61
+ ```bash
62
+ # create a Python 3.12 environment (uv will download the interpreter if needed)
63
+ uv venv --python 3.12
64
+ source .venv/bin/activate # Windows: .venv\Scripts\activate
65
+
66
+ # install metapredict
67
+ uv pip install metapredict
68
+ ```
69
+
70
+ #### Check the installation
71
+ Once installed, run:
72
+ ```bash
73
+ metapredict-predict-disorder --help
74
+ ```
75
+ from the command line; this should yield help info on the `metapredict-predict-disorder` command.
76
+
77
+ #### WARNING: Segfault when mixing `conda` and `pip` installs (March 2024)
78
+ 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.
79
+
80
+ #### WARNING: Problems with installing Torch with proper CUDA version (November 2024).
81
+ **This is only relevant if you are trying to run metapredict on a CUDA-enabled GPU!**
82
+
83
+ On Linux, the PyTorch that pip installs from PyPI is built for a specific version of CUDA, and your NVIDIA driver must support that CUDA version. If your driver is older than that, a torch version that *does not have the correct CUDA version* will be installed. PyTorch then cannot use your GPU: `torch.cuda.is_available()` returns `False`, so metapredict quietly runs on the CPU (or raises an error if you asked for `device='cuda'`), and in some setups this can also cause a segfault. To fix this, you need to install torch for a CUDA version your driver supports. For example, to install PyTorch on Linux using pip with a CUDA version of 12.1, you would run:
84
+
85
+ ```bash
86
+ pip install torch --index-url https://download.pytorch.org/whl/cu121
87
+ ```
88
+
89
+ To figure out which version of CUDA your driver supports (assuming you have a CUDA-enabled GPU that is set up correctly), you need to run:
90
+ ```bash
91
+ nvidia-smi
92
+ ```
93
+ Which should return information about your GPU and NVIDIA driver version, and at the top the highest CUDA version your driver supports, so choose a PyTorch build for that CUDA version or an older one.
94
+
95
+ Please see the [PyTorch install instructions](https://pytorch.org/get-started/locally/) for more info.
96
+
97
+
98
+ ### Extended installation info
99
+
100
+ The current stable version of **metapredict** is available through GitHub or the Python Package Index (PyPI).
101
+
102
+ To install from PyPI, run:
103
+ ```bash
104
+ pip install metapredict
105
+ ```
106
+
107
+ You can also install the current development version from
108
+ ```bash
109
+ pip install git+https://git@github.com/idptools/metapredict
110
+ ```
111
+ To clone the GitHub repository and gain the ability to modify a local copy of the code, run
112
+ ```bash
113
+ git clone https://github.com/idptools/metapredict.git
114
+ cd metapredict
115
+ pip install -e .
116
+ ```
117
+ metapredict includes a compiled (Cython) extension that speeds up the IDR domain decomposition. The wheels published on PyPI already include it for Linux (x86_64 and aarch64), macOS (Apple silicon) and Windows (64-bit) on Python 3.9–3.14, so `pip install metapredict` needs no compiler on those platforms. Installing from source (from GitHub, from a local clone with or without `-e`, or on any other platform) compiles the extension during installation, which needs a C compiler: the Xcode Command Line Tools on macOS (`xcode-select --install`), `gcc` on Linux (for example the `build-essential` package), or the Microsoft C++ Build Tools on Windows.
118
+
119
+ The `-e` flag links the installed version to your local copy of the code, so edits to the Python files take effect immediately. If you change the Cython code (`metapredict/backend/cython/domain_definition.pyx`), re-run `pip install -e .` to recompile it. If metapredict ever warns that it is falling back to a slower pure-Python implementation, its compiled extension could not be loaded; reinstalling metapredict fixes this.
120
+
121
+ ## Documentation
122
+ Documentation for metapredict V3 automatically builds from the `/docs` directory in this repository and is hosted at [https://metapredict.readthedocs.io/](https://metapredict.readthedocs.io/).
123
+
124
+ 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.
125
+
126
+ ## How can I use metapredict?
127
+ Metapredict can be used in five different ways:
128
+
129
+ 1. As a stand-alone command-line tool (installable via pip - the code in this repository).
130
+ 2. As a Python library for integrating into your favorite bioinformatics pipeline (installable via pip - the code in this repository).
131
+ 3. As a web-server for examining disorder predictions on individual sequences found at [https://metapredict.net/](https://metapredict.net/).
132
+ 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/drive/1UOrOxun9i23XDE8lFo_4I89Tw8P3Z1D-?usp=sharing). 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.
133
+ 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).
134
+
135
+ ## How to cite
136
+
137
+ If you use metapredict for your work, please cite the original metapredict paper and describe which version of metapredict you used (V1, V2, V2-FF, or V3):
138
+
139
+ 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). doi:[10.1016/j.bpj.2021.08.039](https://doi.org/10.1016/j.bpj.2021.08.039)
140
+
141
+ You may additionally cite the preprints describing later updates to metapredict — the [V2 preprint](https://www.biorxiv.org/content/10.1101/2022.06.06.494887v2) and the metapredict "Tree of Life" preprint:
142
+
143
+ Emenecker, R. J., Griffith, D. & Holehouse, A. S. Metapredict V2: An update to metapredict, a fast, accurate, and easy-to-use predictor of consensus disorder and structure. bioRxiv 2022.06.06.494887 (2022). doi:10.1101/2022.06.06.494887
144
+
145
+ Lotthammer, J. M., Hernández-García, J., Griffith, D., Weijers, D., Holehouse, A. S. & Emenecker, R. J. Metapredict enables accurate disorder prediction across the Tree of Life. bioRxiv 2024.11.05.622168 (2024). doi:10.1101/2024.11.05.622168
146
+
147
+
148
+ ## Changes
149
+
150
+ For changes, see the `changelog.md` file in this directory or check them out on GitHub [here](https://github.com/idptools/metapredict/blob/master/changelog.md).
151
+
152
+ ## Running tests
153
+ There are two ways to run the test suite: a quick run of `pytest` in your local clone while you develop, and **tox**, which tests metapredict in clean, isolated environments exactly as it would be installed. Use tox before a release, or whenever you want to check that metapredict works on a given platform or Python version.
154
+
155
+ ### Quick check in your local clone
156
+ The tests run against the code in your local clone, including its compiled Cython extension, so first install metapredict in editable mode (which compiles the extension in place). Then run `pytest` from the `metapredict/tests` directory, because the tests load their input files using paths relative to that directory:
157
+ ```bash
158
+ pip install -e ".[test]"
159
+ python devtools/check_cython_extension.py # optional: confirms the compiled extension loads
160
+ cd metapredict/tests
161
+ pytest
162
+ ```
163
+
164
+ ### Testing with tox (macOS and Linux)
165
+ Each tox environment builds a wheel of metapredict (compiling the Cython extension), installs it with its test dependencies into a fresh, isolated environment, checks that the compiled extension loads and gives the right answers (`devtools/check_cython_extension.py`), and then runs the whole test suite against that installed copy. Your own Python environment is never touched.
166
+
167
+ #### What you need
168
+ - Python 3.9 or later, with `pip`.
169
+ - A C compiler and git to build the Cython extension: on macOS, the Xcode Command Line Tools (xcode-select --install); on Linux, gcc and git (for example, `sudo apt install build-essential git` on Debian/Ubuntu).
170
+ - tox itself. The simplest way to install it is with pip, into its own virtual environment so your system Python is left alone:
171
+ ```bash
172
+ python3 -m venv ~/tox-env
173
+ ~/tox-env/bin/pip install tox
174
+ ```
175
+ Then use `~/tox-env/bin/tox` wherever `tox` appears below (or add `~/tox-env/bin` to your `PATH`).
176
+
177
+ You don't need uv or any particular Python versions installed. The first time it runs, tox installs the `tox-uv` plugin that `tox.ini` asks for, which brings [uv](https://docs.astral.sh/uv/) with it, and uv downloads whichever Python versions (3.9–3.14) the tests need. If you already use uv, `uvx --with tox-uv tox ...` works in place of `tox ...` without installing anything.
178
+
179
+ #### Running the tests
180
+ Run these from the root of the repository. They are the same on macOS and Linux:
181
+ ```bash
182
+ tox -l # list the available environments
183
+ tox -e py312 # the test suite on Python 3.12
184
+ tox -e py39,py314 # several Python versions
185
+ tox -m python # every supported Python version (3.9 – 3.14)
186
+ tox -e py312 -- -k stream -x # anything after -- is passed to pytest
187
+ ```
188
+ The first run downloads PyTorch and the other dependencies (cached by uv in `~/.cache/uv`), so it takes a while; after that a full `tox -e py312` run takes about three minutes on an Apple-silicon laptop. tox keeps its environments in `.tox/` at the root of your checkout (ignored by git). If your checkout lives in a synced folder such as Dropbox or iCloud, add `--workdir /tmp/metapredict-tox` to keep them out of it, e.g. `tox --workdir /tmp/metapredict-tox -e py312`.
189
+
190
+ `tox.ini` also defines sweeps that find the oldest supported PyTorch and scipy versions (`tox -m torch`, `tox -m scipy`); see `devtools/README.md` for those and for the NumPy/Cython build sweeps.
191
+
192
+ #### On macOS
193
+ tox installs PyTorch from PyPI, which only has Apple-silicon builds for the PyTorch versions metapredict supports (2.3 and later), so these instructions are for Apple-silicon Macs. The tests that use the Apple GPU (MPS) run; the CUDA tests are skipped.
194
+
195
+ #### On Linux
196
+ - **Without an NVIDIA GPU:** PyPI's Linux PyTorch includes several GB of CUDA libraries you won't use. Ask for the CPU-only build instead:
197
+ ```bash
198
+ UV_TORCH_BACKEND=cpu tox -m python
199
+ ```
200
+ - **With an NVIDIA GPU:** let uv pick the PyTorch CUDA build that matches the machine's NVIDIA driver, and then check that the CUDA tests really ran (they should show `PASSED`, not `SKIPPED`):
201
+ ```bash
202
+ UV_TORCH_BACKEND=auto tox -m python
203
+ UV_TORCH_BACKEND=auto tox -e py312 -- -v -k cuda
204
+ ```
205
+ Without `UV_TORCH_BACKEND=auto`, a PyTorch build that needs a newer driver than the machine has will report no GPU, and the CUDA tests will quietly be skipped. The CUDA tests compare GPU predictions against CPU reference scores to within 1e-3.
206
+
207
+ #### Linux tests from a Mac (Docker)
208
+ The Linux environment runs any of the commands above inside an isolated Linux container, so you can check that metapredict builds and passes its tests on Linux without leaving your Mac. Docker Desktop must be running. Everything after `--` is passed to tox inside the container (the default is `-e py312`):
209
+ ```bash
210
+ tox -e linux # Python 3.12 on Linux
211
+ tox -e linux -- -m python # every Python version on Linux
212
+ tox -e linux -- -e py312 -- -k stream # tox arguments, then pytest arguments
213
+ METAPREDICT_DOCKER_PLATFORM=linux/amd64 tox -e linux # x86_64 Linux (emulated, so much slower)
214
+ ```
215
+ The same thing without tox on your Mac is `devtools/linux/run_tox_in_docker.sh [tox arguments]`.
216
+
217
+ Your working tree, including uncommitted changes, is mounted read-only and copied into the container, so nothing is ever written back. The image (`devtools/linux/Dockerfile`: gcc, git, uv and tox) is built the first time, and dependencies are cached in a Docker volume, so only the first run is slow. PyTorch's CPU-only build is used. By default, the container uses your Mac's own architecture (aarch64 on Apple Silicon). Docker on a Mac has no access to a GPU, so CUDA tests can only run on a Linux machine with an NVIDIA GPU (see above). To remove the image and cache afterward, find them with `docker images | grep metapredict-tox` and `docker volume ls | grep metapredict-tox`, then delete them with `docker rmi <image>` and `docker volume rm <volume>`.
218
+
219
+ #### Reading the results
220
+ Each environment prints the PyTorch and scipy versions it is testing with, then `OK: compiled extension gives the expected domains`, then the pytest summary, and finishes with `congratulations :)`. Some skipped tests are expected: the GPU tests in `test_metapredict_CPU_GPU.py` skip whenever that device isn't available (the CUDA tests everywhere except Linux with an NVIDIA GPU, and the MPS tests everywhere except Apple Silicon). If instead you see `FAIL: metapredict could not import its compiled Cython extension`, the extension did not build or load, which usually means no C compiler was found.
221
+
222
+ GitHub Actions also runs the test suite on Linux, macOS, and Windows for every push and pull request (`.github/workflows/ci.yml`), and builds and checks the release wheels for all three (`.github/workflows/wheels.yml`).
223
+
224
+ ## Acknowledgements
225
+
226
+ We used a modified version of PARROT, created by Dan Griffith, to generate the network used for metapredict V3. We used the original implementation of PARROT 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).
227
+
228
+ In addition to using Dan Griffith's tool to create metapredict, Dan wrote the original code for encode_sequence.py.
229
+
230
+ We thank the **DeepMind** team for developing AlphaFold2 and EBI/UniProt for making these data so readily available.
231
+
232
+ We also thank the team at MobiDB for creating the database used to train metapredict V1. Check out their awesome stuff at [https://mobidb.bio.unipd.it](https://mobidb.bio.unipd.it)
233
+
234
+
235
+ ## Copyright
236
+ Copyright (c) 2020-2026, Holehouse Lab - Washington University School of Medicine