-
Notifications
You must be signed in to change notification settings - Fork 2
/
nextflow.config
343 lines (286 loc) · 7.99 KB
/
nextflow.config
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
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
process {
publishDir = {"${params.output_dir}/$sid/${task.process.replaceAll(':', '-')}"}
scratch = true
errorStrategy = { task.attempt <= 3 ? 'retry' : 'ignore' }
maxRetries = 3
maxErrors = -1
stageInMode = 'copy'
stageOutMode = 'rsync'
tag = { "$sid" }
afterScript = 'sleep 1'
}
params {
help = false
input = false
processes = false
// ** TRACKING PARAMS ** //
//** Global Options **//
b0_thr = 10
dwi_shell_tolerance = 20
skip_dwi_preprocessing = false
template_t1 = "/human-data/mni_152_sym_09c/t1"
//** BET DWI Options **//
initial_bet_f = 0.16
final_bet_f = 0.16
//** SYNTHSTRIP Options **//
run_synthbet = false
shells = "0 1500"
shell_thr = 50
gpu = false
border = false
nocsf = false
weights = false
//** BET ANAT Options **//
run_bet_anat = false
bet_anat_f = 0.16
// EDDY and TOPUP Options
topup_config = "b02b0.cnf"
encoding_direction = "y"
readout = 0.062
topup_prefix = "topup_results"
topup_bet_f = 0.16
eddy_cmd = "eddy_cpu"
use_slice_drop_correction = true
// NORMALIZE Options
fa_mask_threshold = 0.4
// RESAMPLE_ANAT Options
anat_resolution = 1
anat_interpolation = "lin"
mask_interpolation = "nn"
// RESAMPLE_DWI Options
dwi_resolution = 1
dwi_interpolation = "lin"
mask_dwi_interpolation = "nn"
// EXTRACT_DTI_SHELLS Options
dti_shells = false
max_dti_shell_value = 1200
// SH_FITTING_SHELL Options
sh_fitting = false
sh_fitting_order = 6
sh_fitting_basis = "descoteaux07"
// FODF Options
fodf_shells = false
min_fodf_shell_value = 700
fodf_metrics_a_factor = 2.0
max_fa_in_ventricle = 0.1
min_md_in_ventricle = 0.003
relative_threshold = 0.1
basis = "descoteaux07"
sh_order = 8
// FRF Options
mean_frf = false
fa = 0.7
min_fa = 0.5
min_nvox = 300
roi_radius = 20
set_frf = true
manual_frf = "15,4,4"
// ** Segment Tissues Options ** //
number_of_tissues = 3
//** PFT Seeding and Tracking Options **//
run_pft_tracking = true
pft_compress_streamlines = true
pft_seeding_mask_type = "wm"
pft_fa_seeding_mask_thr = 0.1
pft_algo = "prob"
pft_nbr_seeds = 10
pft_seeding = "npv"
pft_step_size = 0.5
pft_theta = 20
pft_sfthres = 0.1
pft_sfthres_init = 0.5
pft_min_len = 20
pft_max_len = 200
pft_particles = 15
pft_back = 2
pft_front = 1
pft_compress_value = 0.2
pft_random_seed = 0
//** Local Seeding and Tracking Options **//
run_local_tracking = false
local_compress_streamlines = true
local_fa_tracking_mask_thr = 0.1
local_tracking_mask_type = "wm"
local_fa_seeding_mask_thr = 0.1
local_seeding_mask_type = "wm"
local_algo = "prob"
local_nbr_seeds = 10
local_seeding = "npv"
local_step_size = 0.5
local_theta = 20
local_sfthres = 0.1
local_sfthres_init = 0.5
local_min_len = 20
local_max_len = 200
local_tracking_seed = 0
local_compress_value = 0.2
local_erosion = 0
// Processes per tasks
processes_denoise_dwi = 4
processes_denoise_t1 = 4
processes_bet_t1 = 4
processes_eddy = 4
processes_registration = 4
processes_fodf = 4
// ** CONNECTOMICS PARAMS ** //
// Decompose Connectivity Options
no_pruning = false
no_remove_loops = false
no_remove_outliers = false
min_length = 20
max_length = 200
loop_max_angle = 330
outlier_threshold = 0.5
//** COMPUTE_PRIORS Options **//
compute_priors = false
fa_min_priors = 0.7
fa_max_priors = 0.1
md_min_priors = 0.002
roi_radius_priors = 20
multishell = false
//** COMMIT Options **//
run_commit = true
use_commit2 = true
use_both_commit = false
commit_on_trk = false
b_thr = 50
nbr_dir = 500
ball_stick = true
para_diff = "1.7E-3"
perp_diff = "0.51E-3"
iso_diff = "2.0E-3"
// Processes per tasks
processes_commit = 8
processes_afd_fixel = 4
processes_connectivity = 4
params.commit_memory_limit = '24.GB'
// Profiles Options
run_freesurfer = false
run_tracking = false
run_connectomics = false
infant_config = false
template_config = false
priors = false
// Template Options //
references = "./references/"
Mean_FRF_Publish_Dir = "./Results_ChildBrainFlow/Mean_FRF"
Pop_Avg_Publish_Dir = "./Results_ChildBrainFlow/Pop_Avg"
// ** FreeSurfer Options ** //
recon_all = false
recon_surf = true
use_freesurfer_atlas = false
use_brainnetome_atlas = false
use_brainnetome_child_atlas = true
use_glasser_atlas = false
use_schaefer_100_atlas = false
use_schaefer_200_atlas = false
use_schaefer_400_atlas = false
use_lausanne_1_atlas = false
use_lausanne_2_atlas = false
use_lausanne_3_atlas = false
use_lausanne_4_atlas = false
use_lausanne_5_atlas = false
use_dilated_labels = false
nb_threads = 4
atlas_utils_folder = "/FS_BN_GL_SF_utils/"
compute_FS_BN_GL_SF = false
compute_BN_child = true
compute_lausanne_multiscale = false
compute_lobes = false
// ** Output Options ** //
output_dir = "./Results_ChildBrainFlow/"
}
if ( params.output_dir ) {
params.Mean_FRF_Publish_Dir = "${params.output_dir}/Mean_FRF"
params.Pop_Avg_Publish_Dir = "${params.output_dir}/Pop_Avg"
}
if(params.processes) {
if(params.processes > Runtime.runtime.availableProcessors()) {
throw new RuntimeException("Number of processes higher than available CPUs.")
}
else if(params.processes < 1) {
throw new RuntimeException("When set, number of processes must be >= 1 " +
"and smaller or equal to the number of CPUs.")
}
else {
executor.$local.cpus = params.processes
}
}
singularity.autoMounts = true
profiles {
no_symlink {
process{
publishDir = [path: {"${params.output_dir}/$sid/${task.process.replaceAll(':', '-')}"}, mode: 'copy']
}
}
macos {
process.scratch="/tmp"
}
hcp {
process {
executor = 'slurm'
errorStrategy = 'retry'
maxRetries = 1
}
executor {
pollInterval = '180 sec'
queueGlobalStatus = true
queueStatInterval = '3 min'
submitRateLimit = '100/1min'
maxForks = 1000
queueSize = 1000
exitReadTimeout = '600 sec'
}
}
freesurfer {
params.run_freesurfer = true
}
tracking {
params.run_tracking = true
}
connectomics {
params.run_connectomics = true
}
priors {
params.priors = true
params.run_commit = true
params.compute_priors = true
params.set_frf = false
params.mean_frf = true
}
infant {
params.infant_config = true
//** BET DWI Options **//
params.initial_bet_f = 0.5
params.final_bet_f = 0.35
//** SYNTHSTRIP Options **//
params.run_synthbet = true
//** NORMALIZE Options **//
params.fa_mask_threshold = 0.10
//** FODF Options **//
params.max_fa_in_ventricle = 0.1
params.min_md_in_ventricle = 0.00185
//** FRF Options **//
params.manual_frf = "12,5,5"
//** LOCAL TRACKING **//
params.run_pft_tracking = false
params.run_local_tracking = true
params.erosion = 6
params.local_min_len = 15
params.local_fa_seeding_mask_thr = 0.1
// ** DECOMPOSE Options ** //
min_length = 10
outlier_threshold = 0.4
// ** COMMIT Options ** //
params.run_commit = true
params.use_commit2 = true
// params.commit_on_trk = true
params.para_diff = "1.2E-3"
params.iso_diff = "2.0E-3"
}
template {
params.template_config = true
//** BET ANAT Options **//
params.bet_anat_f = 0.1
}
}