Hi @tsalo and @emdupre,
My apologies for tagging you two again, but you seem to be the resident experts regarding combining fmriprep and tedana.
I have processed my data with the latest version of fmriprep 1.4, chosing MNI152NLin6Asym as an output space using --output-spaces.
I have managed to use the script (https://github.com/ME-ICA/tedana-reliability-analysis/blob/master/collect_fmriprep.ipynb) provided by @tsalo to obtain the minimally preprocessed images for use in tedana. However, I am having some difficulty extracting the required files for subsequent warp transformation from native BOLD space to MNI152NLin6Asym.
For example, the script points to the folder in the wf called ‘bold_to_mni_trans_wf’, which does not seem to exist. I wonder if this has changed in subsequent version of fmriprep. I think I may have found the correct files in ‘op.join(task_dir, ‘bold_mni_trans_wf’,‘bold_to_mni_transform/_inputs.pklz’)’, but not entirely sure.
Using these files, I create two files:
I then tried to use the following to files using ApplyTransform to warp my BOLD image in native space to MNI152NLin6Asym (as a sanity check prior to running tedana), but this did not work (ie, the command ran but not image was displayed).
at = ApplyTransforms()
at.inputs.dimension = 3
at.inputs.interpolation = ‘NearestNeighbor’
at.inputs.float = False
at.inputs.transforms = op.join(sub_func_dir,‘sub-002_ses-002_task-faces_from-native_to-reference_mode-image_xfm.txt’)
at.inputs.input_image = op.join(sub_func_dir,‘sub-002_ses-002_task-faces_echo-1_space-native_desc-partialPreproc_bold.nii’)
at.inputs.reference_image = op.join(sub_func_dir,‘sub-002_ses-002_task-faces_space-MNI152NLin6Asym_desc-preproc_bold.nii.gz’)
at.inputs.output_image = ‘/home/fs0/gspitz/scratch/gut_study/data/fmriprep_output/fmriprep_derivative/test.nii.gz’
I was hoping you might have an easy fix to this. I am sure the files are there, but having difficulty locating the correct ones.