-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmodules.nf
More file actions
152 lines (125 loc) · 4.34 KB
/
modules.nf
File metadata and controls
152 lines (125 loc) · 4.34 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
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:
"""
python "${params.scripts}/process_bindingdb.py" --input-dir "${params.bindingDB}"
"""
}
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:
"""
python "${params.scripts}/download_pdb.py" --input-json "${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:
"""
python "${params.scripts}/prep_cif.py" --input-json "${input_json}" --input-cif "${input_cif}" --fasta-sequence "${params.fasta}"
"""
}
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:
"""
asap-cli protein-prep --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:
"""
python "${params.scripts}/assess_prepped_protein.py" --input-oedu "${design_unit}"
"""
}
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:
"""
python "${params.scripts}/generate_constrained_ligand_poses.py" --input-sdf "${params.congenericSeries}" --prepped-schema "${prepped_complex_json_schema}"
"""
}
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:
"""
python "${params.scripts}/visualize_network.py" --network-graphml "${network_graph}"
"""
}