-
Notifications
You must be signed in to change notification settings - Fork 23
/
nextflow.config
272 lines (227 loc) · 6.88 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
process {
publishDir = {"./results/$sid/$task.process"}
scratch = true
errorStrategy = { task.attempt <= 3 ? 'retry' : 'ignore' }
maxRetries = 3
maxErrors = -1
stageInMode = 'copy'
stageOutMode = 'rsync'
tag = { "$sid" }
afterScript = 'sleep 1'
}
params {
//*BIDS options**//
clean_bids=false
//**Global options**//
b0_thr_extract_b0=10
dwi_shell_tolerance=20
//**SH fitting**//
sh_fitting=false
sh_fitting_order=6
sh_fitting_basis="descoteaux07"
//**Preliminary DWI brain extraction**//
dilate_b0_mask_prelim_brain_extraction=5
bet_prelim_f=0.16
//**Denoise dwi (dwidenoise in Mrtrix3)**//
run_dwi_denoising=true
extent=7
//**GIBBS CORRECTION (mrdegibbs in Mrtrix3)**//
run_gibbs_correction=false
//**Topup**//
run_topup=true
config_topup="b02b0.cnf"
encoding_direction="y"
readout=0.062
prefix_topup="topup_results"
//**Eddy**//
run_eddy=true
eddy_cmd="eddy_cpu"
bet_topup_before_eddy_f=0.16
use_slice_drop_correction=true
//**Final DWI BET**//
bet_dwi_final_f=0.16
//**Denoise T1**//
run_t1_denoising=false
//**Resample T1**//
run_resample_t1=true
t1_resolution=1
t1_interpolation="lin"
//**Normalize DWI**//
fa_mask_threshold=0.4
//**Resample DWI**//
run_resample_dwi=true
dwi_resolution=1
dwi_interpolation="lin"
//**Extract DTI shells using this value as maximum**//
max_dti_shell_value=1200
//**Extract fODF shells using this value as minimum**//
min_fodf_shell_value=700
//**Segment tissues**//
number_of_tissues=3
//**Compute fiber response function (frf)**//
fa=0.7
min_fa=0.5
min_nvox=300
roi_radius=20
set_frf=true
manual_frf="15,4,4"
//**Mean fiber response function (frf)**//
mean_frf=false
//**Compute fODF metrics**//
sh_order=8
basis="descoteaux07"
fodf_metrics_a_factor=2.0
relative_threshold=0.1
max_fa_in_ventricle=0.1
min_md_in_ventricle=0.003
//**PFT seeding mask**//
pft_seeding_mask_type="wm"
pft_fa_seeding_mask_threshold=0.1
//**PFT tracking**//
run_pft_tracking=true
pft_compress_streamlines=true
pft_algo="prob"
pft_seeding="npv"
pft_nbr_seeds=10
pft_step=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 mask**//
local_seeding_mask_type="wm"
local_fa_seeding_mask_threshold=0.1
//**Local tracking mask**//
local_tracking_mask_type="wm"
local_fa_tracking_mask_threshold=0.1
//**Local tracking**//
run_local_tracking=false
local_compress_streamlines=true
local_algo="prob"
local_seeding="npv"
local_nbr_seeds=10
local_step=0.5
local_theta=20
local_sfthres=0.1
local_sfthres_init=0.5
local_min_len=20
local_max_len=200
local_compress_value=0.2
local_random_seed=0
local_tracking_gpu=false
local_batch_size_gpu=10000
//**Number of processes per tasks**//
processes_brain_extraction_t1=4
processes_denoise_dwi=4
processes_denoise_t1=4
processes_eddy=4
processes_fodf=4
processes_registration=4
processes_local_tracking=4
//**Tractoflow-ABS**//
run_tractoflow_abs = false
//**Template T1 path**//
template_t1="/human-data/mni_152_sym_09c/t1"
//**Output directory**//
output_dir=false
//**Process control**//
processes = false
Mean_FRF_Publish_Dir = "./results/Mean_FRF"
Readme_Publish_Dir = "./results/Readme"
Read_BIDS_Publish_Dir = "./results/Read_BIDS"
}
if(params.output_dir) {
process.publishDir = {"$params.output_dir/$sid/$task.process"}
params.Mean_FRF_Publish_Dir = "${params.output_dir}/Mean_FRF"
params.Readme_Publish_Dir = "${params.output_dir}/Readme"
params.Read_BIDS_Publish_Dir = "${params.output_dir}/Read_BIDS"
workDir = "${params.output_dir}/work"
}
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
singularity.runOptions = "--no-home"
profiles {
use_gpu {
singularity.runOptions='--nv'
docker.runOptions='--gpus all'
params.eddy_cmd="eddy_cuda10.2"
params.local_algo="prob"
params.local_tracking_gpu=true
}
fully_reproducible {
params.processes_brain_extraction_t1=1
params.processes_denoise_dwi=4
params.processes_denoise_t1=4
params.processes_eddy=1
params.processes_fodf=4
params.processes_registration=1
params.processes_local_tracking=1
}
skip_preprocessing {
params.run_resample_t1 = false
params.run_resample_dwi = false
params.run_topup = false
params.run_eddy = false
params.run_dwi_denoising = false
process {
withLabel: 'big_mem' { maxForks = 10 }
}
}
macos {
process.scratch="/tmp"
}
cbrain {
process{
if(params.output_dir) {
publishDir = [path: {"$params.output_dir/$sid/$task.process"}, mode: 'copy']
}
else{
publishDir = [path: {"./results/$sid/$task.process"}, mode: 'copy']
}
withName: 'README' {
publishDir = [path: {"$params.Readme_Publish_Dir"}, mode: 'copy']
}
withName: 'Read_BIDS' {
publishDir = [path: {"$params.Read_BIDS_Publish_Dir"}, mode: 'copy']
}
}
}
ABS {
params.run_tractoflow_abs=true
params.run_local_tracking=true
params.run_pft_tracking=false
}
bundling {
//**Local tracking**//
params.run_local_tracking=true
params.local_nbr_seeds=5
params.local_tracking_mask_type="fa"
params.local_seeding_mask_type="fa"
params.local_fa_seeding_mask_threshold=0.15
params.local_fa_tracking_mask_threshold=0.15
//**PFT tracking**//
params.pft_nbr_seeds=10
}
connectomics {
//**PFT tracking**//
params.pft_nbr_seeds=30
params.pft_seeding_mask_type="interface"
}
}