-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmodules.nf
More file actions
169 lines (142 loc) · 4.64 KB
/
Copy pathmodules.nf
File metadata and controls
169 lines (142 loc) · 4.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
process PROCESS_BINDINGDB {
publishDir "${params.output}", mode: 'copy', overwrite: true
conda "${params.asap}"
tag "process_bindingdb"
clusterOptions '--partition cpushort'
output:
path("*.json"), emit: input_json
path("*.sdf"), emit: input_sdf
path("*.csv"), emit: input_csv
path("*.txt"), emit: input_txt
script:
"""
plumbline process-bindingdb \
--input-directory "${params.bindingDB}" \
--output-directory "./"
"""
}
process DOWNLOAD_PDB {
publishDir "${params.output}/${uuid}", mode: 'copy', overwrite: true
conda "${params.asap}"
tag "${uuid}"
clusterOptions '--partition cpushort'
input:
tuple val(uuid), path(input_json, stageAs:"input.json")
output:
tuple val(uuid), path("*.cif"), emit: input_cif
tuple val(uuid), path("*.json"), emit: record_json
script:
"""
plumbline download-pdb \
--input-file "${input_json}"
"""
}
process PREP_CIF {
publishDir "${params.output}/${uuid}", mode: 'copy', overwrite: true
conda "${params.asap}"
tag "${uuid}"
clusterOptions '--partition cpushort'
input:
tuple val(uuid), path(input_cif, stageAs:"input.cif"), path(input_json, stageAs:"input.json")
output:
tuple val(uuid), path("*spruced_complex.pdb"), emit: prepped_pdb
tuple val(uuid), path("*ligand.sdf"), emit: ligand_sdf
tuple val(uuid), path("*.json"), emit: record_json
script:
"""
plumbline prep-cif \
--input-json "${input_json}" \
--input-cif "${input_cif}" \
--fasta-sequence "${params.fasta}" \
--output-directory "./"
"""
}
process PREP_FOR_DOCKING {
publishDir "${params.output}/${uuid}", mode: 'copy', overwrite: true
conda "${params.asap}"
tag "${uuid}"
clusterOptions '--partition cpushort'
input:
tuple val(uuid), path(prepped_pdb, stageAs: "prepped_complex.pdb")
output:
tuple val(uuid), path("*/*ligand.sdf"), emit: ligand_sdf
tuple val(uuid), path("*/*spruced_complex.pdb"), emit: prepped_pdb
tuple val(uuid), path("*/*.json"), emit: json_schema
tuple val(uuid), path("*/*.oedu"), emit: design_unit
script:
"""
plumbline prep-protein-for-docking \
--target SARS-CoV-2-Mpro \
--pdb-file "${prepped_pdb}" \
--output-dir "./"
"""
}
process ASSESS_PREPPED_PROTEIN {
publishDir "${params.output}/${uuid}", mode: 'copy', overwrite: true
conda "${params.asap}"
tag "${uuid}"
clusterOptions '--partition cpushort'
input:
tuple val(uuid), path(design_unit, stageAs: "design_unit.oedu")
output:
tuple val(uuid), path("*.json"), emit: report_json
script:
"""
plumbline assess-prepped-protein \
--input-file "${design_unit}" \
--output-directory "./"
"""
}
process GENERATE_CONSTRAINED_LIGAND_POSES {
publishDir "${params.output}/${uuid}", mode: 'copy', overwrite: true
conda "${params.asap}"
tag "${uuid}"
clusterOptions '--partition cpushort'
input:
tuple val(uuid), path(prepped_complex_json_schema, stageAs: "json_schema.json")
output:
tuple val(uuid), path("*.sdf"), emit: posed_ligands
script:
"""
plumbline generate-constrained-ligand-poses \
--input-sdf "${params.congenericSeries}" \
--prepped-schema "${prepped_complex_json_schema}" \
--output-directory "./"
"""
}
process MAKE_FEC_INPUTS {
publishDir "${params.output}/${uuid}", mode: 'copy', overwrite: true
conda "${params.asap}"
tag "${uuid}"
clusterOptions '--partition cpushort'
input:
tuple val(uuid), path(posed_ligands, stageAs: "posed_ligands.sdf"), path(prepped_complex, stageAs: "prepped_complex.pdb")
output:
tuple val(uuid), path("*/*.graphml"), emit: network_graph
tuple val(uuid), path("*/*.json"), emit: network_json
script:
"""
asap-cli alchemy create fecs-workflow.json
asap-cli alchemy plan \
-f fecs-workflow.json \
--name ${uuid}_plumb_alchemiscale_network \
--receptor "${prepped_complex}" \
--ligands "${posed_ligands}" \
"""
}
process VISUALIZE_NETWORK {
publishDir "${params.output}/${uuid}", mode: 'copy', overwrite: true
conda "${params.asap}"
tag "${uuid}"
clusterOptions '--partition cpushort'
input:
tuple val(uuid), path(network_graph, stageAs: "network.graphml")
output:
tuple val(uuid), path("*.png"), emit: network_png
script:
"""
plumbline visualize-network \
--network-graphml "${network_graph}" \
--output-directory "./"
"""
}