-
Notifications
You must be signed in to change notification settings - Fork 1
/
nextflow.config
284 lines (238 loc) · 9.1 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
// Algorithms configuration
// ------------------------
//
// Due to the variety of the possible configurations of some algorithms and
// to the plurality of options they offer, their specific configuration has
// been extracted to separate files. Here is listed all of the algorithms
// and there related configuration entry point. Using it, users can input
// a per study configuration for those, by either using the parameters
// params.* inside their nextflow.config file, supplying the complete path
// to the configuration file associated, of supplying them via their command
// line call to nextflow (using the name of the parameter after params.).
//
// The configuration files must be placed in a directory accessible to the
// execution of Nextflow, we suggest putting them at the root of the
// execution of Nextflow for each study. To build a valid configuration
// file, either call
// mrhardi <name of app> --out-config <name_of_config_file>
//
// or refer to those present in the .config directory. Take not however that
// those have been tailored for a global execution for most studies and that
// their content won't necessarily reflect the entire configuration possible.
// Preprocessing algorithms global configuration
// ---------------------------------------------
// - Topup correction : params.prepare_topup_base_config
// - Eddy correction : params.prepare_eddy_base_config
// - Eddy correction (CUDA) : params.prepare_eddy_cuda_base_config
// - N4 normalization (DWI) : params.dwi_n4_normalization_config
// - N4 normalization (T1) : params.t1_n4_normalization_config
// - ANTs registration : params.ants_registration_basic_config
// - ANTs apply transform : params.ants_transform_base_config
// Utilitary algorithms global configuration
// -----------------------------------------
// - Concatenation : params.concatenate_base_config
// - Shell extraction (n > 1) : params.extract_shell_greater_than_one_config
// - b0 mean extraction : params.extract_mean_b0_base_config
// Workflow specific configuration
// -------------------------------
// - Pre-denoise T1 to b0 mask registration : params.pre_denoise_mask_registration_config
// - Topup b0 extraction : params.preproc_epi_correction_extract_b0_config
// - Pre-Eddy b0 set reduction : params.preproc_squash_b0_config
// T1 t0 b0 registration configuration
// -----------------------------------
// - Base registration (Rigid + Affine) : params.t1_registration_base_registration_config
// - SyN registration (t1 -> b0 + t1 -> FA) : params.t1_registration_syn_registration_config
// Inter-repetition registration configuration (b0 to b0 + t1 to b0)
// -----------------------------------------------------------------
// - b0 to b0 registration : params.reps_registration_b0_registration_config
// - t1 to b0 registration : params.reps_registration_t1_registration_config
// - Apply registration : params.reps_registration_apply_registration_config
// Reconstruction algorithms configuration
// ---------------------------------------
// - Diamond : params.reconstruct_diamond_config
// - DTI : params.reconstruct_mrtrix_dti_config
// - CSD : params.reconstruct_mrtrix_csd_config
// - Response function : params.reconstruct_mrtrix_frf_config
// Measures on reconstructions algorithms configuration
// ----------------------------------------------------
// - Measures on Diamond : params.measures_on_diamond_config
// - Measures on DTI : params.measures_on_dti_config
// Inputs declaration
params.data_root = false
params.include_sid = []
params.exclude_sid = []
params.default_readout = false
params.default_multiband_factor = false
params.default_is_interleaved = null
params.default_slicing_direction = false
params.default_phase_direction = false
params.default_acquisition_tensor_type = "Linear"
// Outputs declaration
params.output_root = "outputs"
params.publish_all = false
params.publish_mode = "copy"
params.publish_all_mode = "symlink"
params.verbose_outputs = false
// Use gpu if available
params.use_cuda = false
// Resources conservation
params.conservative_resources = true
params.free_processes = 1
params.memory_buffer_gb = 10
params.max_cpu_per_process = 10
params.max_attempts = 3
params.check_memory_requirements = false
// Enable and disable pipeline steps
// Global processes
params.resample_data = false
// T1 processes
params.denoise_t1 = true
params.t1_intensity_normalization = true
// Registration processes
params.dwi_mask_from_t1_mask = true
params.register_t1_to_dwi = true
// Segmentation processes
params.generate_tissue_segmentation = true
params.generate_wm_segmentation = true
params.register_d99 = true
params.register_charm = true
params.register_sarm = true
params.register_inia19 = true
// DWI processes
params.gaussian_noise_correction = true
params.gibbs_ringing_correction = true
params.normalize_inter_b0 = false
params.epi_correction = true
params.eddy_correction = true
params.dwi_intensity_normalization = true
// Reconstruction processeses
params.recons_dti = true
params.recons_csd = true
params.recons_diamond = true
// Tracking processes
params.pft_tracking = true
// Misc processes
params.raw_to_processed_space = false
// WORKFLOWS PARAMETRIZATION
// Global preprocessing parameters
params.force_resampling_resolution = false
params.resampling_min_resolution = false
params.resampling_subdivision = 2
params.force_resampling_sequential = true
params.b0_threshold = false
// T1 preprocessing parameters
params.nlmeans_t1 = true
// DWI preprocessing parameters
// B0 normalization
params.b0_normalization_strategy = "linear"
// EPI correction
params.epi_algorithm = "topup"
// Eddy
params.eddy_force_shelled = true
params.eddy_with_reverse = true
params.eddy_select_gpu = true
params.cuda_max_parallel = 4
// Bet
params.bet_f = 0.5
// Registration
params.quick_t1_mask_registration = true
params.quick_denoised_t1_registration = false
params.t1_registration_in_subject_space = false
// Segmentation
params.segmentation_classes = ["csf", "wm", "gm", "dgm", "pdgm", "blood"]
params.atropos_n4_tissues = ["wm", "dgm", "pdgm"]
params.atropos_prior_weight = 0.2
params.atropos_mrf_weight = 0.3
params.atropos_mrf_neighborhood = 1
params.atropos_n4_iterations = [200, 100, 50, 50]
params.atropos_n4_convergence_eps = 1E-10
params.atropos_n4_shrink_factor = 2
params.atropos_n4_bspline_fitting = 100
params.csf_distance_lambda = 0.1
params.csf_distance_probability = 0.5
params.default_distance_lambda = 0.1
params.default_distance_probability = 0.8
params.default_blur_factor = 0.4
params.csf_blur_factor = 0.25
// 3-tissues masks
params.min_pvf_threshold = 0.001
params.max_safe_csf_pvf_threshold = 0.05
params.max_safe_gm_pvf_threshold = 0.01
params.safe_csf_mask_dilation = 1
params.safe_gm_mask_dilation = 0
// Diffusion modeling
params.strict_parameters = true
// DTI
params.max_dti_bvalue = 1300
// CSD
params.duplicates_merge_method = "mean"
params.msmt_odf = false
params.use_mrtrix_csd = false
params.frf_fa = 0.75
params.frf_min_fa = 0.55
params.frf_min_nvox = 200
params.frf_radii = false
params.frf_center = false
params.frf_on_dti_shell = false
params.max_fa_ventricle = 0.2
params.min_md_ventricle = 0.0025
params.ventricles_center = false
params.fodf_wm_max_absolute_factor = 1.5
params.fodf_gm_max_absolute_factor = 1.0
params.fodf_wm_relative_thr = 0.2
params.fodf_gm_relative_thr = 0.6
params.sh_order = 8
// DIAMOND
params.n_fascicles = 3
params.fascicle_model = "diamondNCcyl"
params.model_selection_with_tensor = false
params.estimate_restriction = false
params.estimate_hindered = false
params.restriction_tensor = false
params.free_water_tensor = false
params.normalized_fractions = true
// Tracking
params.pve_threshold = 0.01
params.pft_random_seed = 0
params.pft_tracking_algorithm = "prob"
params.streamline_compression_factor = 0.2
params.pft_seeding_strategy = "npv"
params.pft_number_of_seeds = 20
params.pft_step_size = 0.25
params.pft_theta_max = 20
params.pft_sfthres = 0.1
params.pft_sfthres_init = 0.5
params.pft_min_tract_length = 20
params.pft_max_tract_length = 200
params.pft_number_of_particles = 15
params.pft_back_tracking_length = 1
params.pft_forward_tracking_length = 0.5
// COMMIT
params.commit_frf_n_directions = 500
params.commit_n_iterations = 1000
params.commit_run_commit2 = false
params.commit_lambda_commit2 = 1E-3
params.commit_use_ball_stick = false
params.commit_parallel_diffusivity = 1.7E-3
params.commit_perpendicular_diffusivity = 0.51E-3
params.commit_isotropic_diffusivity = [1.7E-3, 3.0E-3]
// Miscelaneous
params.random_seed = 1234
params.validate_bvecs_fa_thr = 0.2
includeConfig '.base/resource_allocation.config'
includeConfig '.base/manifest.config'
singularity.autoMounts = true
if ( params.use_cuda ) {
singularity.runOptions = "--nv"
docker.runOptions = "--gpus all"
}
if ( !params.cuda_max_parallel ) {
params.cuda_max_parallel = params.processes - 1
}
// Required environment variables
env.FSLOUTPUTTYPE = 'NIFTI_GZ'
params.on_hcp = false
// Configuration profiles
includeConfig '.base/profiles.config'
// Include tower config, which can be empty if no tower connection needs to be made
includeConfig '.base/tower.config'