Skip to content

Commit 3d538ce

Browse files
committed
applying changes to tether-dock-score workflow
1 parent c9366a6 commit 3d538ce

File tree

2 files changed

+55
-38
lines changed

2 files changed

+55
-38
lines changed

src/nextflow/xchem/prepare-tether.nf

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,17 @@
33
params.smiles = '*.smi'
44
params.molfiles = '*.mol'
55
params.chunk_tether = 250
6-
params.chunk_score = 10000
6+
params.chunk_score = 1000
77
params.limit = 0
8-
params.num_conformers = 10
8+
params.num_conformers = 1
9+
params.ph_min = null
10+
params.ph_max = null
911
params.atom_compare = 'CompareElements'
1012
params.bond_compare = 'CompareOrder'
1113
params.complete_rings_only = true
1214
params.ring_matches_ring_only = true
1315
params.minimize = 4
16+
params.timeout_embed = null
1417

1518

1619
smilesfiles = file(params.smiles)
@@ -54,10 +57,14 @@ process tether {
5457

5558
"""
5659
python -m pipelines.xchem.prepare_tether --smi '$smiles' --mol '$mol' --chunk-size $params.chunk_score\
57-
--num-conformers $params.num_conformers -o 'Tethered_${smiles.name[0..-5]}'\
60+
-o 'Tethered_${smiles.name[0..-5]}'\
61+
--num-conformers $params.num_conformers\
5862
--atom-compare $params.atom_compare --bond-compare $params.bond_compare\
5963
${params.complete_rings_only ? '--complete-rings-only' : ''}\
6064
${params.ring_matches_ring_only ? '--ring-matches-ring-only' : ''}\
61-
--minimize $params.minimize
65+
--minimize $params.minimize\
66+
${params.ph_min != null ? '--min-ph ' + params.ph_min : ''}\
67+
${params.ph_max != null ? '--max-ph ' + params.ph_max : ''}\
68+
${params.timeout_embed != null ? '--timeout-embed ' + params.timeout_embed : ''}
6269
"""
6370
}

src/nextflow/xchem/tether-dock-score.nf

Lines changed: 44 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
#!/usr/bin/env nextflow
22

3-
// splitter params
4-
params.chunk_size_expand = 200
5-
params.limit = 0
6-
params.digits = 4
7-
83
// tether params
94
params.smiles = '*.smi'
105
params.molfiles = '*.mol'
6+
params.chunk_tether = 250
7+
params.chunk_score = 1000
8+
params.num_conformers = 1
119
params.ph_min = null
1210
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
1316
params.timeout_embed = null
14-
params.chunk_size_tether = 500
1517

1618
// docking params
1719
params.protein = 'data/mpro/Mpro-x0387_0.mol2'
@@ -23,7 +25,7 @@ params.num_dockings = 5
2325
params.fragments = 'data/mpro/hits-23.sdf.gz'
2426

2527
// files
26-
smiles = file(params.smiles)
28+
smilesfiles = file(params.smiles)
2729
molfiles = file(params.molfiles)
2830
protein = file(params.protein)
2931
prmfile = file(params.prmfile)
@@ -36,16 +38,16 @@ process splitter {
3638
container 'informaticsmatters/rdkit_pipelines:latest'
3739

3840
input:
39-
file smiles from smiles.flatten()
41+
file smiles from smilesfiles.flatten()
4042
file mol from molfiles.flatten()
4143

4244
output:
43-
file '*.mol' into split_mols
44-
file '*.smi' into split_smiles
45+
file '*.mol' into mols
46+
file '*.smi' into smiles
4547

4648
"""
4749
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}_
4951
mv $smiles ${smiles}.orig
5052
for f in *.smi
5153
do
@@ -59,24 +61,30 @@ process splitter {
5961
process tether {
6062

6163
container 'informaticsmatters/rdkit_pipelines:latest'
64+
publishDir '.', mode: 'link'
6265

6366
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()
6669

6770
output:
6871
file 'Tethered_*.sdf' into tethered_parts
6972

7073
"""
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\
7381
${params.ph_min != null ? '--min-ph ' + params.ph_min : ''}\
7482
${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 : ''}
7784
"""
7885
}
7986

87+
8088
process rdock {
8189

8290
container 'informaticsmatters/rdock-mini:latest'
@@ -116,6 +124,8 @@ process featurestein {
116124

117125
container 'informaticsmatters/rdkit_pipelines:latest'
118126

127+
publishDir ".", mode: 'link'
128+
119129
input:
120130
file part from docked_parts
121131
file fmaps
@@ -128,20 +138,20 @@ process featurestein {
128138
"""
129139
}
130140

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

Comments
 (0)