enzymetk 0.0.2__tar.gz → 0.0.6__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. {enzymetk-0.0.2 → enzymetk-0.0.6}/PKG-INFO +39 -8
  2. {enzymetk-0.0.2 → enzymetk-0.0.6}/README.md +35 -0
  3. {enzymetk-0.0.2 → enzymetk-0.0.6}/enzymetk/__init__.py +1 -24
  4. {enzymetk-0.0.2 → enzymetk-0.0.6}/enzymetk/annotateEC_CLEAN_step.py +2 -2
  5. {enzymetk-0.0.2 → enzymetk-0.0.6}/enzymetk/annotateEC_CREEP_step.py +1 -1
  6. enzymetk-0.0.6/enzymetk/dock_boltz_step.py +46 -0
  7. {enzymetk-0.0.2 → enzymetk-0.0.6}/enzymetk/dock_chai_step.py +5 -3
  8. {enzymetk-0.0.2 → enzymetk-0.0.6}/enzymetk/dock_vina_step.py +49 -16
  9. enzymetk-0.0.6/enzymetk/embedprotein_esm3_step.py +71 -0
  10. {enzymetk-0.0.2 → enzymetk-0.0.6}/enzymetk/embedprotein_esm_step.py +5 -4
  11. {enzymetk-0.0.2 → enzymetk-0.0.6}/enzymetk/inpaint_ligandMPNN_step.py +3 -2
  12. {enzymetk-0.0.2 → enzymetk-0.0.6}/enzymetk/predict_catalyticsite_step.py +20 -12
  13. {enzymetk-0.0.2 → enzymetk-0.0.6}/enzymetk/similarity_foldseek_step.py +3 -4
  14. {enzymetk-0.0.2 → enzymetk-0.0.6}/enzymetk/similarity_reaction_step.py +12 -8
  15. {enzymetk-0.0.2 → enzymetk-0.0.6}/enzymetk/similarity_substrate_step.py +8 -2
  16. {enzymetk-0.0.2 → enzymetk-0.0.6}/enzymetk/step.py +5 -3
  17. {enzymetk-0.0.2 → enzymetk-0.0.6}/enzymetk.egg-info/PKG-INFO +39 -8
  18. {enzymetk-0.0.2 → enzymetk-0.0.6}/enzymetk.egg-info/SOURCES.txt +2 -0
  19. enzymetk-0.0.6/enzymetk.egg-info/requires.txt +6 -0
  20. {enzymetk-0.0.2 → enzymetk-0.0.6}/setup.py +3 -7
  21. enzymetk-0.0.2/enzymetk.egg-info/requires.txt +0 -11
  22. {enzymetk-0.0.2 → enzymetk-0.0.6}/LICENSE +0 -0
  23. {enzymetk-0.0.2 → enzymetk-0.0.6}/enzymetk/annotateEC_proteinfer_step.py +0 -0
  24. {enzymetk-0.0.2 → enzymetk-0.0.6}/enzymetk/embedchem_chemberta_step.py +0 -0
  25. {enzymetk-0.0.2 → enzymetk-0.0.6}/enzymetk/embedchem_rxnfp_run.py +0 -0
  26. {enzymetk-0.0.2 → enzymetk-0.0.6}/enzymetk/embedchem_rxnfp_step.py +0 -0
  27. {enzymetk-0.0.2 → enzymetk-0.0.6}/enzymetk/embedchem_selformer_run.py +0 -0
  28. {enzymetk-0.0.2 → enzymetk-0.0.6}/enzymetk/embedchem_selformer_step.py +0 -0
  29. {enzymetk-0.0.2 → enzymetk-0.0.6}/enzymetk/embedchem_unimol_step.py +0 -0
  30. {enzymetk-0.0.2 → enzymetk-0.0.6}/enzymetk/esm-extract.py +0 -0
  31. {enzymetk-0.0.2 → enzymetk-0.0.6}/enzymetk/filter_sequence_step.py +0 -0
  32. {enzymetk-0.0.2 → enzymetk-0.0.6}/enzymetk/filter_structure_step.py +0 -0
  33. {enzymetk-0.0.2 → enzymetk-0.0.6}/enzymetk/generate_msa_step.py +0 -0
  34. {enzymetk-0.0.2 → enzymetk-0.0.6}/enzymetk/generate_oligopool_step.py +0 -0
  35. {enzymetk-0.0.2 → enzymetk-0.0.6}/enzymetk/generate_tree_step.py +0 -0
  36. {enzymetk-0.0.2 → enzymetk-0.0.6}/enzymetk/main.py +0 -0
  37. {enzymetk-0.0.2 → enzymetk-0.0.6}/enzymetk/metagenomics_porechop_trim_reads_step.py +0 -0
  38. {enzymetk-0.0.2 → enzymetk-0.0.6}/enzymetk/metagenomics_prokka_annotate_genes.py +0 -0
  39. {enzymetk-0.0.2 → enzymetk-0.0.6}/enzymetk/pipeline.py +0 -0
  40. {enzymetk-0.0.2 → enzymetk-0.0.6}/enzymetk/predict_activity_step.py +0 -0
  41. {enzymetk-0.0.2 → enzymetk-0.0.6}/enzymetk/predict_catalyticsite_run.py +0 -0
  42. {enzymetk-0.0.2 → enzymetk-0.0.6}/enzymetk/reducedim_pca_run.py +0 -0
  43. {enzymetk-0.0.2 → enzymetk-0.0.6}/enzymetk/reducedim_vae_run.py +0 -0
  44. {enzymetk-0.0.2 → enzymetk-0.0.6}/enzymetk/reducedim_vae_step.py +0 -0
  45. {enzymetk-0.0.2 → enzymetk-0.0.6}/enzymetk/save_step.py +0 -0
  46. {enzymetk-0.0.2 → enzymetk-0.0.6}/enzymetk/sequence_search_blast.py +0 -0
  47. {enzymetk-0.0.2 → enzymetk-0.0.6}/enzymetk/similarity_mmseqs_step.py +0 -0
  48. {enzymetk-0.0.2 → enzymetk-0.0.6}/enzymetk.egg-info/dependency_links.txt +0 -0
  49. {enzymetk-0.0.2 → enzymetk-0.0.6}/enzymetk.egg-info/entry_points.txt +0 -0
  50. {enzymetk-0.0.2 → enzymetk-0.0.6}/enzymetk.egg-info/top_level.txt +0 -0
  51. {enzymetk-0.0.2 → enzymetk-0.0.6}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: enzymetk
3
- Version: 0.0.2
3
+ Version: 0.0.6
4
4
  Home-page: https://github.com/arianemora/enzyme-tk/
5
5
  Author: Ariane Mora
6
6
  Author-email: ariane.n.mora@gmail.com
@@ -18,17 +18,12 @@ Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
18
18
  Requires-Python: >=3.8
19
19
  Description-Content-Type: text/markdown
20
20
  License-File: LICENSE
21
- Requires-Dist: fair-esm
22
21
  Requires-Dist: scikit-learn
23
22
  Requires-Dist: numpy
24
23
  Requires-Dist: seaborn
25
24
  Requires-Dist: sciutil
26
- Requires-Dist: pandas==2.1.4
25
+ Requires-Dist: pandas
27
26
  Requires-Dist: biopython
28
- Requires-Dist: sentence_transformers
29
- Requires-Dist: pubchempy
30
- Requires-Dist: pyfaidx
31
- Requires-Dist: spacy
32
27
  Dynamic: author
33
28
  Dynamic: author-email
34
29
  Dynamic: classifier
@@ -37,6 +32,7 @@ Dynamic: description-content-type
37
32
  Dynamic: home-page
38
33
  Dynamic: keywords
39
34
  Dynamic: license
35
+ Dynamic: license-file
40
36
  Dynamic: project-url
41
37
  Dynamic: requires-dist
42
38
  Dynamic: requires-python
@@ -45,6 +41,9 @@ Dynamic: requires-python
45
41
 
46
42
  Enzyme-tk is a collection of tools for enzyme engineering, setup as interoperable modules that act on dataframes. These modules are designed to be imported into pipelines for specific function. For this reason, `steps` as each module is called (e.g. finding similar proteins with `BLAST` would be considered a step) are designed to be as light as possible. An example of a pipeline is the [annotate-e](https://github.com/ArianeMora/annotate-e) ` pipeline, this acts to annotate a fasta with an ensemble of methods (each is designated as an Enzyme-tk step).
47
43
 
44
+
45
+ **If you have any issues installing, let me know - this has been tested only on Linux/Ubuntu. Please post an issue!**
46
+
48
47
  ## Installation
49
48
 
50
49
  ## Install base package to import modules
@@ -71,6 +70,7 @@ This is a work-in progress! e.g. some tools (e.g. proteInfer and CLEAN) require
71
70
 
72
71
  Here are some of the tools that have been implemented to be chained together as a pipeline:
73
72
 
73
+ [boltz2](https://github.com/jwohlwend/boltz)
74
74
  [mmseqs2](https://github.com/soedinglab/mmseqs2)
75
75
  [foldseek](https://github.com/steineggerlab/foldseek)
76
76
  [diamond](https://github.com/bbuchfink/diamond)
@@ -89,6 +89,7 @@ Here are some of the tools that have been implemented to be chained together as
89
89
  [fasttree](https://morgannprice.github.io/fasttree/)
90
90
  [Porechop](https://github.com/rrwick/Porechop)
91
91
  [prokka](https://github.com/tseemann/prokka)
92
+
92
93
  ## Things to note
93
94
 
94
95
  All the tools use the conda env of `enzymetk` by default.
@@ -120,6 +121,8 @@ The steps are the main building blocks of the pipeline. They are responsible for
120
121
 
121
122
  BLAST is a tool for searching a database of sequences for similar sequences. Here you can either pass a database that you have already created or pass the sequences as part of your dataframe and pass the label column (this needs to have two values: reference and query) reference refers to sequences that you want to search against and query refers to sequences that you want to search for.
122
123
 
124
+ Note you need to have installed the BLAST environment.
125
+
123
126
  ```python
124
127
  id_col = 'Entry'
125
128
  seq_col = 'Sequence'
@@ -148,6 +151,34 @@ df = pd.DataFrame(rows, columns=[id_col, seq_col])
148
151
  print(df)
149
152
  df << (ActiveSitePred(id_col, seq_col, squidly_dir, num_threads) >> Save('tmp/squidly_as_pred.pkl'))
150
153
 
154
+ ```
155
+ ### Boltz2
156
+
157
+ Boltz2 is a model for predicting structures. Note you need docko installed as I run via that.
158
+
159
+ Below is an example using boltz with 4 threads, and uses a cofactor (intermediate in this case). Just set to be None for a single substrate version.
160
+ ```
161
+ import sys
162
+ from enzymetk.dock_boltz_step import Boltz
163
+ from enzymetk.save_step import Save
164
+ import pandas as pd
165
+ import os
166
+ os.environ['MKL_THREADING_LAYER'] = 'GNU'
167
+
168
+ output_dir = 'tmp/'
169
+ num_threads = 4
170
+ id_col = 'Entry'
171
+ seq_col = 'Sequence'
172
+ substrate_col = 'Substrate'
173
+ intermediate_col = 'Intermediate'
174
+
175
+ rows = [['P0DP23_boltz_8999', 'MALWMRLLPLLALLALWGPDPAAAMALWMRLLPLLALLALWGPDPAAAMALWMRLLPLLALLALWGPDPAAA', 'CCCCC(CC)COC(=O)C1=CC=CC=C1C(=O)OCC(CC)CCCC', 'CC1=C(C2=CC3=C(C(=C([N-]3)C=C4C(=C(C(=N4)C=C5C(=C(C(=N5)C=C1[N-]2)C)C=C)C)C=C)C)CCC(=O)[O-])CCC(=O)[O-].[Fe]'],
176
+ ['P0DP24_boltz_p1', 'MALWMRLLPLLALLALWGPDPAAAMALWMRLLPLLALLALWGPDPAAAMALWMRLLPLLALLALWGPDPAAA', 'CCCCC(CC)COC(=O)C1=CC=CC=C1C(=O)OCC(CC)CCCC', 'CC1=C(C2=CC3=C(C(=C([N-]3)C=C4C(=C(C(=N4)C=C5C(=C(C(=N5)C=C1[N-]2)C)C=C)C)C=C)C)CCC(=O)[O-])CCC(=O)[O-].[Fe]'],
177
+ ['P0DP23_boltz_p2', 'MALWMRLLPLLALLALWGPDPAAAMALWMRLLPLLALLALWGPDPAAAMALWMRLLPLLALLALWGPDPAAA', 'CCCCC(CC)COC(=O)C1=CC=CC=C1C(=O)OCC(CC)CCCC', 'CC1=C(C2=CC3=C(C(=C([N-]3)C=C4C(=C(C(=N4)C=C5C(=C(C(=N5)C=C1[N-]2)C)C=C)C)C=C)C)CCC(=O)[O-])CCC(=O)[O-].[Fe]'],
178
+ ['P0DP24_boltz_p3', 'MALWMRLLPLLALLALWGPDPAAAMALWMRLLPLLALLALWGPDPAAAMALWMRLLPLLALLALWGPDPAAA', 'CCCCC(CC)COC(=O)C1=CC=CC=C1C(=O)OCC(CC)CCCC', 'CC1=C(C2=CC3=C(C(=C([N-]3)C=C4C(=C(C(=N4)C=C5C(=C(C(=N5)C=C1[N-]2)C)C=C)C)C=C)C)CCC(=O)[O-])CCC(=O)[O-].[Fe]'],
179
+ ['P0DP24_boltz_p4', 'MALWMRLLPLLALLALWGPDPAAAMALWMRLLPLLALLALWGPDPAAAMALWMRLLPLLALLALWGPDPAAA', 'CCCCC(CC)COC(=O)C1=CC=CC=C1C(=O)OCC(CC)CCCC', 'CC1=C(C2=CC3=C(C(=C([N-]3)C=C4C(=C(C(=N4)C=C5C(=C(C(=N5)C=C1[N-]2)C)C=C)C)C=C)C)CCC(=O)[O-])CCC(=O)[O-].[Fe]']]
180
+ df = pd.DataFrame(rows, columns=[id_col, seq_col, substrate_col, intermediate_col])
181
+ df << (Boltz(id_col, seq_col, substrate_col, intermediate_col, f'{output_dir}', num_threads) >> Save(f'{output_dir}test.pkl'))
151
182
  ```
152
183
 
153
184
  ### Chai
@@ -2,6 +2,9 @@
2
2
 
3
3
  Enzyme-tk is a collection of tools for enzyme engineering, setup as interoperable modules that act on dataframes. These modules are designed to be imported into pipelines for specific function. For this reason, `steps` as each module is called (e.g. finding similar proteins with `BLAST` would be considered a step) are designed to be as light as possible. An example of a pipeline is the [annotate-e](https://github.com/ArianeMora/annotate-e) ` pipeline, this acts to annotate a fasta with an ensemble of methods (each is designated as an Enzyme-tk step).
4
4
 
5
+
6
+ **If you have any issues installing, let me know - this has been tested only on Linux/Ubuntu. Please post an issue!**
7
+
5
8
  ## Installation
6
9
 
7
10
  ## Install base package to import modules
@@ -28,6 +31,7 @@ This is a work-in progress! e.g. some tools (e.g. proteInfer and CLEAN) require
28
31
 
29
32
  Here are some of the tools that have been implemented to be chained together as a pipeline:
30
33
 
34
+ [boltz2](https://github.com/jwohlwend/boltz)
31
35
  [mmseqs2](https://github.com/soedinglab/mmseqs2)
32
36
  [foldseek](https://github.com/steineggerlab/foldseek)
33
37
  [diamond](https://github.com/bbuchfink/diamond)
@@ -46,6 +50,7 @@ Here are some of the tools that have been implemented to be chained together as
46
50
  [fasttree](https://morgannprice.github.io/fasttree/)
47
51
  [Porechop](https://github.com/rrwick/Porechop)
48
52
  [prokka](https://github.com/tseemann/prokka)
53
+
49
54
  ## Things to note
50
55
 
51
56
  All the tools use the conda env of `enzymetk` by default.
@@ -77,6 +82,8 @@ The steps are the main building blocks of the pipeline. They are responsible for
77
82
 
78
83
  BLAST is a tool for searching a database of sequences for similar sequences. Here you can either pass a database that you have already created or pass the sequences as part of your dataframe and pass the label column (this needs to have two values: reference and query) reference refers to sequences that you want to search against and query refers to sequences that you want to search for.
79
84
 
85
+ Note you need to have installed the BLAST environment.
86
+
80
87
  ```python
81
88
  id_col = 'Entry'
82
89
  seq_col = 'Sequence'
@@ -105,6 +112,34 @@ df = pd.DataFrame(rows, columns=[id_col, seq_col])
105
112
  print(df)
106
113
  df << (ActiveSitePred(id_col, seq_col, squidly_dir, num_threads) >> Save('tmp/squidly_as_pred.pkl'))
107
114
 
115
+ ```
116
+ ### Boltz2
117
+
118
+ Boltz2 is a model for predicting structures. Note you need docko installed as I run via that.
119
+
120
+ Below is an example using boltz with 4 threads, and uses a cofactor (intermediate in this case). Just set to be None for a single substrate version.
121
+ ```
122
+ import sys
123
+ from enzymetk.dock_boltz_step import Boltz
124
+ from enzymetk.save_step import Save
125
+ import pandas as pd
126
+ import os
127
+ os.environ['MKL_THREADING_LAYER'] = 'GNU'
128
+
129
+ output_dir = 'tmp/'
130
+ num_threads = 4
131
+ id_col = 'Entry'
132
+ seq_col = 'Sequence'
133
+ substrate_col = 'Substrate'
134
+ intermediate_col = 'Intermediate'
135
+
136
+ rows = [['P0DP23_boltz_8999', 'MALWMRLLPLLALLALWGPDPAAAMALWMRLLPLLALLALWGPDPAAAMALWMRLLPLLALLALWGPDPAAA', 'CCCCC(CC)COC(=O)C1=CC=CC=C1C(=O)OCC(CC)CCCC', 'CC1=C(C2=CC3=C(C(=C([N-]3)C=C4C(=C(C(=N4)C=C5C(=C(C(=N5)C=C1[N-]2)C)C=C)C)C=C)C)CCC(=O)[O-])CCC(=O)[O-].[Fe]'],
137
+ ['P0DP24_boltz_p1', 'MALWMRLLPLLALLALWGPDPAAAMALWMRLLPLLALLALWGPDPAAAMALWMRLLPLLALLALWGPDPAAA', 'CCCCC(CC)COC(=O)C1=CC=CC=C1C(=O)OCC(CC)CCCC', 'CC1=C(C2=CC3=C(C(=C([N-]3)C=C4C(=C(C(=N4)C=C5C(=C(C(=N5)C=C1[N-]2)C)C=C)C)C=C)C)CCC(=O)[O-])CCC(=O)[O-].[Fe]'],
138
+ ['P0DP23_boltz_p2', 'MALWMRLLPLLALLALWGPDPAAAMALWMRLLPLLALLALWGPDPAAAMALWMRLLPLLALLALWGPDPAAA', 'CCCCC(CC)COC(=O)C1=CC=CC=C1C(=O)OCC(CC)CCCC', 'CC1=C(C2=CC3=C(C(=C([N-]3)C=C4C(=C(C(=N4)C=C5C(=C(C(=N5)C=C1[N-]2)C)C=C)C)C=C)C)CCC(=O)[O-])CCC(=O)[O-].[Fe]'],
139
+ ['P0DP24_boltz_p3', 'MALWMRLLPLLALLALWGPDPAAAMALWMRLLPLLALLALWGPDPAAAMALWMRLLPLLALLALWGPDPAAA', 'CCCCC(CC)COC(=O)C1=CC=CC=C1C(=O)OCC(CC)CCCC', 'CC1=C(C2=CC3=C(C(=C([N-]3)C=C4C(=C(C(=N4)C=C5C(=C(C(=N5)C=C1[N-]2)C)C=C)C)C=C)C)CCC(=O)[O-])CCC(=O)[O-].[Fe]'],
140
+ ['P0DP24_boltz_p4', 'MALWMRLLPLLALLALWGPDPAAAMALWMRLLPLLALLALWGPDPAAAMALWMRLLPLLALLALWGPDPAAA', 'CCCCC(CC)COC(=O)C1=CC=CC=C1C(=O)OCC(CC)CCCC', 'CC1=C(C2=CC3=C(C(=C([N-]3)C=C4C(=C(C(=N4)C=C5C(=C(C(=N5)C=C1[N-]2)C)C=C)C)C=C)C)CCC(=O)[O-])CCC(=O)[O-].[Fe]']]
141
+ df = pd.DataFrame(rows, columns=[id_col, seq_col, substrate_col, intermediate_col])
142
+ df << (Boltz(id_col, seq_col, substrate_col, intermediate_col, f'{output_dir}', num_threads) >> Save(f'{output_dir}test.pkl'))
108
143
  ```
109
144
 
110
145
  ### Chai
@@ -22,34 +22,11 @@ Date: March 2025
22
22
  __title__ = 'enzymetk'
23
23
  __description__ = 'Toolkit for enzymes and what not'
24
24
  __url__ = 'https://github.com/arianemora/enzyme-tk/'
25
- __version__ = '0.0.2'
25
+ __version__ = '0.0.6'
26
26
  __author__ = 'Ariane Mora'
27
27
  __author_email__ = 'ariane.n.mora@gmail.com'
28
28
  __license__ = 'GPL3'
29
29
 
30
- # from enzymetk.step import *
31
- # from enzymetk.generate_msa_step import ClustalOmega
32
- # from enzymetk.annotateEC_CLEAN_step import CLEAN
33
- # from enzymetk.annotateEC_proteinfer_step import ProteInfer
34
- # from enzymetk.dock_chai_step import Chai
35
- # from enzymetk.dock_vina_step import Vina
36
- # from enzymetk.embedchem_chemberta_step import ChemBERT
37
- # from enzymetk.embedchem_rxnfp_step import RxnFP
38
- # from enzymetk.embedchem_selformer_step import SelFormer
39
- # from enzymetk.embedchem_unimol_step import UniMol
40
- # from enzymetk.embedprotein_esm_step import EmbedESM
41
- # from enzymetk.generate_tree_step import FastTree
42
- # from enzymetk.inpaint_ligandMPNN_step import LigandMPNN
43
- # from enzymetk.metagenomics_porechop_trim_reads_step import PoreChop
44
- # from enzymetk.metagenomics_prokka_annotate_genes import Prokka
45
- # #from enzymetk.predict_activity_step import
46
- # from enzymetk.predict_catalyticsite_step import ActiveSitePred
47
- # from enzymetk.sequence_search_blast import BLAST
48
- # from enzymetk.similarity_foldseek_step import FoldSeek
49
- # from enzymetk.similarity_mmseqs_step import MMseqs
50
- # from enzymetk.similarity_reaction_step import ReactionDist
51
- # from enzymetk.similarity_substrate_step import SubstrateDist
52
-
53
30
 
54
31
 
55
32
 
@@ -116,7 +116,7 @@ class CLEAN(Step):
116
116
  print(output_filenames)
117
117
  for sub_df in output_filenames:
118
118
  df = pd.concat([df, sub_df])
119
- return df
119
+ return self.__filter_df(df)
120
120
  else:
121
- return self.__execute([df, tmp_dir])
121
+ return self.__filter_df(self.__execute([df, tmp_dir]))
122
122
  return df
@@ -38,7 +38,7 @@ class CREEP(Step):
38
38
  self.args_extract = args_extract
39
39
  self.args_retrieval = args_retrieval
40
40
 
41
- def __execute(self, df: pd.DataFrame, tmp_dir: str) -> pd.DataFrame:
41
+ def __execute(self, df: pd.DataFrame, tmp_dir: str):
42
42
  tmp_dir = '/disk1/ariane/vscode/degradeo/pipeline/tmp/'
43
43
  input_filename = f'{tmp_dir}/creepasjkdkajshdkja.csv'
44
44
  df.to_csv(input_filename, index=False)
@@ -0,0 +1,46 @@
1
+ from enzymetk.step import Step
2
+ import pandas as pd
3
+ from docko.boltz import run_boltz_affinity
4
+ import logging
5
+ import numpy as np
6
+ from multiprocessing.dummy import Pool as ThreadPool
7
+
8
+
9
+ logger = logging.getLogger(__name__)
10
+ logger.setLevel(logging.INFO)
11
+
12
+
13
+ class Boltz(Step):
14
+
15
+ def __init__(self, id_col: str, seq_col: str, substrate_col: str, intermediate_col: str, output_dir: str, num_threads: int):
16
+ self.id_col = id_col
17
+ self.seq_col = seq_col
18
+ self.substrate_col = substrate_col
19
+ self.intermediate_col = intermediate_col
20
+ self.output_dir = output_dir or None
21
+ self.num_threads = num_threads or 1
22
+
23
+ def __execute(self, df: pd.DataFrame) -> pd.DataFrame:
24
+ output_filenames = []
25
+
26
+ for run_id, seq, substrate, intermediate in df[[self.id_col, self.seq_col, self.substrate_col, self.intermediate_col]].values:
27
+ # Might have an issue if the things are not correctly installed in the same dicrectory
28
+ if not isinstance(substrate, str):
29
+ substrate = ''
30
+ print(run_id, seq, substrate)
31
+ run_boltz_affinity(run_id, seq, substrate, self.output_dir, intermediate)
32
+ output_filenames.append(f'{self.output_dir}/{run_id}/')
33
+ return output_filenames
34
+
35
+ def execute(self, df: pd.DataFrame) -> pd.DataFrame:
36
+ if self.output_dir:
37
+ if self.num_threads > 1:
38
+ pool = ThreadPool(self.num_threads)
39
+ df_list = np.array_split(df, self.num_threads)
40
+ results = pool.map(self.__execute, df_list)
41
+ else:
42
+ results = self.__execute(df)
43
+ df['output_dir'] = results
44
+ return df
45
+ else:
46
+ print('No output directory provided')
@@ -11,16 +11,17 @@ logger.setLevel(logging.INFO)
11
11
 
12
12
  class Chai(Step):
13
13
 
14
- def __init__(self, id_col: str, seq_col: str, substrate_col: str, output_dir: str, num_threads: int):
14
+ def __init__(self, id_col: str, seq_col: str, substrate_col: str, cofactor_col: str, output_dir: str, num_threads: int):
15
15
  self.id_col = id_col
16
16
  self.seq_col = seq_col
17
17
  self.substrate_col = substrate_col
18
+ self.cofactor_col = cofactor_col
18
19
  self.output_dir = output_dir or None
19
20
  self.num_threads = num_threads or 1
20
21
 
21
22
  def __execute(self, df: pd.DataFrame, tmp_dir: str) -> pd.DataFrame:
22
23
  output_filenames = []
23
- for run_id, seq, substrate in df[[self.id_col, self.seq_col, self.substrate_col]].values:
24
+ for run_id, seq, substrate, cofactor in df[[self.id_col, self.seq_col, self.substrate_col, self.cofactor_col]].values:
24
25
  # Might have an issue if the things are not correctly installed in the same dicrectory
25
26
  if not isinstance(substrate, str):
26
27
  substrate = ''
@@ -28,7 +29,8 @@ class Chai(Step):
28
29
  run_chai(run_id, # name
29
30
  seq, # sequence
30
31
  substrate, # ligand as smiles
31
- tmp_dir)
32
+ tmp_dir,
33
+ cofactor) # cofactor as smiles
32
34
  output_filenames.append(f'{tmp_dir}/{run_id}/')
33
35
  return output_filenames
34
36
 
@@ -4,6 +4,7 @@ from docko.docko import *
4
4
  import logging
5
5
  import numpy as np
6
6
  import os
7
+ from pathlib import Path
7
8
  from multiprocessing.dummy import Pool as ThreadPool
8
9
 
9
10
  logger = logging.getLogger(__name__)
@@ -21,34 +22,66 @@ class Vina(Step):
21
22
  self.substrate_col = substrate_col
22
23
  self.substrate_name_col = substrate_name_col
23
24
  self.active_site_col = active_site_col # Expects active site residues as a string separated by |
24
- self.output_dir = output_dir or None
25
+ self.output_dir = Path( output_dir) or None
25
26
  self.num_threads = num_threads or 1
26
27
 
27
28
  def __execute(self, df: pd.DataFrame) -> pd.DataFrame:
28
29
  output_filenames = []
29
30
  # ToDo: update to create from sequence if the path doesn't exist.
30
31
  for label, structure_path, seq, substrate_smiles, substrate_name, residues in df[[self.id_col, self.structure_col, self.sequence_col, self.substrate_col, self.substrate_name_col, self.active_site_col]].values:
31
- os.system(f'mkdir {self.output_dir}{label}')
32
+
32
33
  try:
34
+ structure_path = str(structure_path)
33
35
  residues = str(residues)
34
36
  residues = [int(r) + 1 for r in residues.split('|')]
35
- if not os.path.exists(f'{structure_path}'):
36
- # Try get the AF2 structure we expect the label to be the uniprot id
37
- get_alphafold_structure(label, f'{self.output_dir}{label}/{label}_AF2.pdb')
38
- structure_path = f'{self.output_dir}{label}/{label}_AF2.pdb'
39
- clean_one_pdb(f'{structure_path}', f'{self.output_dir}{label}/{label}.pdb')
40
- pdb_to_pdbqt_protein(f'{self.output_dir}{label}/{label}.pdb', f'{self.output_dir}{label}/{label}.pdbqt')
41
- score = dock(sequence='', protein_name=label, smiles=substrate_smiles, ligand_name=substrate_name, residues=residues,
42
- protein_dir=f'{self.output_dir}', ligand_dir=f'{self.output_dir}', output_dir=f'{self.output_dir}{label}/', pH=7.4,
43
- method='vina', size_x=10.0, size_y=10.0, size_z=10.0)
44
- output_filename = f'{self.output_dir}{label}/{label}.pdb'
45
- output_filenames.append(output_filename)
37
+
38
+ label_dir = self.output_dir / label
39
+ label_dir.mkdir(parents=True, exist_ok=True)
40
+ structure_path = Path(structure_path)
41
+
42
+ if not structure_path.exists():
43
+ # Try to download AF2 structure
44
+ get_alphafold_structure(label, label_dir / f"{label}_AF2.pdb")
45
+ structure_path = label_dir / f"{label}_AF2.pdb"
46
+
47
+ # Skip if still not found
48
+ if not structure_path.exists():
49
+ print(f"Skipping {label}: AF2 structure not found.")
50
+ output_filenames.append(None)
51
+ continue
52
+
53
+ # Proceed with docking
54
+ pdb_path = label_dir / f"{label}.pdb"
55
+ pdbqt_path = label_dir / f"{label}.pdbqt"
56
+
57
+ clean_one_pdb(str(structure_path), str(pdb_path))
58
+ pdb_to_pdbqt_protein(str(pdb_path), str(pdbqt_path))
59
+
60
+ score = dock(
61
+ sequence='',
62
+ protein_name=label,
63
+ smiles=substrate_smiles,
64
+ ligand_name=substrate_name,
65
+ residues=residues,
66
+ protein_dir=str(self.output_dir),
67
+ ligand_dir=str(self.output_dir),
68
+ output_dir=str(label_dir),
69
+ pH=7.4,
70
+ method='vina',
71
+ size_x=10.0,
72
+ size_y=10.0,
73
+ size_z=10.0
74
+ )
75
+
76
+ output_filenames.append(str(pdb_path))
77
+
46
78
  except Exception as e:
47
79
  print(f'Error docking {label}: {e}')
48
80
  output_filenames.append(None)
81
+
49
82
  return output_filenames
50
-
51
-
83
+
84
+
52
85
  def execute(self, df: pd.DataFrame) -> pd.DataFrame:
53
86
  if self.output_dir:
54
87
  if self.num_threads > 1:
@@ -60,4 +93,4 @@ class Vina(Step):
60
93
  df['output_dir'] = results
61
94
  return df
62
95
  else:
63
- print('No output directory provided')
96
+ print('No output directory provided')
@@ -0,0 +1,71 @@
1
+ # ESM 3 script
2
+ from esm.sdk.api import ESMProtein
3
+ from tempfile import TemporaryDirectory
4
+ import torch
5
+ import os
6
+ import pandas as pd
7
+ from esm.models.esm3 import ESM3
8
+ from esm.sdk.api import ESMProtein, SamplingConfig
9
+ from huggingface_hub import login
10
+ from enzymetk.step import Step
11
+ import numpy as np
12
+ from tqdm import tqdm
13
+
14
+ # CUDA setup
15
+ os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID" # see issue #152
16
+ cuda = True
17
+ DEVICE = torch.device("cuda" if cuda else "cpu")
18
+ device = DEVICE
19
+
20
+
21
+ class EmbedESM3(Step):
22
+
23
+ def __init__(self, id_col: str, seq_col: str, extraction_method='mean', num_threads=1,
24
+ tmp_dir: str = None, env_name: str = 'enzymetk', save_tensors=False): # type: ignore
25
+ login()
26
+ self.client = ESM3.from_pretrained("esm3-open").to("cuda")
27
+ self.seq_col = seq_col
28
+ self.id_col = id_col
29
+ self.num_threads = num_threads or 1
30
+ self.extraction_method = extraction_method
31
+ self.tmp_dir = tmp_dir
32
+ self.env_name = env_name
33
+ self.save_tensors = save_tensors
34
+
35
+ def __execute(self, df: pd.DataFrame, tmp_dir: str) -> pd.DataFrame:
36
+ client = self.client
37
+ means = []
38
+ for id, seq in tqdm(df[[self.id_col, self.seq_col]].values):
39
+ protein = ESMProtein(
40
+ sequence=(
41
+ seq
42
+ )
43
+ )
44
+ protein_tensor = client.encode(protein)
45
+ output = client.forward_and_sample(
46
+ protein_tensor, SamplingConfig(return_per_residue_embeddings=True)
47
+ )
48
+ if self.save_tensors:
49
+ torch.save(output.per_residue_embedding, os.path.join(tmp_dir, f'{id}.pt'))
50
+ means.append(np.array(output.per_residue_embedding.mean(dim=0).cpu()))
51
+ df['esm3_mean'] = means
52
+ return df
53
+
54
+ def execute(self, df: pd.DataFrame) -> pd.DataFrame:
55
+ if self.tmp_dir is None:
56
+ with TemporaryDirectory() as tmp_dir:
57
+ if self.num_threads > 1:
58
+ dfs = []
59
+ df_list = np.array_split(df, self.num_threads)
60
+ for df_chunk in tqdm(df_list):
61
+ dfs.append(self.__execute(df_chunk, tmp_dir))
62
+ df = pd.DataFrame()
63
+ for tmp_df in tqdm(dfs):
64
+ df = pd.concat([df, tmp_df])
65
+ return df
66
+ else:
67
+ df = self.__execute(df, tmp_dir)
68
+ return df
69
+ else:
70
+ df = self.__execute(df, self.tmp_dir)
71
+ return df
@@ -70,8 +70,8 @@ def extract_mean_embedding(df, id_column, encoding_dir, rep_num=33):
70
70
 
71
71
  class EmbedESM(Step):
72
72
 
73
- def __init__(self, id_col: str, seq_col: str, model='esm2_t33_650M_UR50D', extraction_method='mean',
74
- active_site_col: str = None, num_threads=1, tmp_dir: str = None, env_name: str = 'enzymetk'):
73
+ def __init__(self, id_col: str, seq_col: str, model='esm2_t36_3B_UR50D', extraction_method='mean',
74
+ active_site_col: str = None, num_threads=1, tmp_dir: str = None, env_name: str = 'enzymetk', rep_num=36):
75
75
  self.seq_col = seq_col
76
76
  self.id_col = id_col
77
77
  self.active_site_col = active_site_col
@@ -80,6 +80,7 @@ class EmbedESM(Step):
80
80
  self.extraction_method = extraction_method
81
81
  self.tmp_dir = tmp_dir
82
82
  self.env_name = env_name
83
+ self.rep_num = rep_num
83
84
 
84
85
  def __execute(self, df: pd.DataFrame, tmp_dir: str) -> pd.DataFrame:
85
86
  input_filename = f'{tmp_dir}/input.fasta'
@@ -95,11 +96,11 @@ class EmbedESM(Step):
95
96
  cmd = ['conda', 'run', '-n', self.env_name, 'python', Path(__file__).parent/'esm-extract.py', self.model, input_filename, tmp_dir, '--include', 'per_tok']
96
97
  self.run(cmd)
97
98
  if self.extraction_method == 'mean':
98
- df = extract_mean_embedding(df, self.id_col, tmp_dir)
99
+ df = extract_mean_embedding(df, self.id_col, tmp_dir, rep_num=self.rep_num)
99
100
  elif self.extraction_method == 'active_site':
100
101
  if self.active_site_col is None:
101
102
  raise ValueError('active_site_col must be provided if extraction_method is active_site')
102
- df = extract_active_site_embedding(df, self.id_col, self.active_site_col, tmp_dir)
103
+ df = extract_active_site_embedding(df, self.id_col, self.active_site_col, tmp_dir, rep_num=self.rep_num)
103
104
 
104
105
  return df
105
106
 
@@ -16,7 +16,8 @@ import os
16
16
 
17
17
  class LigandMPNN(Step):
18
18
 
19
- def __init__(self, pdb_column_name: str, ligand_mpnn_dir: str, output_dir: str, tmp_dir: str = None, args=None, num_threads: int = 1, env_name: str = 'ligandmpnn_env'):
19
+ def __init__(self, pdb_column_name: str, ligand_mpnn_dir: str, output_dir: str,
20
+ tmp_dir: str = None, args=None, num_threads: int = 1, env_name: str = 'ligandmpnn_env'):
20
21
  self.pdb_column_name = pdb_column_name
21
22
  self.ligand_mpnn_dir = ligand_mpnn_dir
22
23
  self.output_dir = output_dir
@@ -34,7 +35,7 @@ class LigandMPNN(Step):
34
35
  os.chdir(self.ligand_mpnn_dir)
35
36
 
36
37
  for pdb_file in df[ self.pdb_column_name].values:
37
- cmd = ['conda', 'run', '-n', self.env_name, 'python3', f'{self.ligand_mpnn_dir}run.py', '--pdb_path', pdb_file, '--out_folder', f'{self.output_dir}']
38
+ cmd = ['conda', 'run', '-n', self.env_name, 'python3', f'{self.ligand_mpnn_dir}run.py', '--pdb_path', pdb_file, '--out_folder', f'{self.output_dir}']
38
39
  if self.args is not None:
39
40
  cmd.extend(self.args)
40
41
  result = subprocess.run(cmd, check=True)
@@ -8,6 +8,8 @@ import numpy as np
8
8
  from tqdm import tqdm
9
9
  import random
10
10
  import string
11
+ import logging
12
+ import os
11
13
 
12
14
  logger = logging.getLogger(__name__)
13
15
  logger.setLevel(logging.INFO)
@@ -15,15 +17,17 @@ logger.setLevel(logging.INFO)
15
17
 
16
18
  class ActiveSitePred(Step):
17
19
 
18
- def __init__(self, id_col: str, seq_col: str, squidly_dir: str, num_threads: int = 1,
19
- esm2_model = 'esm2_t36_3B_UR50D', tmp_dir: str = None):
20
+ def __init__(self, id_col: str, seq_col: str, num_threads: int = 1,
21
+ esm2_model = 'esm2_t36_3B_UR50D', tmp_dir: str = None, args=None):
20
22
  self.id_col = id_col
21
23
  self.seq_col = seq_col
22
24
  self.num_threads = num_threads or 1
23
- self.squidly_dir = squidly_dir
24
25
  self.esm2_model = esm2_model
25
26
  self.tmp_dir = tmp_dir
26
-
27
+ self.args = None
28
+ self.logger = logging.getLogger(__name__)
29
+ print('Predicting Active Sites using Squidly')
30
+
27
31
  def __to_fasta(self, df: pd.DataFrame, tmp_dir: str):
28
32
  tmp_label = ''.join(random.choices(string.ascii_letters + string.digits, k=10))
29
33
 
@@ -37,13 +41,17 @@ class ActiveSitePred(Step):
37
41
  def __execute(self, df: pd.DataFrame, tmp_dir: str):
38
42
  input_filename = self.__to_fasta(df, tmp_dir)
39
43
  # Might have an issue if the things are not correctly installed in the same dicrectory
40
- result = subprocess.run(['python', Path(__file__).parent/'predict_catalyticsite_run.py', '--out', str(tmp_dir),
41
- '--input', input_filename, '--squidly_dir', self.squidly_dir, '--esm2_model', self.esm2_model], capture_output=True, text=True)
42
- output_filename = f'{input_filename.replace(".fasta", "_results.pkl")}'
44
+ cmd = []
45
+ cmd = ['squidly', 'run', input_filename, self.esm2_model, tmp_dir]
46
+ if self.args is not None:
47
+ cmd.extend(self.args)
48
+ result = self.run(cmd)
43
49
  if result.stderr:
44
- logger.error(result.stderr)
45
- logger.info(result.stdout)
46
-
50
+ self.logger.error(result.stderr)
51
+ print(result.stderr)
52
+ else:
53
+ self.logger.info(result.stdout)
54
+ output_filename = os.path.join(tmp_dir, 'squidly_ensemble.csv')
47
55
  return output_filename
48
56
 
49
57
  def execute(self, df: pd.DataFrame) -> pd.DataFrame:
@@ -61,10 +69,10 @@ class ActiveSitePred(Step):
61
69
  df = pd.DataFrame()
62
70
  print(output_filenames)
63
71
  for p in output_filenames:
64
- sub_df = pd.read_pickle(p)
72
+ sub_df = pd.read_csv(p)
65
73
  df = pd.concat([df, sub_df])
66
74
  return df
67
75
 
68
76
  else:
69
77
  output_filename = self.__execute(df, tmp_dir)
70
- return pd.read_pickle(output_filename)
78
+ return pd.read_csv(output_filename)
@@ -125,11 +125,10 @@ class FoldSeek(Step):
125
125
  continue
126
126
  df = pd.DataFrame()
127
127
  print(output_filenames)
128
- for p in output_filenames:
129
- sub_df = pd.read_pickle(p)
128
+ for sub_df in output_filenames:
130
129
  df = pd.concat([df, sub_df])
131
130
  return df
132
131
 
133
132
  else:
134
- output_filename = self.__execute([df, tmp_dir])
135
- return pd.read_pickle(output_filename)
133
+ df = self.__execute([df, tmp_dir])
134
+ return df
@@ -24,22 +24,26 @@ class ReactionDist(Step):
24
24
  self.num_threads = num_threads
25
25
 
26
26
  def __execute(self, data: list) -> np.array:
27
- reaction_df = data
28
- tmp_label = ''.join(random.choices(string.ascii_letters + string.digits, k=10))
29
-
30
- rxn = rdChemReactions.ReactionFromSmarts(self.smiles_string)
31
- rxn_fp = rdChemReactions.CreateStructuralFingerprintForReaction(rxn)
27
+ reaction_df = data
32
28
  rows = []
29
+ fp_params = rdChemReactions.ReactionFingerprintParams()
30
+ rxn = rdChemReactions.ReactionFromSmarts(self.smiles_string)
31
+ rxn_fp = rdChemReactions.CreateStructuralFingerprintForReaction(rxn, ReactionFingerPrintParams=fp_params) #rdChemReactions.CreateStructuralFingerprintForReaction(rxn, ReactionFingerPrintParams=fp_params)
32
+
33
33
  # compare all fp pairwise without duplicates
34
34
  for smile_id, smiles in tqdm(reaction_df[[self.id_column_name, self.smiles_column_name]].values): # -1 so the last fp will not be used
35
35
  mol_ = rdChemReactions.ReactionFromSmarts(smiles)
36
- fps = rdChemReactions.CreateStructuralFingerprintForReaction(mol_)
37
- rows.append([smile_id,
36
+ # Note: if you don't pass , ReactionFingerPrintParams=fp_params you get different results
37
+ # i.e. reactions that don't appear to be the same are reported as similar of 1.0
38
+ # https://github.com/rdkit/rdkit/discussions/5263
39
+ fps = rdChemReactions.CreateStructuralFingerprintForReaction(mol_, ReactionFingerPrintParams=fp_params)
40
+ rows.append([smile_id,
41
+ self.smiles_string,
38
42
  smiles,
39
43
  DataStructs.TanimotoSimilarity(fps, rxn_fp),
40
44
  DataStructs.RusselSimilarity(fps, rxn_fp),
41
45
  DataStructs.CosineSimilarity(fps, rxn_fp)])
42
- distance_df = pd.DataFrame(rows, columns=[self.id_column_name, 'TargetSmiles', 'TanimotoSimilarity', 'RusselSimilarity', 'CosineSimilarity'])
46
+ distance_df = pd.DataFrame(rows, columns=[self.id_column_name, 'QuerySmiles', 'TargetSmiles', 'TanimotoSimilarity', 'RusselSimilarity', 'CosineSimilarity'])
43
47
  return distance_df
44
48
 
45
49
  def execute(self, df: pd.DataFrame) -> pd.DataFrame:
@@ -1,3 +1,5 @@
1
+ import sys
2
+ sys.path.append('/disk1/ariane/vscode/enzyme-tk/')
1
3
  from enzymetk.step import Step
2
4
  import pandas as pd
3
5
  import numpy as np
@@ -8,6 +10,7 @@ from rdkit.Chem import rdChemReactions
8
10
  import pandas as pd
9
11
  import os
10
12
  from rdkit.DataStructs import FingerprintSimilarity
13
+ from rdkit.Chem import rdFingerprintGenerator
11
14
  from rdkit.Chem.Fingerprints import FingerprintMols
12
15
  import random
13
16
  import string
@@ -28,12 +31,15 @@ class SubstrateDist(Step):
28
31
  tmp_label = ''.join(random.choices(string.ascii_letters + string.digits, k=10))
29
32
 
30
33
  rxn = Chem.MolFromSmiles(self.smiles_string)
31
- rxn_fp = FingerprintMols.FingerprintMol(rxn)
34
+ # Switched to using morgan fingerprints https://greglandrum.github.io/rdkit-blog/posts/2023-01-18-fingerprint-generator-tutorial.html
35
+ # followed this tutorial
36
+ mfpgen = rdFingerprintGenerator.GetMorganGenerator(radius=2,fpSize=2048)
37
+ rxn_fp = mfpgen.GetFingerprint(rxn)
32
38
  rows = []
33
39
  # compare all fp pairwise without duplicates
34
40
  for smile_id, smiles in tqdm(reaction_df[[self.id_column_name, self.smiles_column_name]].values): # -1 so the last fp will not be used
35
41
  mol_ = Chem.MolFromSmiles(smiles)
36
- fps = FingerprintMols.FingerprintMol(mol_)
42
+ fps = mfpgen.GetFingerprint(mol_)
37
43
  rows.append([smile_id,
38
44
  smiles,
39
45
  DataStructs.TanimotoSimilarity(fps, rxn_fp),
@@ -36,8 +36,9 @@ class Step():
36
36
  """ Execute some shit """
37
37
  return df
38
38
 
39
- def run(self, cmd: list) -> None:
40
- """ Run a command """
39
+ def run(self, cmd: list):
40
+ """ Run a command """
41
+ result = None
41
42
  start = timeit.default_timer()
42
43
  u.dp(['Running command', ' '.join([str(c) for c in cmd])])
43
44
  result = subprocess.run(cmd, capture_output=True, text=True)
@@ -48,8 +49,9 @@ class Step():
48
49
  logger.error(result.stderr)
49
50
  logger.info(result.stdout)
50
51
  u.dp(['Time for command to run (min): ', (timeit.default_timer() - start)/60])
52
+ return result
51
53
 
52
- def __rshift__(self, other: Step) -> Step:
54
+ def __rshift__(self, other: Step) :
53
55
  return Pipeline(self, other)
54
56
 
55
57
  def __rlshift__(self, other: pd.DataFrame) -> pd.DataFrame:
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: enzymetk
3
- Version: 0.0.2
3
+ Version: 0.0.6
4
4
  Home-page: https://github.com/arianemora/enzyme-tk/
5
5
  Author: Ariane Mora
6
6
  Author-email: ariane.n.mora@gmail.com
@@ -18,17 +18,12 @@ Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
18
18
  Requires-Python: >=3.8
19
19
  Description-Content-Type: text/markdown
20
20
  License-File: LICENSE
21
- Requires-Dist: fair-esm
22
21
  Requires-Dist: scikit-learn
23
22
  Requires-Dist: numpy
24
23
  Requires-Dist: seaborn
25
24
  Requires-Dist: sciutil
26
- Requires-Dist: pandas==2.1.4
25
+ Requires-Dist: pandas
27
26
  Requires-Dist: biopython
28
- Requires-Dist: sentence_transformers
29
- Requires-Dist: pubchempy
30
- Requires-Dist: pyfaidx
31
- Requires-Dist: spacy
32
27
  Dynamic: author
33
28
  Dynamic: author-email
34
29
  Dynamic: classifier
@@ -37,6 +32,7 @@ Dynamic: description-content-type
37
32
  Dynamic: home-page
38
33
  Dynamic: keywords
39
34
  Dynamic: license
35
+ Dynamic: license-file
40
36
  Dynamic: project-url
41
37
  Dynamic: requires-dist
42
38
  Dynamic: requires-python
@@ -45,6 +41,9 @@ Dynamic: requires-python
45
41
 
46
42
  Enzyme-tk is a collection of tools for enzyme engineering, setup as interoperable modules that act on dataframes. These modules are designed to be imported into pipelines for specific function. For this reason, `steps` as each module is called (e.g. finding similar proteins with `BLAST` would be considered a step) are designed to be as light as possible. An example of a pipeline is the [annotate-e](https://github.com/ArianeMora/annotate-e) ` pipeline, this acts to annotate a fasta with an ensemble of methods (each is designated as an Enzyme-tk step).
47
43
 
44
+
45
+ **If you have any issues installing, let me know - this has been tested only on Linux/Ubuntu. Please post an issue!**
46
+
48
47
  ## Installation
49
48
 
50
49
  ## Install base package to import modules
@@ -71,6 +70,7 @@ This is a work-in progress! e.g. some tools (e.g. proteInfer and CLEAN) require
71
70
 
72
71
  Here are some of the tools that have been implemented to be chained together as a pipeline:
73
72
 
73
+ [boltz2](https://github.com/jwohlwend/boltz)
74
74
  [mmseqs2](https://github.com/soedinglab/mmseqs2)
75
75
  [foldseek](https://github.com/steineggerlab/foldseek)
76
76
  [diamond](https://github.com/bbuchfink/diamond)
@@ -89,6 +89,7 @@ Here are some of the tools that have been implemented to be chained together as
89
89
  [fasttree](https://morgannprice.github.io/fasttree/)
90
90
  [Porechop](https://github.com/rrwick/Porechop)
91
91
  [prokka](https://github.com/tseemann/prokka)
92
+
92
93
  ## Things to note
93
94
 
94
95
  All the tools use the conda env of `enzymetk` by default.
@@ -120,6 +121,8 @@ The steps are the main building blocks of the pipeline. They are responsible for
120
121
 
121
122
  BLAST is a tool for searching a database of sequences for similar sequences. Here you can either pass a database that you have already created or pass the sequences as part of your dataframe and pass the label column (this needs to have two values: reference and query) reference refers to sequences that you want to search against and query refers to sequences that you want to search for.
122
123
 
124
+ Note you need to have installed the BLAST environment.
125
+
123
126
  ```python
124
127
  id_col = 'Entry'
125
128
  seq_col = 'Sequence'
@@ -148,6 +151,34 @@ df = pd.DataFrame(rows, columns=[id_col, seq_col])
148
151
  print(df)
149
152
  df << (ActiveSitePred(id_col, seq_col, squidly_dir, num_threads) >> Save('tmp/squidly_as_pred.pkl'))
150
153
 
154
+ ```
155
+ ### Boltz2
156
+
157
+ Boltz2 is a model for predicting structures. Note you need docko installed as I run via that.
158
+
159
+ Below is an example using boltz with 4 threads, and uses a cofactor (intermediate in this case). Just set to be None for a single substrate version.
160
+ ```
161
+ import sys
162
+ from enzymetk.dock_boltz_step import Boltz
163
+ from enzymetk.save_step import Save
164
+ import pandas as pd
165
+ import os
166
+ os.environ['MKL_THREADING_LAYER'] = 'GNU'
167
+
168
+ output_dir = 'tmp/'
169
+ num_threads = 4
170
+ id_col = 'Entry'
171
+ seq_col = 'Sequence'
172
+ substrate_col = 'Substrate'
173
+ intermediate_col = 'Intermediate'
174
+
175
+ rows = [['P0DP23_boltz_8999', 'MALWMRLLPLLALLALWGPDPAAAMALWMRLLPLLALLALWGPDPAAAMALWMRLLPLLALLALWGPDPAAA', 'CCCCC(CC)COC(=O)C1=CC=CC=C1C(=O)OCC(CC)CCCC', 'CC1=C(C2=CC3=C(C(=C([N-]3)C=C4C(=C(C(=N4)C=C5C(=C(C(=N5)C=C1[N-]2)C)C=C)C)C=C)C)CCC(=O)[O-])CCC(=O)[O-].[Fe]'],
176
+ ['P0DP24_boltz_p1', 'MALWMRLLPLLALLALWGPDPAAAMALWMRLLPLLALLALWGPDPAAAMALWMRLLPLLALLALWGPDPAAA', 'CCCCC(CC)COC(=O)C1=CC=CC=C1C(=O)OCC(CC)CCCC', 'CC1=C(C2=CC3=C(C(=C([N-]3)C=C4C(=C(C(=N4)C=C5C(=C(C(=N5)C=C1[N-]2)C)C=C)C)C=C)C)CCC(=O)[O-])CCC(=O)[O-].[Fe]'],
177
+ ['P0DP23_boltz_p2', 'MALWMRLLPLLALLALWGPDPAAAMALWMRLLPLLALLALWGPDPAAAMALWMRLLPLLALLALWGPDPAAA', 'CCCCC(CC)COC(=O)C1=CC=CC=C1C(=O)OCC(CC)CCCC', 'CC1=C(C2=CC3=C(C(=C([N-]3)C=C4C(=C(C(=N4)C=C5C(=C(C(=N5)C=C1[N-]2)C)C=C)C)C=C)C)CCC(=O)[O-])CCC(=O)[O-].[Fe]'],
178
+ ['P0DP24_boltz_p3', 'MALWMRLLPLLALLALWGPDPAAAMALWMRLLPLLALLALWGPDPAAAMALWMRLLPLLALLALWGPDPAAA', 'CCCCC(CC)COC(=O)C1=CC=CC=C1C(=O)OCC(CC)CCCC', 'CC1=C(C2=CC3=C(C(=C([N-]3)C=C4C(=C(C(=N4)C=C5C(=C(C(=N5)C=C1[N-]2)C)C=C)C)C=C)C)CCC(=O)[O-])CCC(=O)[O-].[Fe]'],
179
+ ['P0DP24_boltz_p4', 'MALWMRLLPLLALLALWGPDPAAAMALWMRLLPLLALLALWGPDPAAAMALWMRLLPLLALLALWGPDPAAA', 'CCCCC(CC)COC(=O)C1=CC=CC=C1C(=O)OCC(CC)CCCC', 'CC1=C(C2=CC3=C(C(=C([N-]3)C=C4C(=C(C(=N4)C=C5C(=C(C(=N5)C=C1[N-]2)C)C=C)C)C=C)C)CCC(=O)[O-])CCC(=O)[O-].[Fe]']]
180
+ df = pd.DataFrame(rows, columns=[id_col, seq_col, substrate_col, intermediate_col])
181
+ df << (Boltz(id_col, seq_col, substrate_col, intermediate_col, f'{output_dir}', num_threads) >> Save(f'{output_dir}test.pkl'))
151
182
  ```
152
183
 
153
184
  ### Chai
@@ -5,6 +5,7 @@ enzymetk/__init__.py
5
5
  enzymetk/annotateEC_CLEAN_step.py
6
6
  enzymetk/annotateEC_CREEP_step.py
7
7
  enzymetk/annotateEC_proteinfer_step.py
8
+ enzymetk/dock_boltz_step.py
8
9
  enzymetk/dock_chai_step.py
9
10
  enzymetk/dock_vina_step.py
10
11
  enzymetk/embedchem_chemberta_step.py
@@ -13,6 +14,7 @@ enzymetk/embedchem_rxnfp_step.py
13
14
  enzymetk/embedchem_selformer_run.py
14
15
  enzymetk/embedchem_selformer_step.py
15
16
  enzymetk/embedchem_unimol_step.py
17
+ enzymetk/embedprotein_esm3_step.py
16
18
  enzymetk/embedprotein_esm_step.py
17
19
  enzymetk/esm-extract.py
18
20
  enzymetk/filter_sequence_step.py
@@ -0,0 +1,6 @@
1
+ scikit-learn
2
+ numpy
3
+ seaborn
4
+ sciutil
5
+ pandas
6
+ biopython
@@ -61,17 +61,13 @@ setup(name='enzymetk',
61
61
  'enzymetk = enzymetk.__main__:main'
62
62
  ]
63
63
  },
64
- install_requires=['fair-esm',
64
+ install_requires=[
65
65
  'scikit-learn',
66
66
  'numpy',
67
67
  'seaborn',
68
68
  'sciutil',
69
- 'pandas==2.1.4',
70
- 'biopython',
71
- 'sentence_transformers',
72
- 'pubchempy',
73
- 'pyfaidx',
74
- 'spacy'],
69
+ 'pandas',
70
+ 'biopython'],
75
71
  python_requires='>=3.8',
76
72
  data_files=[("", ["LICENSE"])]
77
73
  )
@@ -1,11 +0,0 @@
1
- fair-esm
2
- scikit-learn
3
- numpy
4
- seaborn
5
- sciutil
6
- pandas==2.1.4
7
- biopython
8
- sentence_transformers
9
- pubchempy
10
- pyfaidx
11
- spacy
File without changes
File without changes
File without changes
File without changes
File without changes