nanomelt 1.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.
Files changed (51) hide show
  1. nanomelt-1.0.0/LICENSE +443 -0
  2. nanomelt-1.0.0/MANIFEST.in +1 -0
  3. nanomelt-1.0.0/PKG-INFO +23 -0
  4. nanomelt-1.0.0/README.md +162 -0
  5. nanomelt-1.0.0/environment.yml +31 -0
  6. nanomelt-1.0.0/nanomelt/__init__.py +3 -0
  7. nanomelt-1.0.0/nanomelt/__main__.py +92 -0
  8. nanomelt-1.0.0/nanomelt/model/__init__.py +3 -0
  9. nanomelt-1.0.0/nanomelt/model/embedding/__init__.py +3 -0
  10. nanomelt-1.0.0/nanomelt/model/embedding/fasta_embed.py +275 -0
  11. nanomelt-1.0.0/nanomelt/model/ens_averaging.py +112 -0
  12. nanomelt-1.0.0/nanomelt/model/final_retrain.py +288 -0
  13. nanomelt-1.0.0/nanomelt/model/indiv_reg_train.py +193 -0
  14. nanomelt-1.0.0/nanomelt/model/modules/__init__.py +3 -0
  15. nanomelt-1.0.0/nanomelt/model/modules/alignment/__init__.py +3 -0
  16. nanomelt-1.0.0/nanomelt/model/modules/alignment/aho_consensus.py +783 -0
  17. nanomelt-1.0.0/nanomelt/model/modules/alignment/blossum.py +1296 -0
  18. nanomelt-1.0.0/nanomelt/model/modules/alignment/csv_dict.py +5195 -0
  19. nanomelt-1.0.0/nanomelt/model/modules/alignment/liabilities.py +56 -0
  20. nanomelt-1.0.0/nanomelt/model/modules/alignment/misc.py +7071 -0
  21. nanomelt-1.0.0/nanomelt/model/modules/alignment/mybio.py +5975 -0
  22. nanomelt-1.0.0/nanomelt/model/modules/alignment/myparallel.py +281 -0
  23. nanomelt-1.0.0/nanomelt/model/modules/alignment/parse_pdb.py +388 -0
  24. nanomelt-1.0.0/nanomelt/model/modules/alignment/plotter.py +12217 -0
  25. nanomelt-1.0.0/nanomelt/model/modules/alignment/structs.py +3657 -0
  26. nanomelt-1.0.0/nanomelt/model/modules/clustering.py +86 -0
  27. nanomelt-1.0.0/nanomelt/model/modules/ensemble.py +161 -0
  28. nanomelt-1.0.0/nanomelt/model/modules/regs.py +51 -0
  29. nanomelt-1.0.0/nanomelt/model/modules/strat_nest.py +584 -0
  30. nanomelt-1.0.0/nanomelt/model/modules/utils.py +36 -0
  31. nanomelt-1.0.0/nanomelt/model/nanomelt.py +139 -0
  32. nanomelt-1.0.0/nanomelt/model/saved_models/NanoMelt_finalmodel/GPR_onehot.joblib +0 -0
  33. nanomelt-1.0.0/nanomelt/model/saved_models/NanoMelt_finalmodel/GPR_vhse.joblib +0 -0
  34. nanomelt-1.0.0/nanomelt/model/saved_models/NanoMelt_finalmodel/SVR_esm1b.joblib +0 -0
  35. nanomelt-1.0.0/nanomelt/model/saved_models/NanoMelt_finalmodel/SVR_esm2_t30.joblib +0 -0
  36. nanomelt-1.0.0/nanomelt/model/saved_models/NanoMelt_finalmodel/__init__.py +3 -0
  37. nanomelt-1.0.0/nanomelt/model/saved_models/NanoMelt_finalmodel/ensemb_pred.csv +641 -0
  38. nanomelt-1.0.0/nanomelt/model/saved_models/NanoMelt_finalmodel/ridge_ensemb.joblib +0 -0
  39. nanomelt-1.0.0/nanomelt/model/saved_models/NanoMelt_finalmodel/submodels_pred.csv +641 -0
  40. nanomelt-1.0.0/nanomelt/model/saved_models/__init__.py +3 -0
  41. nanomelt-1.0.0/nanomelt/model/stacking.py +192 -0
  42. nanomelt-1.0.0/nanomelt/predict.py +51 -0
  43. nanomelt-1.0.0/nanomelt/train.py +64 -0
  44. nanomelt-1.0.0/nanomelt.egg-info/PKG-INFO +23 -0
  45. nanomelt-1.0.0/nanomelt.egg-info/SOURCES.txt +49 -0
  46. nanomelt-1.0.0/nanomelt.egg-info/dependency_links.txt +1 -0
  47. nanomelt-1.0.0/nanomelt.egg-info/entry_points.txt +2 -0
  48. nanomelt-1.0.0/nanomelt.egg-info/requires.txt +13 -0
  49. nanomelt-1.0.0/nanomelt.egg-info/top_level.txt +1 -0
  50. nanomelt-1.0.0/setup.cfg +4 -0
  51. nanomelt-1.0.0/setup.py +36 -0
nanomelt-1.0.0/LICENSE ADDED
@@ -0,0 +1,443 @@
1
+ Copyright (c) 2024-present Aubin Ramon and Pietro Sormanni
2
+
3
+ Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)
4
+
5
+
6
+ Simplified summary:
7
+ https://creativecommons.org/licenses/by-nc-sa/4.0/
8
+
9
+ Full terms:
10
+ https://creativecommons.org/licenses/by-nc-sa/4.0/
11
+
12
+ By exercising the Licensed Rights (defined below), You accept and agree
13
+ to be bound by the terms and conditions of this Creative Commons
14
+ Attribution-NonCommercial-ShareAlike 4.0 International Public License
15
+ ("Public License"). To the extent this Public License may be
16
+ interpreted as a contract, You are granted the Licensed Rights in
17
+ consideration of Your acceptance of these terms and conditions, and the
18
+ Licensor grants You such rights in consideration of benefits the
19
+ Licensor receives from making the Licensed Material available under
20
+ these terms and conditions.
21
+
22
+
23
+ Section 1 -- Definitions.
24
+
25
+ a. Adapted Material means material subject to Copyright and Similar
26
+ Rights that is derived from or based upon the Licensed Material
27
+ and in which the Licensed Material is translated, altered,
28
+ arranged, transformed, or otherwise modified in a manner requiring
29
+ permission under the Copyright and Similar Rights held by the
30
+ Licensor. For purposes of this Public License, where the Licensed
31
+ Material is a musical work, performance, or sound recording,
32
+ Adapted Material is always produced where the Licensed Material is
33
+ synched in timed relation with a moving image.
34
+
35
+ b. Adapter's License means the license You apply to Your Copyright
36
+ and Similar Rights in Your contributions to Adapted Material in
37
+ accordance with the terms and conditions of this Public License.
38
+
39
+ c. BY-NC-SA Compatible License means a license listed at
40
+ creativecommons.org/compatiblelicenses, approved by Creative
41
+ Commons as essentially the equivalent of this Public License.
42
+
43
+ d. Copyright and Similar Rights means copyright and/or similar rights
44
+ closely related to copyright including, without limitation,
45
+ performance, broadcast, sound recording, and Sui Generis Database
46
+ Rights, without regard to how the rights are labeled or
47
+ categorized. For purposes of this Public License, the rights
48
+ specified in Section 2(b)(1)-(2) are not Copyright and Similar
49
+ Rights.
50
+
51
+ e. Effective Technological Measures means those measures that, in the
52
+ absence of proper authority, may not be circumvented under laws
53
+ fulfilling obligations under Article 11 of the WIPO Copyright
54
+ Treaty adopted on December 20, 1996, and/or similar international
55
+ agreements.
56
+
57
+ f. Exceptions and Limitations means fair use, fair dealing, and/or
58
+ any other exception or limitation to Copyright and Similar Rights
59
+ that applies to Your use of the Licensed Material.
60
+
61
+ g. License Elements means the license attributes listed in the name
62
+ of a Creative Commons Public License. The License Elements of this
63
+ Public License are Attribution, NonCommercial, and ShareAlike.
64
+
65
+ h. Licensed Material means the artistic or literary work, database,
66
+ or other material to which the Licensor applied this Public
67
+ License.
68
+
69
+ i. Licensed Rights means the rights granted to You subject to the
70
+ terms and conditions of this Public License, which are limited to
71
+ all Copyright and Similar Rights that apply to Your use of the
72
+ Licensed Material and that the Licensor has authority to license.
73
+
74
+ j. Licensor means the individual(s) or entity(ies) granting rights
75
+ under this Public License.
76
+
77
+ k. NonCommercial means not primarily intended for or directed towards
78
+ commercial advantage or monetary compensation. For purposes of
79
+ this Public License, the exchange of the Licensed Material for
80
+ other material subject to Copyright and Similar Rights by digital
81
+ file-sharing or similar means is NonCommercial provided there is
82
+ no payment of monetary compensation in connection with the
83
+ exchange.
84
+
85
+ l. Share means to provide material to the public by any means or
86
+ process that requires permission under the Licensed Rights, such
87
+ as reproduction, public display, public performance, distribution,
88
+ dissemination, communication, or importation, and to make material
89
+ available to the public including in ways that members of the
90
+ public may access the material from a place and at a time
91
+ individually chosen by them.
92
+
93
+ m. Sui Generis Database Rights means rights other than copyright
94
+ resulting from Directive 96/9/EC of the European Parliament and of
95
+ the Council of 11 March 1996 on the legal protection of databases,
96
+ as amended and/or succeeded, as well as other essentially
97
+ equivalent rights anywhere in the world.
98
+
99
+ n. You means the individual or entity exercising the Licensed Rights
100
+ under this Public License. Your has a corresponding meaning.
101
+
102
+
103
+ Section 2 -- Scope.
104
+
105
+ a. License grant.
106
+
107
+ 1. Subject to the terms and conditions of this Public License,
108
+ the Licensor hereby grants You a worldwide, royalty-free,
109
+ non-sublicensable, non-exclusive, irrevocable license to
110
+ exercise the Licensed Rights in the Licensed Material to:
111
+
112
+ a. reproduce and Share the Licensed Material, in whole or
113
+ in part, for NonCommercial purposes only; and
114
+
115
+ b. produce, reproduce, and Share Adapted Material for
116
+ NonCommercial purposes only.
117
+
118
+ 2. Exceptions and Limitations. For the avoidance of doubt, where
119
+ Exceptions and Limitations apply to Your use, this Public
120
+ License does not apply, and You do not need to comply with
121
+ its terms and conditions.
122
+
123
+ 3. Term. The term of this Public License is specified in Section
124
+ 6(a).
125
+
126
+ 4. Media and formats; technical modifications allowed. The
127
+ Licensor authorizes You to exercise the Licensed Rights in
128
+ all media and formats whether now known or hereafter created,
129
+ and to make technical modifications necessary to do so. The
130
+ Licensor waives and/or agrees not to assert any right or
131
+ authority to forbid You from making technical modifications
132
+ necessary to exercise the Licensed Rights, including
133
+ technical modifications necessary to circumvent Effective
134
+ Technological Measures. For purposes of this Public License,
135
+ simply making modifications authorized by this Section 2(a)
136
+ (4) never produces Adapted Material.
137
+
138
+ 5. Downstream recipients.
139
+
140
+ a. Offer from the Licensor -- Licensed Material. Every
141
+ recipient of the Licensed Material automatically
142
+ receives an offer from the Licensor to exercise the
143
+ Licensed Rights under the terms and conditions of this
144
+ Public License.
145
+
146
+ b. Additional offer from the Licensor -- Adapted Material.
147
+ Every recipient of Adapted Material from You
148
+ automatically receives an offer from the Licensor to
149
+ exercise the Licensed Rights in the Adapted Material
150
+ under the conditions of the Adapter's License You apply.
151
+
152
+ c. No downstream restrictions. You may not offer or impose
153
+ any additional or different terms or conditions on, or
154
+ apply any Effective Technological Measures to, the
155
+ Licensed Material if doing so restricts exercise of the
156
+ Licensed Rights by any recipient of the Licensed
157
+ Material.
158
+
159
+ 6. No endorsement. Nothing in this Public License constitutes or
160
+ may be construed as permission to assert or imply that You
161
+ are, or that Your use of the Licensed Material is, connected
162
+ with, or sponsored, endorsed, or granted official status by,
163
+ the Licensor or others designated to receive attribution as
164
+ provided in Section 3(a)(1)(A)(i).
165
+
166
+ b. Other rights.
167
+
168
+ 1. Moral rights, such as the right of integrity, are not
169
+ licensed under this Public License, nor are publicity,
170
+ privacy, and/or other similar personality rights; however, to
171
+ the extent possible, the Licensor waives and/or agrees not to
172
+ assert any such rights held by the Licensor to the limited
173
+ extent necessary to allow You to exercise the Licensed
174
+ Rights, but not otherwise.
175
+
176
+ 2. Patent and trademark rights are not licensed under this
177
+ Public License.
178
+
179
+ 3. To the extent possible, the Licensor waives any right to
180
+ collect royalties from You for the exercise of the Licensed
181
+ Rights, whether directly or through a collecting society
182
+ under any voluntary or waivable statutory or compulsory
183
+ licensing scheme. In all other cases the Licensor expressly
184
+ reserves any right to collect such royalties, including when
185
+ the Licensed Material is used other than for NonCommercial
186
+ purposes.
187
+
188
+
189
+ Section 3 -- License Conditions.
190
+
191
+ Your exercise of the Licensed Rights is expressly made subject to the
192
+ following conditions.
193
+
194
+ a. Attribution.
195
+
196
+ 1. If You Share the Licensed Material (including in modified
197
+ form), You must:
198
+
199
+ a. retain the following if it is supplied by the Licensor
200
+ with the Licensed Material:
201
+
202
+ i. identification of the creator(s) of the Licensed
203
+ Material and any others designated to receive
204
+ attribution, in any reasonable manner requested by
205
+ the Licensor (including by pseudonym if
206
+ designated);
207
+
208
+ ii. a copyright notice;
209
+
210
+ iii. a notice that refers to this Public License;
211
+
212
+ iv. a notice that refers to the disclaimer of
213
+ warranties;
214
+
215
+ v. a URI or hyperlink to the Licensed Material to the
216
+ extent reasonably practicable;
217
+
218
+ b. indicate if You modified the Licensed Material and
219
+ retain an indication of any previous modifications; and
220
+
221
+ c. indicate the Licensed Material is licensed under this
222
+ Public License, and include the text of, or the URI or
223
+ hyperlink to, this Public License.
224
+
225
+ 2. You may satisfy the conditions in Section 3(a)(1) in any
226
+ reasonable manner based on the medium, means, and context in
227
+ which You Share the Licensed Material. For example, it may be
228
+ reasonable to satisfy the conditions by providing a URI or
229
+ hyperlink to a resource that includes the required
230
+ information.
231
+ 3. If requested by the Licensor, You must remove any of the
232
+ information required by Section 3(a)(1)(A) to the extent
233
+ reasonably practicable.
234
+
235
+ b. ShareAlike.
236
+
237
+ In addition to the conditions in Section 3(a), if You Share
238
+ Adapted Material You produce, the following conditions also apply.
239
+
240
+ 1. The Adapter's License You apply must be a Creative Commons
241
+ license with the same License Elements, this version or
242
+ later, or a BY-NC-SA Compatible License.
243
+
244
+ 2. You must include the text of, or the URI or hyperlink to, the
245
+ Adapter's License You apply. You may satisfy this condition
246
+ in any reasonable manner based on the medium, means, and
247
+ context in which You Share Adapted Material.
248
+
249
+ 3. You may not offer or impose any additional or different terms
250
+ or conditions on, or apply any Effective Technological
251
+ Measures to, Adapted Material that restrict exercise of the
252
+ rights granted under the Adapter's License You apply.
253
+
254
+
255
+ Section 4 -- Sui Generis Database Rights.
256
+
257
+ Where the Licensed Rights include Sui Generis Database Rights that
258
+ apply to Your use of the Licensed Material:
259
+
260
+ a. for the avoidance of doubt, Section 2(a)(1) grants You the right
261
+ to extract, reuse, reproduce, and Share all or a substantial
262
+ portion of the contents of the database for NonCommercial purposes
263
+ only;
264
+
265
+ b. if You include all or a substantial portion of the database
266
+ contents in a database in which You have Sui Generis Database
267
+ Rights, then the database in which You have Sui Generis Database
268
+ Rights (but not its individual contents) is Adapted Material,
269
+ including for purposes of Section 3(b); and
270
+
271
+ c. You must comply with the conditions in Section 3(a) if You Share
272
+ all or a substantial portion of the contents of the database.
273
+
274
+ For the avoidance of doubt, this Section 4 supplements and does not
275
+ replace Your obligations under this Public License where the Licensed
276
+ Rights include other Copyright and Similar Rights.
277
+
278
+
279
+ Section 5 -- Disclaimer of Warranties and Limitation of Liability.
280
+
281
+ a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
282
+ EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
283
+ AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
284
+ ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
285
+ IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
286
+ WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
287
+ PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
288
+ ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
289
+ KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
290
+ ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
291
+
292
+ b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
293
+ TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
294
+ NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
295
+ INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
296
+ COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
297
+ USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
298
+ ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
299
+ DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
300
+ IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
301
+
302
+ c. The disclaimer of warranties and limitation of liability provided
303
+ above shall be interpreted in a manner that, to the extent
304
+ possible, most closely approximates an absolute disclaimer and
305
+ waiver of all liability.
306
+
307
+
308
+ Section 6 -- Term and Termination.
309
+
310
+ a. This Public License applies for the term of the Copyright and
311
+ Similar Rights licensed here. However, if You fail to comply with
312
+ this Public License, then Your rights under this Public License
313
+ terminate automatically.
314
+
315
+ b. Where Your right to use the Licensed Material has terminated under
316
+ Section 6(a), it reinstates:
317
+
318
+ 1. automatically as of the date the violation is cured, provided
319
+ it is cured within 30 days of Your discovery of the
320
+ violation; or
321
+
322
+ 2. upon express reinstatement by the Licensor.
323
+
324
+ For the avoidance of doubt, this Section 6(b) does not affect any
325
+ right the Licensor may have to seek remedies for Your violations
326
+ of this Public License.
327
+
328
+ c. For the avoidance of doubt, the Licensor may also offer the
329
+ Licensed Material under separate terms or conditions or stop
330
+ distributing the Licensed Material at any time; however, doing so
331
+ will not terminate this Public License.
332
+
333
+ d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
334
+ License.
335
+
336
+
337
+ Section 7 -- Other Terms and Conditions.
338
+
339
+ a. The Licensor shall not be bound by any additional or different
340
+ terms or conditions communicated by You unless expressly agreed.
341
+
342
+ b. Any arrangements, understandings, or agreements regarding the
343
+ Licensed Material not stated herein are separate from and
344
+ independent of the terms and conditions of this Public License.
345
+
346
+
347
+ Section 8 -- Interpretation.
348
+
349
+ a. For the avoidance of doubt, this Public License does not, and
350
+ shall not be interpreted to, reduce, limit, restrict, or impose
351
+ conditions on any use of the Licensed Material that could lawfully
352
+ be made without permission under this Public License.
353
+
354
+ b. To the extent possible, if any provision of this Public License is
355
+ deemed unenforceable, it shall be automatically reformed to the
356
+ minimum extent necessary to make it enforceable. If the provision
357
+ cannot be reformed, it shall be severed from this Public License
358
+ without affecting the enforceability of the remaining terms and
359
+ conditions.
360
+
361
+ c. No term or condition of this Public License will be waived and no
362
+ failure to comply consented to unless expressly agreed to by the
363
+ Licensor.
364
+
365
+ d. Nothing in this Public License constitutes or may be interpreted
366
+ as a limitation upon, or waiver of, any privileges and immunities
367
+ that apply to the Licensor or You, including from the legal
368
+ processes of any jurisdiction or authority.
369
+
370
+ =======================================================================
371
+
372
+ Creative Commons Corporation ("Creative Commons") is not a law firm and
373
+ does not provide legal services or legal advice. Distribution of
374
+ Creative Commons public licenses does not create a lawyer-client or
375
+ other relationship. Creative Commons makes its licenses and related
376
+ information available on an "as-is" basis. Creative Commons gives no
377
+ warranties regarding its licenses, any material licensed under their
378
+ terms and conditions, or any related information. Creative Commons
379
+ disclaims all liability for damages resulting from their use to the
380
+ fullest extent possible.
381
+
382
+ Using Creative Commons Public Licenses
383
+
384
+ Creative Commons public licenses provide a standard set of terms and
385
+ conditions that creators and other rights holders may use to share
386
+ original works of authorship and other material subject to copyright
387
+ and certain other rights specified in the public license below. The
388
+ following considerations are for informational purposes only, are not
389
+ exhaustive, and do not form part of our licenses.
390
+
391
+ Considerations for licensors: Our public licenses are
392
+ intended for use by those authorized to give the public
393
+ permission to use material in ways otherwise restricted by
394
+ copyright and certain other rights. Our licenses are
395
+ irrevocable. Licensors should read and understand the terms
396
+ and conditions of the license they choose before applying it.
397
+ Licensors should also secure all rights necessary before
398
+ applying our licenses so that the public can reuse the
399
+ material as expected. Licensors should clearly mark any
400
+ material not subject to the license. This includes other CC-
401
+ licensed material, or material used under an exception or
402
+ limitation to copyright. More considerations for licensors:
403
+ wiki.creativecommons.org/Considerations_for_licensors
404
+
405
+ Considerations for the public: By using one of our public
406
+ licenses, a licensor grants the public permission to use the
407
+ licensed material under specified terms and conditions. If
408
+ the licensor's permission is not necessary for any reason--for
409
+ example, because of any applicable exception or limitation to
410
+ copyright--then that use is not regulated by the license. Our
411
+ licenses grant only permissions under copyright and certain
412
+ other rights that a licensor has authority to grant. Use of
413
+ the licensed material may still be restricted for other
414
+ reasons, including because others have copyright or other
415
+ rights in the material. A licensor may make special requests,
416
+ such as asking that all changes be marked or described.
417
+ Although not required by our licenses, you are encouraged to
418
+ respect those requests where reasonable. More_considerations
419
+ for the public:
420
+ wiki.creativecommons.org/Considerations_for_licensees
421
+
422
+ =======================================================================
423
+
424
+ =======================================================================
425
+
426
+ Creative Commons is not a party to its public
427
+ licenses. Notwithstanding, Creative Commons may elect to apply one of
428
+ its public licenses to material it publishes and in those instances
429
+ will be considered the “Licensor.” The text of the Creative Commons
430
+ public licenses is dedicated to the public domain under the CC0 Public
431
+ Domain Dedication. Except for the limited purpose of indicating that
432
+ material is shared under a Creative Commons public license or as
433
+ otherwise permitted by the Creative Commons policies published at
434
+ creativecommons.org/policies, Creative Commons does not authorize the
435
+ use of the trademark "Creative Commons" or any other trademark or logo
436
+ of Creative Commons without its prior written consent including,
437
+ without limitation, in connection with any unauthorized modifications
438
+ to any of its public licenses or any other arrangements,
439
+ understandings, or agreements concerning use of licensed material. For
440
+ the avoidance of doubt, this paragraph does not form part of the
441
+ public licenses.
442
+
443
+ Creative Commons may be contacted at creativecommons.org.
@@ -0,0 +1 @@
1
+ include environment.yml
@@ -0,0 +1,23 @@
1
+ Metadata-Version: 2.1
2
+ Name: nanomelt
3
+ Version: 1.0.0
4
+ Summary: A nanobody thermostability prediction tool
5
+ Author: Aubin Ramon
6
+ Author-email: ar2033@cam.ac.uk
7
+ License: CC BY-NC-SA 4.0
8
+ License-File: LICENSE
9
+ Requires-Dist: scikit-learn
10
+ Requires-Dist: joblib
11
+ Requires-Dist: fair-esm
12
+ Requires-Dist: ablang
13
+ Requires-Dist: peptides
14
+ Requires-Dist: Immunebuilder
15
+ Requires-Dist: transformers
16
+ Requires-Dist: antiberty
17
+ Requires-Dist: xgboost
18
+ Requires-Dist: lightgbm
19
+ Requires-Dist: kmedoids
20
+ Requires-Dist: kneed
21
+ Requires-Dist: matplotlib
22
+
23
+ See READ.me in GitLab repository https://gitlab.developers.cam.ac.uk/ch/sormanni/nanomelt.git
@@ -0,0 +1,162 @@
1
+ # NanoMelt: semi-supervised ensemble model for nanobody thermostability prediction
2
+
3
+ </div>
4
+
5
+ ## License
6
+
7
+ Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) (see License file).
8
+ This software is not to be used for commerical purposes.
9
+
10
+ ## Reference
11
+
12
+ > Original publication (mAbs 2025): https://doi.org/10.1080/19420862.2024.2442750
13
+
14
+
15
+ ## Presentation
16
+
17
+ NanoMelt is a semi-supervised ensemble model trained to predict the apparent
18
+ melting temperatures of nanobodies.
19
+
20
+ The model involves a Ridge stacking of multiple Gaussian Process Regressors (GPRs)
21
+ and Suppot Vector Regressors (SVRs) combined with diverse pre-trained nanobody embeddings
22
+ (i.e., one-hot, VHSE, ESM-1b, and ESM-2).
23
+
24
+ * NanoMelt can be used via:
25
+ - `nanomelt predict`: to directly predict the apparent melting temperatures of given nanobodies, or
26
+ - `nanomelt train`: to retrain a custom model with your own dataset.
27
+
28
+ <strong>A webserver for nanobody thermostability prediction is available at https://www-cohsoftware.ch.cam.ac.uk/</strong>
29
+
30
+ You can find the parsed datasets of nanobody thermostabily in the `/datasets` directory.
31
+ All Jupyter notebooks used to create the figures in the original publication are available in the `/notebooks` directory.
32
+
33
+ ## Setup NanoMelt
34
+
35
+ > **Compatible with 3.12**
36
+
37
+ We recommend running NanoMelt on a `GPU` for optimal performance, as it relies on ESM models to generate input embeddings.
38
+
39
+ **Step 1. Ensure all conda dependencies are installed**
40
+
41
+ ```bash
42
+ conda install -c conda-forge openmm pdbfixer biopython
43
+ ```
44
+
45
+ **Step 2. Install ANARCI**
46
+
47
+ ```bash
48
+ # For Linux (x86_64)
49
+ conda install -c bioconda anarci
50
+
51
+ # For Apple Silicon (arm64), due to limited support, the following steps are recommended
52
+ conda install -c biocore hmmer
53
+ git clone https://github.com/oxpig/ANARCI.git
54
+ cd ANARCI
55
+ python setup.py install
56
+ conda install nomkl #Optional, for compatibility with numpy
57
+ ```
58
+
59
+ **Step 3. Install NanoMelt from PyPI**
60
+ ```
61
+ # Install from PyPI
62
+ pip install nanomelt
63
+ ```
64
+
65
+ ## NanoMelt command-line interface
66
+
67
+ ### 1 - Prediction of nanobody apparent melting temperatures
68
+
69
+ To predict the apparent melting temperature of nanobody sequences, use the `nanobody predict` command line. Parallelisation can be applied by specifying the number of cpus `-ncpu`. NanoMelt will automatically search for CUDA or Apple MX GPU to accelerate the embedding step.
70
+
71
+ <details>
72
+ <summary>See <strong>nanomelt predict</strong> command line description</summary>
73
+
74
+ ```
75
+ nanomelt predict [-h] [-i INPUT_FILEPATH_OR_SEQ] [-o OUTPUT_SAVEFP] [-align] [-ncpu NCPU]
76
+
77
+ Predict nanobody apparent melting temperatures with NanoMelt
78
+
79
+ optional arguments:
80
+ -h, --help show this help message and exit
81
+ -i INPUT_FILEPATH_OR_SEQ, --input_filepath_or_seq INPUT_FILEPATH_OR_SEQ
82
+ Filepath to the fasta file .fa to score or directly a single string sequence (default: to_score.fa)
83
+ -o OUTPUT_SAVEFP, --output_savefp OUTPUT_SAVEFP
84
+ Filename of the .csv file to save the predictions in (default: nanomelt_run.csv)
85
+ -align, --do_align Do the alignment and the cleaning of the given sequences before training. This step can takes a lot of time if the number of
86
+ sequences is huge. (default: False)
87
+ -ncpu NCPU, --ncpu NCPU
88
+ If ncpu>1 will parallelise the alignment process (default: 1)
89
+ ```
90
+ </details>
91
+
92
+
93
+ \
94
+ Testing files are presented in `/test`, with examples of output files.
95
+
96
+ Examples of `nanomelt predict` usage:
97
+
98
+ ```bash
99
+ # For one single sequence
100
+ nanomelt predict -i QVQLVESGGGLVQAGGSLRLSCAASGYIFGRNAMGWYRQAPGKERELVAGITRRGSITYYADSVKGRFTISRDNAKNTVYLQMNSLKPEDTAVYYCAADPASPAYGDYWGQGTQVTVSS -align
101
+
102
+ # Predict the apparent melting temepatures for a set of sequences in a fasta file
103
+ nanomelt predict -i test/application6.fa -o test/NanoMeltrun_application6.csv -align
104
+ ```
105
+
106
+ Additionally, NanoMelt can be used directly via its in-built function `NanoMeltPredPipe()`. It takes as inputs a list of SeqRecords (seq_records, see BioPython).
107
+ See description of function for further details. For instance:
108
+
109
+ ```bash
110
+ # Import
111
+ from nanomelt.model.nanomelt import NanoMeltPredPipe
112
+
113
+ # Run the model
114
+ data = NanoMeltPredPipe(seq_records, do_align=True, ncpus=4, verbose=True)
115
+ ```
116
+
117
+ ### 2 - Re-training NanoMelt
118
+
119
+ To re-train NanoMelt on a custom input dataset of nanobody sequences with their respective melting temperature, use the `nanomelt train` command line.
120
+ Be careful with the format of your input file (see command line description).
121
+
122
+ <details>
123
+ <summary>See <strong>nanomelt train</strong> command line description</summary>
124
+
125
+ ```
126
+ nanomelt train [-h] [-i INPUT_CSV] [-od OUTPUT_DIR] [-align] [-ncpu NCPU]
127
+
128
+ Train NanoMelt with a new input dataset.
129
+
130
+ optional arguments:
131
+ -h, --help show this help message and exit
132
+ -i INPUT_CSV, --input_csv INPUT_CSV
133
+ Filepath to the .csv file of the nanobody dataset. It needs to have at least columns with Id, Sequence, Experimental method
134
+ and Measured apparent melting temperature (C). (default: new_nano_thermostability_dataset.csv)
135
+ -od OUTPUT_DIR, --output_dir OUTPUT_DIR
136
+ Filepath to the output dir where to save the saved models (default: nanomelt_retrain)
137
+ -align, --do_align Do the alignment and the cleaning of the given sequences before training. This step can takes a lot of time if the number of
138
+ sequences is huge. (default: False)
139
+ -ncpu NCPU, --ncpu NCPU
140
+ If ncpu>1 will parallelise the algnment process (default: 1)
141
+ ```
142
+
143
+ </details>
144
+
145
+ Example of usage of `nanomelt train`:
146
+
147
+ ```bash
148
+ # Train.
149
+ nanomelt train -i datasets/NanoMelt_640_nanobody_apparent_melting_temperatures.csv -od test/nanomelt_retrain -align -ncpu 4
150
+ ```
151
+
152
+ ## Issues
153
+
154
+ - The installation of OpenMM might create troubles with your device. If you have an `import error` with `lib glibxx_3.4.30`, you could solve it with `export LD_LIBRARY_PATH=$CONDA_PREFIX/lib:$LD_LIBRARY_PATH` (issue due to AbNatiV installation).
155
+
156
+ If you experience any issues please add an issue to the [Gitlab] or contact directly ar2033@cam.ac.uk.
157
+
158
+ ## Contact
159
+
160
+ Please contact ar2033@cam.ac.uk to report issues of for any questions.
161
+
162
+
@@ -0,0 +1,31 @@
1
+ name: nanomelt
2
+ channels:
3
+ - nodefaults
4
+ - bioconda
5
+ - biocore
6
+ - conda-forge
7
+ dependencies:
8
+ - python>=3.8
9
+ - poetry
10
+ - hmmer
11
+ - anarci
12
+ - biopython
13
+ - nomkl
14
+ - openmm
15
+ - pdbfixer
16
+ - pip
17
+ - pip:
18
+ - scikit-learn
19
+ - joblib
20
+ - fair-esm
21
+ - ablang
22
+ - peptides
23
+ - Immunebuilder
24
+ - transformers
25
+ - antiberty
26
+ - xgboost
27
+ - lightgbm
28
+ - kmedoids
29
+ - kneed
30
+ - matplotlib
31
+
@@ -0,0 +1,3 @@
1
+ """
2
+ Copyright 2024. Aubin Ramon and Pietro Sormanni. CC BY-NC-SA 4.0
3
+ """