enzymetk 0.0.2__tar.gz → 0.0.3__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.
Potentially problematic release.
This version of enzymetk might be problematic. Click here for more details.
- {enzymetk-0.0.2 → enzymetk-0.0.3}/PKG-INFO +38 -2
- {enzymetk-0.0.2 → enzymetk-0.0.3}/README.md +35 -0
- {enzymetk-0.0.2 → enzymetk-0.0.3}/enzymetk/__init__.py +1 -24
- {enzymetk-0.0.2 → enzymetk-0.0.3}/enzymetk/annotateEC_CLEAN_step.py +2 -2
- {enzymetk-0.0.2 → enzymetk-0.0.3}/enzymetk/annotateEC_CREEP_step.py +1 -1
- enzymetk-0.0.3/enzymetk/dock_boltz_step.py +46 -0
- {enzymetk-0.0.2 → enzymetk-0.0.3}/enzymetk/embedprotein_esm_step.py +5 -4
- {enzymetk-0.0.2 → enzymetk-0.0.3}/enzymetk/predict_catalyticsite_step.py +20 -12
- {enzymetk-0.0.2 → enzymetk-0.0.3}/enzymetk/similarity_foldseek_step.py +3 -4
- {enzymetk-0.0.2 → enzymetk-0.0.3}/enzymetk/similarity_reaction_step.py +12 -8
- {enzymetk-0.0.2 → enzymetk-0.0.3}/enzymetk/step.py +5 -3
- {enzymetk-0.0.2 → enzymetk-0.0.3}/enzymetk.egg-info/PKG-INFO +38 -2
- {enzymetk-0.0.2 → enzymetk-0.0.3}/enzymetk.egg-info/SOURCES.txt +1 -0
- {enzymetk-0.0.2 → enzymetk-0.0.3}/LICENSE +0 -0
- {enzymetk-0.0.2 → enzymetk-0.0.3}/enzymetk/annotateEC_proteinfer_step.py +0 -0
- {enzymetk-0.0.2 → enzymetk-0.0.3}/enzymetk/dock_chai_step.py +0 -0
- {enzymetk-0.0.2 → enzymetk-0.0.3}/enzymetk/dock_vina_step.py +0 -0
- {enzymetk-0.0.2 → enzymetk-0.0.3}/enzymetk/embedchem_chemberta_step.py +0 -0
- {enzymetk-0.0.2 → enzymetk-0.0.3}/enzymetk/embedchem_rxnfp_run.py +0 -0
- {enzymetk-0.0.2 → enzymetk-0.0.3}/enzymetk/embedchem_rxnfp_step.py +0 -0
- {enzymetk-0.0.2 → enzymetk-0.0.3}/enzymetk/embedchem_selformer_run.py +0 -0
- {enzymetk-0.0.2 → enzymetk-0.0.3}/enzymetk/embedchem_selformer_step.py +0 -0
- {enzymetk-0.0.2 → enzymetk-0.0.3}/enzymetk/embedchem_unimol_step.py +0 -0
- {enzymetk-0.0.2 → enzymetk-0.0.3}/enzymetk/esm-extract.py +0 -0
- {enzymetk-0.0.2 → enzymetk-0.0.3}/enzymetk/filter_sequence_step.py +0 -0
- {enzymetk-0.0.2 → enzymetk-0.0.3}/enzymetk/filter_structure_step.py +0 -0
- {enzymetk-0.0.2 → enzymetk-0.0.3}/enzymetk/generate_msa_step.py +0 -0
- {enzymetk-0.0.2 → enzymetk-0.0.3}/enzymetk/generate_oligopool_step.py +0 -0
- {enzymetk-0.0.2 → enzymetk-0.0.3}/enzymetk/generate_tree_step.py +0 -0
- {enzymetk-0.0.2 → enzymetk-0.0.3}/enzymetk/inpaint_ligandMPNN_step.py +0 -0
- {enzymetk-0.0.2 → enzymetk-0.0.3}/enzymetk/main.py +0 -0
- {enzymetk-0.0.2 → enzymetk-0.0.3}/enzymetk/metagenomics_porechop_trim_reads_step.py +0 -0
- {enzymetk-0.0.2 → enzymetk-0.0.3}/enzymetk/metagenomics_prokka_annotate_genes.py +0 -0
- {enzymetk-0.0.2 → enzymetk-0.0.3}/enzymetk/pipeline.py +0 -0
- {enzymetk-0.0.2 → enzymetk-0.0.3}/enzymetk/predict_activity_step.py +0 -0
- {enzymetk-0.0.2 → enzymetk-0.0.3}/enzymetk/predict_catalyticsite_run.py +0 -0
- {enzymetk-0.0.2 → enzymetk-0.0.3}/enzymetk/reducedim_pca_run.py +0 -0
- {enzymetk-0.0.2 → enzymetk-0.0.3}/enzymetk/reducedim_vae_run.py +0 -0
- {enzymetk-0.0.2 → enzymetk-0.0.3}/enzymetk/reducedim_vae_step.py +0 -0
- {enzymetk-0.0.2 → enzymetk-0.0.3}/enzymetk/save_step.py +0 -0
- {enzymetk-0.0.2 → enzymetk-0.0.3}/enzymetk/sequence_search_blast.py +0 -0
- {enzymetk-0.0.2 → enzymetk-0.0.3}/enzymetk/similarity_mmseqs_step.py +0 -0
- {enzymetk-0.0.2 → enzymetk-0.0.3}/enzymetk/similarity_substrate_step.py +0 -0
- {enzymetk-0.0.2 → enzymetk-0.0.3}/enzymetk.egg-info/dependency_links.txt +0 -0
- {enzymetk-0.0.2 → enzymetk-0.0.3}/enzymetk.egg-info/entry_points.txt +0 -0
- {enzymetk-0.0.2 → enzymetk-0.0.3}/enzymetk.egg-info/requires.txt +0 -0
- {enzymetk-0.0.2 → enzymetk-0.0.3}/enzymetk.egg-info/top_level.txt +0 -0
- {enzymetk-0.0.2 → enzymetk-0.0.3}/setup.cfg +0 -0
- {enzymetk-0.0.2 → enzymetk-0.0.3}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: enzymetk
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.3
|
|
4
4
|
Home-page: https://github.com/arianemora/enzyme-tk/
|
|
5
5
|
Author: Ariane Mora
|
|
6
6
|
Author-email: ariane.n.mora@gmail.com
|
|
@@ -37,6 +37,7 @@ Dynamic: description-content-type
|
|
|
37
37
|
Dynamic: home-page
|
|
38
38
|
Dynamic: keywords
|
|
39
39
|
Dynamic: license
|
|
40
|
+
Dynamic: license-file
|
|
40
41
|
Dynamic: project-url
|
|
41
42
|
Dynamic: requires-dist
|
|
42
43
|
Dynamic: requires-python
|
|
@@ -45,6 +46,9 @@ Dynamic: requires-python
|
|
|
45
46
|
|
|
46
47
|
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
48
|
|
|
49
|
+
|
|
50
|
+
**If you have any issues installing, let me know - this has been tested only on Linux/Ubuntu. Please post an issue!**
|
|
51
|
+
|
|
48
52
|
## Installation
|
|
49
53
|
|
|
50
54
|
## Install base package to import modules
|
|
@@ -71,6 +75,7 @@ This is a work-in progress! e.g. some tools (e.g. proteInfer and CLEAN) require
|
|
|
71
75
|
|
|
72
76
|
Here are some of the tools that have been implemented to be chained together as a pipeline:
|
|
73
77
|
|
|
78
|
+
[boltz2](https://github.com/jwohlwend/boltz)
|
|
74
79
|
[mmseqs2](https://github.com/soedinglab/mmseqs2)
|
|
75
80
|
[foldseek](https://github.com/steineggerlab/foldseek)
|
|
76
81
|
[diamond](https://github.com/bbuchfink/diamond)
|
|
@@ -89,6 +94,7 @@ Here are some of the tools that have been implemented to be chained together as
|
|
|
89
94
|
[fasttree](https://morgannprice.github.io/fasttree/)
|
|
90
95
|
[Porechop](https://github.com/rrwick/Porechop)
|
|
91
96
|
[prokka](https://github.com/tseemann/prokka)
|
|
97
|
+
|
|
92
98
|
## Things to note
|
|
93
99
|
|
|
94
100
|
All the tools use the conda env of `enzymetk` by default.
|
|
@@ -120,6 +126,8 @@ The steps are the main building blocks of the pipeline. They are responsible for
|
|
|
120
126
|
|
|
121
127
|
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
128
|
|
|
129
|
+
Note you need to have installed the BLAST environment.
|
|
130
|
+
|
|
123
131
|
```python
|
|
124
132
|
id_col = 'Entry'
|
|
125
133
|
seq_col = 'Sequence'
|
|
@@ -148,6 +156,34 @@ df = pd.DataFrame(rows, columns=[id_col, seq_col])
|
|
|
148
156
|
print(df)
|
|
149
157
|
df << (ActiveSitePred(id_col, seq_col, squidly_dir, num_threads) >> Save('tmp/squidly_as_pred.pkl'))
|
|
150
158
|
|
|
159
|
+
```
|
|
160
|
+
### Boltz2
|
|
161
|
+
|
|
162
|
+
Boltz2 is a model for predicting structures. Note you need docko installed as I run via that.
|
|
163
|
+
|
|
164
|
+
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.
|
|
165
|
+
```
|
|
166
|
+
import sys
|
|
167
|
+
from enzymetk.dock_boltz_step import Boltz
|
|
168
|
+
from enzymetk.save_step import Save
|
|
169
|
+
import pandas as pd
|
|
170
|
+
import os
|
|
171
|
+
os.environ['MKL_THREADING_LAYER'] = 'GNU'
|
|
172
|
+
|
|
173
|
+
output_dir = 'tmp/'
|
|
174
|
+
num_threads = 4
|
|
175
|
+
id_col = 'Entry'
|
|
176
|
+
seq_col = 'Sequence'
|
|
177
|
+
substrate_col = 'Substrate'
|
|
178
|
+
intermediate_col = 'Intermediate'
|
|
179
|
+
|
|
180
|
+
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]'],
|
|
181
|
+
['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]'],
|
|
182
|
+
['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]'],
|
|
183
|
+
['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]'],
|
|
184
|
+
['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]']]
|
|
185
|
+
df = pd.DataFrame(rows, columns=[id_col, seq_col, substrate_col, intermediate_col])
|
|
186
|
+
df << (Boltz(id_col, seq_col, substrate_col, intermediate_col, f'{output_dir}', num_threads) >> Save(f'{output_dir}test.pkl'))
|
|
151
187
|
```
|
|
152
188
|
|
|
153
189
|
### 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.
|
|
25
|
+
__version__ = '0.0.3'
|
|
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)
|
|
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')
|
|
@@ -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='
|
|
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
|
|
|
@@ -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,
|
|
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
|
-
|
|
41
|
-
|
|
42
|
-
|
|
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
|
-
|
|
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.
|
|
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.
|
|
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
|
|
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
|
-
|
|
135
|
-
return
|
|
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 = []
|
|
33
29
|
# compare all fp pairwise without duplicates
|
|
34
30
|
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
31
|
mol_ = rdChemReactions.ReactionFromSmarts(smiles)
|
|
36
|
-
|
|
37
|
-
|
|
32
|
+
fp_params = rdChemReactions.ReactionFingerprintParams()
|
|
33
|
+
# Note: if you don't pass , ReactionFingerPrintParams=fp_params you get different results
|
|
34
|
+
# i.e. reactions that don't appear to be the same are reported as similar of 1.0
|
|
35
|
+
# https://github.com/rdkit/rdkit/discussions/5263
|
|
36
|
+
rxn = rdChemReactions.ReactionFromSmarts(self.smiles_string)
|
|
37
|
+
|
|
38
|
+
rxn_fp = rdChemReactions.CreateStructuralFingerprintForReaction(rxn, ReactionFingerPrintParams=fp_params)
|
|
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:
|
|
@@ -36,8 +36,9 @@ class Step():
|
|
|
36
36
|
""" Execute some shit """
|
|
37
37
|
return df
|
|
38
38
|
|
|
39
|
-
def run(self, cmd: list)
|
|
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)
|
|
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.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: enzymetk
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.3
|
|
4
4
|
Home-page: https://github.com/arianemora/enzyme-tk/
|
|
5
5
|
Author: Ariane Mora
|
|
6
6
|
Author-email: ariane.n.mora@gmail.com
|
|
@@ -37,6 +37,7 @@ Dynamic: description-content-type
|
|
|
37
37
|
Dynamic: home-page
|
|
38
38
|
Dynamic: keywords
|
|
39
39
|
Dynamic: license
|
|
40
|
+
Dynamic: license-file
|
|
40
41
|
Dynamic: project-url
|
|
41
42
|
Dynamic: requires-dist
|
|
42
43
|
Dynamic: requires-python
|
|
@@ -45,6 +46,9 @@ Dynamic: requires-python
|
|
|
45
46
|
|
|
46
47
|
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
48
|
|
|
49
|
+
|
|
50
|
+
**If you have any issues installing, let me know - this has been tested only on Linux/Ubuntu. Please post an issue!**
|
|
51
|
+
|
|
48
52
|
## Installation
|
|
49
53
|
|
|
50
54
|
## Install base package to import modules
|
|
@@ -71,6 +75,7 @@ This is a work-in progress! e.g. some tools (e.g. proteInfer and CLEAN) require
|
|
|
71
75
|
|
|
72
76
|
Here are some of the tools that have been implemented to be chained together as a pipeline:
|
|
73
77
|
|
|
78
|
+
[boltz2](https://github.com/jwohlwend/boltz)
|
|
74
79
|
[mmseqs2](https://github.com/soedinglab/mmseqs2)
|
|
75
80
|
[foldseek](https://github.com/steineggerlab/foldseek)
|
|
76
81
|
[diamond](https://github.com/bbuchfink/diamond)
|
|
@@ -89,6 +94,7 @@ Here are some of the tools that have been implemented to be chained together as
|
|
|
89
94
|
[fasttree](https://morgannprice.github.io/fasttree/)
|
|
90
95
|
[Porechop](https://github.com/rrwick/Porechop)
|
|
91
96
|
[prokka](https://github.com/tseemann/prokka)
|
|
97
|
+
|
|
92
98
|
## Things to note
|
|
93
99
|
|
|
94
100
|
All the tools use the conda env of `enzymetk` by default.
|
|
@@ -120,6 +126,8 @@ The steps are the main building blocks of the pipeline. They are responsible for
|
|
|
120
126
|
|
|
121
127
|
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
128
|
|
|
129
|
+
Note you need to have installed the BLAST environment.
|
|
130
|
+
|
|
123
131
|
```python
|
|
124
132
|
id_col = 'Entry'
|
|
125
133
|
seq_col = 'Sequence'
|
|
@@ -148,6 +156,34 @@ df = pd.DataFrame(rows, columns=[id_col, seq_col])
|
|
|
148
156
|
print(df)
|
|
149
157
|
df << (ActiveSitePred(id_col, seq_col, squidly_dir, num_threads) >> Save('tmp/squidly_as_pred.pkl'))
|
|
150
158
|
|
|
159
|
+
```
|
|
160
|
+
### Boltz2
|
|
161
|
+
|
|
162
|
+
Boltz2 is a model for predicting structures. Note you need docko installed as I run via that.
|
|
163
|
+
|
|
164
|
+
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.
|
|
165
|
+
```
|
|
166
|
+
import sys
|
|
167
|
+
from enzymetk.dock_boltz_step import Boltz
|
|
168
|
+
from enzymetk.save_step import Save
|
|
169
|
+
import pandas as pd
|
|
170
|
+
import os
|
|
171
|
+
os.environ['MKL_THREADING_LAYER'] = 'GNU'
|
|
172
|
+
|
|
173
|
+
output_dir = 'tmp/'
|
|
174
|
+
num_threads = 4
|
|
175
|
+
id_col = 'Entry'
|
|
176
|
+
seq_col = 'Sequence'
|
|
177
|
+
substrate_col = 'Substrate'
|
|
178
|
+
intermediate_col = 'Intermediate'
|
|
179
|
+
|
|
180
|
+
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]'],
|
|
181
|
+
['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]'],
|
|
182
|
+
['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]'],
|
|
183
|
+
['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]'],
|
|
184
|
+
['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]']]
|
|
185
|
+
df = pd.DataFrame(rows, columns=[id_col, seq_col, substrate_col, intermediate_col])
|
|
186
|
+
df << (Boltz(id_col, seq_col, substrate_col, intermediate_col, f'{output_dir}', num_threads) >> Save(f'{output_dir}test.pkl'))
|
|
151
187
|
```
|
|
152
188
|
|
|
153
189
|
### Chai
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|