1
1
#! /usr/bin/env nextflow
2
2
3
- // splitter params
4
- params. chunk_size_expand = 200
5
- params. limit = 0
6
- params. digits = 4
7
-
8
3
// tether params
9
4
params. smiles = ' *.smi'
10
5
params. molfiles = ' *.mol'
6
+ params. chunk_tether = 250
7
+ params. chunk_score = 1000
8
+ params. num_conformers = 1
11
9
params. ph_min = null
12
10
params. ph_max = null
11
+ params. atom_compare = ' CompareElements'
12
+ params. bond_compare = ' CompareOrder'
13
+ params. complete_rings_only = true
14
+ params. ring_matches_ring_only = true
15
+ params. minimize = 4
13
16
params. timeout_embed = null
14
- params. chunk_size_tether = 500
15
17
16
18
// docking params
17
19
params. protein = ' data/mpro/Mpro-x0387_0.mol2'
@@ -23,7 +25,7 @@ params.num_dockings = 5
23
25
params. fragments = ' data/mpro/hits-23.sdf.gz'
24
26
25
27
// files
26
- smiles = file(params. smiles)
28
+ smilesfiles = file(params. smiles)
27
29
molfiles = file(params. molfiles)
28
30
protein = file(params. protein)
29
31
prmfile = file(params. prmfile)
@@ -36,16 +38,16 @@ process splitter {
36
38
container ' informaticsmatters/rdkit_pipelines:latest'
37
39
38
40
input:
39
- file smiles from smiles . flatten()
41
+ file smiles from smilesfiles . flatten()
40
42
file mol from molfiles. flatten()
41
43
42
44
output:
43
- file ' *.mol' into split_mols
44
- file ' *.smi' into split_smiles
45
+ file ' *.mol' into mols
46
+ file ' *.smi' into smiles
45
47
46
48
"""
47
49
stem=${ smiles.name[0..-5]}
48
- split -l $params . chunk_size_expand -d -a 3 --additional-suffix .smi $smiles \$ {stem}_
50
+ split -l $params . chunk_tether -d -a 3 --additional-suffix .smi $smiles \$ {stem}_
49
51
mv $smiles ${ smiles} .orig
50
52
for f in *.smi
51
53
do
@@ -59,24 +61,30 @@ process splitter {
59
61
process tether {
60
62
61
63
container ' informaticsmatters/rdkit_pipelines:latest'
64
+ publishDir ' .' , mode: ' link'
62
65
63
66
input:
64
- file mol from split_mols . flatten()
65
- file smiles from split_smiles . flatten()
67
+ file smiles from smiles . flatten()
68
+ file mol from mols . flatten()
66
69
67
70
output:
68
71
file ' Tethered_*.sdf' into tethered_parts
69
72
70
73
"""
71
- python -m pipelines.xchem.prepare_tether --smi '$smiles ' --mol '$mol '\
72
- --chunk-size $params . chunk_size_tether \
74
+ python -m pipelines.xchem.prepare_tether --smi '$smiles ' --mol '$mol ' --chunk-size $params . chunk_score \
75
+ -o 'Tethered_${ smiles.name[0..-5]} '\
76
+ --num-conformers $params . num_conformers \
77
+ --atom-compare $params . atom_compare --bond-compare $params . bond_compare \
78
+ ${ params.complete_rings_only ? '--complete-rings-only' : ''} \
79
+ ${ params.ring_matches_ring_only ? '--ring-matches-ring-only' : ''} \
80
+ --minimize $params . minimize \
73
81
${ params.ph_min != null ? '--min-ph ' + params.ph_min : ''} \
74
82
${ params.ph_max != null ? '--max-ph ' + params.ph_max : ''} \
75
- ${ params.timeout_embed != null ? '--timeout-embed ' + params.timeout_embed : ''} \
76
- -o 'Tethered_${ smiles.name[0..-5]} '
83
+ ${ params.timeout_embed != null ? '--timeout-embed ' + params.timeout_embed : ''}
77
84
"""
78
85
}
79
86
87
+
80
88
process rdock {
81
89
82
90
container ' informaticsmatters/rdock-mini:latest'
@@ -116,6 +124,8 @@ process featurestein {
116
124
117
125
container ' informaticsmatters/rdkit_pipelines:latest'
118
126
127
+ publishDir " ." , mode: ' link'
128
+
119
129
input:
120
130
file part from docked_parts
121
131
file fmaps
@@ -128,20 +138,20 @@ process featurestein {
128
138
"""
129
139
}
130
140
131
- process xcos {
132
-
133
- container ' informaticsmatters/rdkit_pipelines:latest'
134
-
135
- publishDir " ." , mode: ' link'
136
-
137
- input:
138
- file part from featurestein_parts
139
- file fragments
140
-
141
- output:
142
- file ' XC_*.sdf.gz'
143
-
144
- """
145
- python -m pipelines.xchem.xcos -i '$part ' -if sdf -f '$fragments ' -o 'XC_${ part.name[0..-5]} ' -of sdf
146
- """
147
- }
141
+ // process xcos {
142
+ //
143
+ // container 'informaticsmatters/rdkit_pipelines:latest'
144
+ //
145
+ // publishDir ".", mode: 'link'
146
+ //
147
+ // input:
148
+ // file part from featurestein_parts
149
+ // file fragments
150
+ //
151
+ // output:
152
+ // file 'XC_*.sdf.gz'
153
+ //
154
+ // """
155
+ // python -m pipelines.xchem.xcos -i '$part' -if sdf -f '$fragments' -o 'XC_${part.name[0..-5]}' -of sdf
156
+ // """
157
+ // }
0 commit comments