@@ -26,7 +26,7 @@ def parse_layout(subject_layout):
26
26
return tuple (subject_layout .values ())
27
27
28
28
29
- def create_single_subject_wf (subject_layout ):
29
+ def create_single_subject_wf (subject_layout , skip_mni2009c_norm = False ):
30
30
"""
31
31
Create a nipype workflow to ingest a single subject.
32
32
@@ -252,7 +252,7 @@ def create_single_subject_wf(subject_layout):
252
252
253
253
# Now get transform to MNI2009cAsym
254
254
MNI_template = subject_layout ["MNI_template" ]
255
- if MNI_template != "MNI152NLin2009cAsym" :
255
+ if MNI_template != "MNI152NLin2009cAsym" and skip_mni2009c_norm == False :
256
256
# Get MNI brain and mask
257
257
MNI2009cAsym_brain_path = str (
258
258
tflow .get ('MNI152NLin2009cAsym' , desc = "brain" , suffix = "T1w" , resolution = 1 , extension = ".nii.gz" )
@@ -333,7 +333,7 @@ def save_xfm_outputs(
333
333
return wf
334
334
335
335
336
- def create_ingress2qsirecon_wf (layouts , name = "ingress2qsirecon_wf" , base_dir = os .getcwd ()):
336
+ def create_ingress2qsirecon_wf (layouts , name = "ingress2qsirecon_wf" , base_dir = os .getcwd (), skip_mni2009c_norm = False ):
337
337
"""
338
338
Creates the overall ingress2qsirecon workflow.
339
339
@@ -361,7 +361,7 @@ def create_ingress2qsirecon_wf(layouts, name="ingress2qsirecon_wf", base_dir=os.
361
361
print (f"Subject(s) to run: { subjects_to_run } " )
362
362
363
363
for subject_layout in layouts :
364
- single_subject_wf = create_single_subject_wf (subject_layout )
364
+ single_subject_wf = create_single_subject_wf (subject_layout , skip_mni2009c_norm = skip_mni2009c_norm )
365
365
wf .add_nodes ([single_subject_wf ])
366
366
367
367
return wf
0 commit comments