forked from uc-derisilab/pairis
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnextflow.config
More file actions
255 lines (221 loc) · 7.68 KB
/
Copy pathnextflow.config
File metadata and controls
255 lines (221 loc) · 7.68 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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
// PAIRIS Pipeline Configuration
// Default parameters
params {
// Project settings
project_name = null
peptide_fasta = null
bcr_dir = null
chain_dir = null
// Analysis parameters
window_sizes = null // e.g., [15, 25] or null for full sequences
num_seeds = 100
num_diffusion_samples = 5 // AF3 num_diffusion_samples per seed
// Folding backend selection
folding_backend = 'alphafold3' // 'alphafold3' (default) or 'esmfold2'
esmfold2_model = 'fast' // ESMFold2 variant: 'fast' (no MSAs) or 'full' (uses MSAs)
esmfold2_conda_env = 'esmfold2' // conda env activated for the ESMFold2 folding step
esmfold2_hf_home = null // optional HF_HOME (model cache) for ESMFold2
esmfold2_num_loops = 3 // ESMFold2 num_loops
esmfold2_num_sampling_steps = 50 // ESMFold2 num_sampling_steps
// Workflow stages
run_msa_generation = true
run_structure_prediction = true
run_rosetta_analysis = true
// Output directories
outdir = "results"
af3_output_dir = null // Must be set by user (shared/group storage recommended)
// SLURM settings
partition = "preempted"
// Environment settings (override in params.yml if needed)
af3_module = 'alphafold/3.0.1-23-g792e61e'
conda_env = 'pairis'
rosetta_conda_env = 'rosetta'
grouping_partition = 'cpu'
max_memory = 128.GB
max_cpus = 32
max_time = 24.h
// ===== Local Execution Settings =====
af3_sif = null // Path to alphafold.sif
af3_model_dir = null // Path to AF3 model params
af3_db_dir = null // Path to AF3 public databases
local_num_gpus = 4 // Number of GPUs available
local_max_parallel_folding = 4 // Max concurrent GPU jobs
local_max_parallel_cpu = 8 // Max concurrent CPU-bound jobs
local_venv = null // Path to general uv venv (input gen, collation, extract, grouping)
// Resource configuration (can be overridden in params.yml or command line)
// MSA generation resources
msa_cpus = 2
msa_memory = '16.GB'
msa_time = '1.h'
msa_partition = 'cpu'
// Structure folding resources
folding_cpus = 1
folding_memory = '16.GB'
folding_time = '40.m'
folding_gpu = 1
folding_partition = 'gpu'
// Rosetta analysis resources
rosetta_cpus = 4
rosetta_memory = '16.GB'
rosetta_time = '8.h'
rosetta_partition = 'cpu'
// Extraction resources
extract_cpus = 2
extract_memory = '16.GB'
extract_time = '60.m'
extract_partition = 'cpu'
}
// Load Nextflow version
manifest {
name = 'PAIRIS'
description = 'Peptide-Antibody Interaction Research & Inference Suite'
author = 'Monica Dayao'
version = '1.0.0'
nextflowVersion = '>=24.10.0'
}
// Executor configuration
executor {
name = 'slurm'
queueSize = 500
submitRateLimit = '10 sec'
}
// Process configuration
process {
executor = 'slurm'
queue = params.partition
// Default resources
cpus = 1
memory = 4.GB
time = 45.m
// Load mamba and activate conda environment for all processes
beforeScript = "module load mamba && mamba activate ${params.conda_env}"
// Process-specific labels
withLabel: complex_input {
cpus = 1
memory = '4.GB'
time = '5.m'
queue = params.msa_partition
array = 10000
}
withLabel: msa_input {
cpus = 1
memory = '4.GB'
time = '5.m'
queue = params.msa_partition
array = 10000
}
withLabel: af3_msa {
cpus = params.msa_cpus
memory = params.msa_memory
time = params.msa_time
queue = params.msa_partition
array = 10000
}
withLabel: af3_folding {
cpus = params.folding_cpus
memory = params.folding_memory
time = params.folding_time
queue = params.folding_partition
clusterOptions = "--gres=gpu:${params.folding_gpu}"
array = 10000
}
withLabel: esmfold2_folding {
cpus = params.folding_cpus
memory = params.folding_memory
time = params.folding_time
queue = params.folding_partition
clusterOptions = "--gres=gpu:${params.folding_gpu}"
array = 10000
// Activate the ESMFold2 env (not the default conda_env) and, if set,
// point HF_HOME at the model cache.
beforeScript = "module load mamba && mamba activate ${params.esmfold2_conda_env}" + (params.esmfold2_hf_home ? " && export HF_HOME=${params.esmfold2_hf_home}" : "")
}
withLabel: rosetta {
cpus = params.rosetta_cpus
memory = params.rosetta_memory
time = params.rosetta_time
queue = params.rosetta_partition
array = 10000
beforeScript = "module load mamba && mamba activate ${params.rosetta_conda_env}"
}
withLabel: extract {
cpus = params.extract_cpus
memory = params.extract_memory
time = params.extract_time
queue = params.extract_partition
}
withLabel: grouping {
cpus = 1
memory = 8.GB
time = 2.h
queue = params.grouping_partition
}
}
profiles {
slurm {
// Explicit SLURM profile (same as current default)
executor.name = 'slurm'
}
local {
executor {
name = 'local'
cpus = params.max_cpus
memory = params.max_memory
}
process {
executor = 'local'
queue = null
clusterOptions = null
beforeScript = params.local_venv ? "source ${params.local_venv}/bin/activate" : ""
withLabel: af3_folding {
maxForks = params.local_max_parallel_folding
array = null
}
withLabel: esmfold2_folding {
maxForks = params.local_max_parallel_folding
array = null
beforeScript = "module load mamba && mamba activate ${params.esmfold2_conda_env}" + (params.esmfold2_hf_home ? " && export HF_HOME=${params.esmfold2_hf_home}" : "")
}
withLabel: af3_msa {
time = params.msa_time
maxForks = params.local_max_parallel_folding
array = null
}
withLabel: rosetta {
maxForks = params.local_max_parallel_cpu
array = null
// Match the ESMFold2 step: activate the mamba Rosetta env rather
// than a uv venv, so local runs use the same env as SLURM.
beforeScript = "module load mamba && mamba activate ${params.rosetta_conda_env}"
}
withLabel: msa_input {
maxForks = params.local_max_parallel_cpu
array = null
}
withLabel: complex_input {
maxForks = params.local_max_parallel_cpu
array = null
}
withLabel: extract { maxForks = params.local_max_parallel_cpu }
withLabel: grouping { maxForks = 1 }
}
}
}
// Execution reports
timeline {
enabled = true
file = "${params.outdir}/reports/timeline.html"
overwrite = true
}
report {
enabled = true
file = "${params.outdir}/reports/report.html"
overwrite = true
}
trace {
enabled = true
file = "${params.outdir}/reports/trace.txt"
overwrite = true
}
// Cleanup options
cleanup = false // Set to true to delete work directory after successful completion