11
11
12
12
@click .command ()
13
13
@click .option ('--participant-label' , help = "The label(s) of the participant(s) that should be"
14
- "analyzed. The label corresponds to"
15
- "sub-<participant_label> from the BIDS spec (so it does"
16
- "not include 'sub-'). If this parameter is not provided"
17
- "all subjects will be analyzed. Multiple participants"
18
- "can be specified with a space separated list." ,
14
+ "analyzed. The label corresponds to"
15
+ "sub-<participant_label> from the BIDS spec (so it does"
16
+ "not include 'sub-'). If this parameter is not provided"
17
+ "all subjects will be analyzed. Multiple participants"
18
+ "can be specified with a space separated list." ,
19
19
default = None
20
20
)
21
+ @click .option ('--eddy-niter' ,
22
+ help = "Fixed number of eddy iterations. See"
23
+ "https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/eddy/UsersGuide#A--niter" ,
24
+ default = 5 )
25
+ @click .option ('--slice-outlier-threshold' ,
26
+ help = "Number of allowed outlier slices per volume."
27
+ "If this is exceeded the volume is dropped from analysis. If"
28
+ "`slice_outlier_threshold` is an int, it is treated as number of allowed"
29
+ "outlier slices. If `slice_outlier_threshold` is a float between 0 and 1"
30
+ "(exclusive), it is treated the fraction of allowed outlier slices." ,
31
+ default = 0.02 )
21
32
@click .argument ('bids_dir' ,
22
33
)
23
34
@click .argument ('output_dir' ,
24
35
)
25
36
@click .argument ('analysis_level' ,
26
37
type = click .Choice (['participant' , 'group' ]),
27
38
default = 'participant' )
28
- def main (participant_label , bids_dir , output_dir , analysis_level = "participant" ):
39
+ def main (participant_label , bids_dir , output_dir ,
40
+ eddy_niter = 5 , slice_outlier_threshold = 0.02 ,
41
+ analysis_level = "participant" ):
29
42
"""
30
43
BIDS_DIR: The directory with the input dataset formatted according to the BIDS standard.
31
44
@@ -38,7 +51,6 @@ def main(participant_label, bids_dir, output_dir, analysis_level="participant"):
38
51
participant level analyses can be run independently
39
52
(in parallel).
40
53
"""
41
-
42
54
if analysis_level is not 'participant' :
43
55
raise NotImplementedError ('The only valid analysis level for dmriprep is participant at the moment.' )
44
56
@@ -47,7 +59,9 @@ def main(participant_label, bids_dir, output_dir, analysis_level="participant"):
47
59
for subject_inputs in inputs :
48
60
run .run_dmriprep_pe (** subject_inputs ,
49
61
working_dir = os .path .join (output_dir , 'scratch' ),
50
- out_dir = output_dir )
62
+ out_dir = output_dir ,
63
+ eddy_niter = eddy_niter ,
64
+ slice_outlier_threshold = slice_outlier_threshold )
51
65
52
66
return 0
53
67
0 commit comments