@@ -218,7 +218,7 @@ def create_reg_workflow(name='registration'):
218
218
reg .inputs .args = '--float'
219
219
reg .inputs .output_warped_image = 'output_warped_image.nii.gz'
220
220
reg .inputs .num_threads = 4
221
- reg .plugin_args = {'qsub_args' : '-pe orte 4' ,
221
+ reg .plugin_args = {'qsub_args' : '-pe orte 4' ,
222
222
'sbatch_args' : '--mem=6G -c 4' }
223
223
register .connect (stripper , 'out_file' , reg , 'moving_image' )
224
224
register .connect (inputnode ,'target_image_brain' , reg ,'fixed_image' )
@@ -428,7 +428,7 @@ def create_fs_reg_workflow(name='registration'):
428
428
reg .inputs .args = '--float'
429
429
reg .inputs .output_warped_image = 'output_warped_image.nii.gz'
430
430
reg .inputs .num_threads = 4
431
- reg .plugin_args = {'qsub_args' : '-pe orte 4' ,
431
+ reg .plugin_args = {'qsub_args' : '-pe orte 4' ,
432
432
'sbatch_args' : '--mem=6G -c 4' }
433
433
register .connect (stripper , 'out_file' , reg , 'moving_image' )
434
434
register .connect (inputnode ,'target_image' , reg ,'fixed_image' )
@@ -562,17 +562,17 @@ def get_subjectinfo(subject_id, base_dir, task_id, model_id):
562
562
'task%03d_run*' % (idx + 1 ))))
563
563
runs = [int (val [- 3 :]) for val in files ]
564
564
run_ids .insert (idx , runs )
565
- json_info = os .path .join (base_dir , subject_id , 'BOLD' ,
566
- 'task%03d_run%03d' % (task_id , run_ids [task_id - 1 ][0 ]),
565
+ json_info = os .path .join (base_dir , subject_id , 'BOLD' ,
566
+ 'task%03d_run%03d' % (task_id , run_ids [task_id - 1 ][0 ]),
567
567
'bold_scaninfo.json' )
568
568
if os .path .exists (json_info ):
569
569
import json
570
570
with open (json_info , 'rt' ) as fp :
571
571
data = json .load (fp )
572
572
TR = data ['global' ]['const' ]['RepetitionTime' ]/ 1000.
573
573
else :
574
- task_scan_key = os .path .join (base_dir , subject_id , 'BOLD' ,
575
- 'task%03d_run%03d' % (task_id , run_ids [task_id - 1 ][0 ]),
574
+ task_scan_key = os .path .join (base_dir , subject_id , 'BOLD' ,
575
+ 'task%03d_run%03d' % (task_id , run_ids [task_id - 1 ][0 ]),
576
576
'scan_key.txt' )
577
577
if os .path .exists (task_scan_key ):
578
578
TR = np .genfromtxt (task_scan_key )[1 ]
@@ -667,7 +667,7 @@ def analyze_openfmri_dataset(data_dir, subject=None, model_id=None,
667
667
name = 'datasource' )
668
668
datasource .inputs .base_directory = data_dir
669
669
datasource .inputs .template = '*'
670
-
670
+
671
671
if has_contrast :
672
672
datasource .inputs .field_template = {'anat' : '%s/anatomy/T1_001.nii.gz' ,
673
673
'bold' : '%s/BOLD/task%03d_r*/bold.nii.gz' ,
@@ -909,18 +909,18 @@ def split_files(in_files, splits):
909
909
splitfunc , 'in_files' )
910
910
911
911
if subjects_dir :
912
- get_roi_mean = pe .MapNode (fs .SegStats (default_color_table = True ),
912
+ get_roi_mean = pe .MapNode (fs .SegStats (default_color_table = True ),
913
913
iterfield = ['in_file' ], name = 'get_aparc_means' )
914
914
get_roi_mean .inputs .avgwf_txt_file = True
915
915
wf .connect (fixed_fx .get_node ('outputspec' ), 'copes' , get_roi_mean , 'in_file' )
916
916
wf .connect (registration , 'outputspec.aparc' , get_roi_mean , 'segmentation_file' )
917
-
918
- get_roi_tsnr = pe .MapNode (fs .SegStats (default_color_table = True ),
917
+
918
+ get_roi_tsnr = pe .MapNode (fs .SegStats (default_color_table = True ),
919
919
iterfield = ['in_file' ], name = 'get_aparc_tsnr' )
920
920
get_roi_tsnr .inputs .avgwf_txt_file = True
921
921
wf .connect (tsnr , 'tsnr_file' , get_roi_tsnr , 'in_file' )
922
922
wf .connect (registration , 'outputspec.aparc' , get_roi_tsnr , 'segmentation_file' )
923
-
923
+
924
924
"""
925
925
Connect to a datasink
926
926
"""
0 commit comments