Skip to content

Commit 2e9ebd1

Browse files
committed
fix: updated some targets
1 parent 67bf1c9 commit 2e9ebd1

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

examples/rsfmri_conn_ants_fs_preprocessing.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ def combine_hemi(left, right):
320320
2000000 + np.arange(0, rh_data.shape[0])[:, None]))
321321
all_data = np.hstack((indices, np.vstack((lh_data.squeeze(),
322322
rh_data.squeeze()))))
323-
filename = 'combined_surf.txt'
323+
filename = left.split('.')[1] + '_combined.txt'
324324
np.savetxt(filename, all_data,
325325
fmt=','.join(['%d'] + ['%.10f'] * (all_data.shape[1] - 1)))
326326
return os.path.abspath(filename)
@@ -853,7 +853,7 @@ def get_names(files, suffix):
853853
datasink = Node(interface=DataSink(), name="datasink")
854854
datasink.inputs.base_directory = sink_directory
855855
datasink.inputs.container = subject_id
856-
#datasink.inputs.substitutions = [('_target_subject_', '')]
856+
datasink.inputs.substitutions = [('_target_subject_', '')]
857857
#datasink.inputs.regexp_substitutions = (r'(/_.*(\d+/))', r'/run\2')
858858
wf.connect(realign, 'realignment_parameters', datasink, 'resting.qa.motion')
859859
wf.connect(art, 'norm_files', datasink, 'resting.qa.art.@norm')
@@ -884,7 +884,7 @@ def get_names(files, suffix):
884884
datasink2 = Node(interface=DataSink(), name="datasink2")
885885
datasink2.inputs.base_directory = sink_directory
886886
datasink2.inputs.container = subject_id
887-
#datasink2.inputs.substitutions = [('_target_subject_', '')]
887+
datasink2.inputs.substitutions = [('_target_subject_', '')]
888888
#datasink2.inputs.regexp_substitutions = (r'(/_.*(\d+/))', r'/run\2')
889889
wf.connect(combiner, 'out_file',
890890
datasink2, 'resting.parcellations.grayo.@surface')
@@ -898,12 +898,14 @@ def get_names(files, suffix):
898898
fsdir = '/software/temp/brainconnect/fsdata'
899899
files = sorted(glob(os.path.abspath('%s/E?/func/rest.nii' % subj_id)))
900900
anat_file = glob(os.path.abspath('%s/EO/anat/anat.nii' % subj_id))[0]
901-
target_file = fsl.Info.standard_image('MNI152_T1_2mm_brain.nii.gz')
901+
target_file = \
902+
os.path.abspath(('OASIS-TRT-20_jointfusion_DKT31_CMA_labels_in_MNI152_'
903+
'v2.nii.gz'))
902904
wf = create_workflow(files, anat_file, target_file, subj_id,
903905
2.0, 33, vol_fwhm=6.0, surf_fwhm=15.0,
904906
lowpass_freq=0.1, highpass_freq=0.01,
905907
subjects_dir=fsdir,
906-
target_subject=['fsaverage4'],
908+
target_subject=['fsaverage5'],
907909
sink_directory=os.getcwd(),
908910
name='resting_' + subj_id)
909911
wf.base_dir = os.getcwd()

0 commit comments

Comments
 (0)