/
nextflow.config
170 lines (140 loc) · 3.68 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
process {
publishDir = {"./Results_Infant_Tracking/$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 {
help = false
input = false
processes = false
// ** TRACKING PARAMS ** //
// Global Options
b0_thr = 10
dwi_shell_tolerance = 20
// BET DWI Options
initial_bet_f = 0.5
final_bet_f = 0.35
// BET T2 Options
run_bet_t2w = false
bet_t2w_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.10
// RESAMPLE_ANAT Options
t2w_resolution = 1
t2w_interpolation = "lin"
mask_interpolation = "nn"
// RESAMPLE_DWI Options
dwi_resolution = 1
dwi_interpolation = "lin"
mask_dwi_interpolation = "nn"
// EXTRACT_DTI_SHELLS Options
max_dti_shell_value = 1200
// SH_FITTING_SHELL Options
sh_fitting = false
sh_fitting_order = 6
sh_fitting_basis = "descoteaux07"
// FODF Options
min_fodf_shell_value = 700
max_fa_in_ventricle = 0.1
min_md_in_ventricle = 0.00185
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 = "12,7,7"
// Seeding and tracking Options
fa_seeding_mask_thr = 0.1
algo = "prob"
nb_seeds = 10
seeding = "npv"
step_size = 0.5
theta = 20
sfthres = 0.1
min_len = 10
max_len = 200
tracking_seed = 0
use_brain_mask_as_tracking_mask = false
compress_value = 0.2
// Processes per tasks
processes_denoise_dwi = 4
processes_eddy = 1
processes_registration = 4
processes_fodf = 4
// ** CONNECTOMICS PARAMS ** //
// Decompose Connectivity Options
no_pruning = false
no_remove_loops = false
no_remove_outliers = false
min_length = 10
max_length = 200
loop_max_angle = 330
outlier_threshold = 0.4
// COMMIT Options
nbr_dir = 500
para_diff = "1.7E-3"
iso_diff = "2.0E-3"
// Processes per tasks
processes_commit = 8
processes_afd_fixel = 4
processes_connectivity = 4
params.commit_memory_limit = '6.GB'
// Output Directory
output_dir = false
// Profiles Options
run_tracking = false
run_connectomics = false
Mean_FRF_Publish_Dir = "./Results_Infant_Tracking/Mean_FRF"
}
if(params.output_dir) {
process.publishDir = {"$params.output_dir/$sid/$task.process"}
params.Mean_FRF_Publish_Dir = "${params.output_dir}/Mean_FRF"
}
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: {"./Results_Infant_Tracking/$sid/$task.process"}, mode: 'copy']
}
}
macos {
process.scratch="/tmp"
}
tracking {
params.run_tracking = true
}
connectomics {
params.run_connectomics = true
}
}