Fmriprep:how to match functional datasets with subject’s individual space (T1)?

Hi, dear.
I want to analyze the data at the individual level, and I firstly ran fmriprep to do preprocessing:

fmriprep-docker /media/work21/BIDS/Nifti /media/work21/BIDS_T1 participant --participant-label 1 --output-spaces T1w --skull-strip-t1w force --fs-license-file /home/Downloads/freesurfer/license.txt --fs-no-reconall --n_cpus 32

However, after preprocessing, I got anat in original format (sub1_T1+orig.HEAD) while EPIs in tlrc format (sub-1_task-checker_acq-TR156_space-T1w_desc-preproc_bold+tlrc.HEAD), as a result, after GLM, I cannot use T1 as underly when applying the stats in tlrc format as overlay. Is there a command that might work for me? Or do I need to modify the preprocessed code?
Thanks for the help!

1 Like

Same problem here. Hoping to get help :<

Hi @Yan_Huang ,

Could you be more specific about your problem?

I’d like to use the sub-2_desc-preproc_T1w.nii.gz as underlay, while the sub-2_task-fh_run-01_space-T1w_desc-preproc_bold.nii.gz as overlay.

However, after selecting the overlay, the underlay automatically switches to the sub-2_space-MNI152NLin2009cAsym_desc-preproc_T1w.nii.gz every time.

Also, the T1w output is not skull-stipped as written in my preprocessing code.

fmriprep-docker '/media/menglab/work2_4T/hy/face_imagery' 
'/media/menglab/work2_4T/hy/face_imagery/derivatives/fMRIprep' 
-w '/media/menglab/work2_4T/hy/fMRIprep_working_directory' 
--fs-license-file '/home/menglab/freesurfer/license.txt' 
--participant-label 2 3 4 --ignore slicetiming 
--output-spaces anat MNI152NLin2009cAsym --skull-strip-t1w force 

I am not an AFNI user, so I can’t help you with the AFNI display.

--skull-strip is just a processing step. This would not change the output. Which version of fmriprep version are you using?
From your screeshot I see that the T1win the MNI space is skull stripped. You mean that the T1w in the subject’ space is not skull stripped? I think the brain mask is also saved, you could use that to mask your T1w image and get a skull stripped image.

I’m using 23.2.0. I’l try your advice. Thank you, jsein :slight_smile:

1 Like

I believe that this issue has been addressed in more detail in a separate thread:

Basically, the different sform_code and qform_code values in the fmriprep output were leading some datasets to be interpreted as “original” space and others as “template” space, even though they should all have been in the subject space. By setting an environment variable to choose how to interpret the ambiguous sform_code=qform_code=2 values that were being output, things worked better.

–pt

2 Likes