FSL featquery with fmriprep'd data


I have used fmriprep 1.5.4 to preprocess my data and then I used FSL FEAT to run my analysis.

I was hoping to use FSL’s featquery to pull ROI info from my data. For whatever reason I have failed to successfully do this. featquery says that the necessary warp files do not exist and therefore cannot use the ROI masks I am attempting to feed in. I have tried using masks already in MNI 2mm standard space (ones from FSL, I also resampled my data to 2mm isotropic using the res:2 tag in fmriprep).

Any advice on how to proceed would be greatly appreciated. I am hoping to obtain the % signal change in various motor areas. Is there a way to get featquery to work? If not then are there other tools I can use that are known to work with fmriprep’d data?

Thank you

Hi Justin,

Are you using the fmriprep Feat workaround suggested by Jeanette?

I am assuming you are using the fmriprep output already in MNI space. If so, you should run the FEAT registration step but then overwrite this. Featquery should be working. I suspect perhaps you ‘turned off’ registration steps in FEAT and now dont have the appropriate files?


Hi, thanks for your reply.

I did have the registration turned on for the first level analysis. I also did Mumfords registration work around for group level analyses which works great.

I just cant seem to use fearquery on the first level analyses. I tried it before and after group level and it didnt work either way. I also went back and reran the first level analysis with linear and nonlinear registration since nonlinear should make the needed warp files. For some reason however it didnt make them and I suspect it has to do with the data already being in Myspace (I am using the fsl equivalent mni space in fmriprep… MNI152NLin6Asym).

Any thoughts?

Hi Justin,

Are you able to paste the error? Does the file indicated by the error exist in the directory?
Are you trying to feed in group-level or subject-level .feat folder?

Hi again,

I am running this on the subject level .feat directories, not the group level directory.

The error is just this “Error - transform to take mask into space of example_func does not exist in the FEAT directory - run FEAT registration”

When I attempt to rerun the first level feat analysis with non-linear registration turned out (which requires a T1w and a standard space image) it seems to ignore the T1w image I feed into it. I have tried feeding in ‘sub-004_desc-preproc_T1w_brain.nii.gz’ which is just the sub-004_desc-preproc_T1w.nii.gz’ file with a brain mask applied to remove the skull, and I have tried feeding in ‘sub-004_space-MNI152NLin6Asym_desc-preproc_T1w_brain.nii.gz’ which once again is just ‘sub-004_space-MNI152NLin6Asym_desc-preproc_T1w.nii.gz’ with a brain mask applied. These files are found in the sub-*/anat/ directory.

Perplexing, just to be sure, have you confirmed that, indeed, the folder and relevant files exist in this folder for all individuals?


Okay so I had written a bash script to do all of this and turns out I had an error in the script.

However, now I have a new issue. I can run featquery on first level/subject level .feat directories without issue now because I ran non-linear registration and all of the warp files were provided. However, after I run mumfords registration work around featquery no longer works on the first level .feat directories. It obviously deletes the warp or .mat files that are necessary for featquery. So my question is this…

Is it valid to run featquery on the fmriprep’d data before doing the work around? Technically this data has now been registered twice and it is depending on those registration warps to run featquery. Thoughts?

Hi Justin,

You should be able to run featquery after replacing the files using the ‘mumford’ solution.

Make sure you are following the work-around correctly. Ie, you need to delete specific files and then replace with other files. This is so that you do not run registration a second time–all the images are already in standard space.

This is super odd because I checked everything and have followed the guidelines by mumford exactly.

I keep getting this “Error - transform to take mask into space of example_func does not exist in the FEAT directory - run FEAT registration” after doing the work around.

Does this possibly have to do with the mask I am specifically using? Do I need to do something to the mask first to make the trasform to example_func? If so how do I go about doing this?

Thank you

Hi again,

It seems that featquery fails because the highres2example_func.mat file does not exist after deleting reg/*.mat in the registration workaround. The registration work around only creates the example_func2standard.mat

How do I address this issue? I am not sure how to create the highres2example_func.mat

Thank you in advance

Hi Justin,

Try running updatefeatreg script after Mumford fmriprep workaround. This will generate the required files.


Thanks, I’ll be trying that today!

That was the idea i had. Good to hear it should work!

Thank you

Hi all,

I am running into similar issues. I’ve tried to run updatefeatreg but it does not output the highres2example_func.mat. Do I need to specify that in the command or will I end up needing to re-run some of my level 1’s?

Thanks for your time!

I’m facing similar issues. Could anyone sort out this issue?

Hi everyone! This issue has yet to be solved so I’m pushing it up and adding a question since I do not understand how using updatedfeatreg solves this issue:

If the ROI I’m trying to extract data from is in the fMRIprep MNI space, and already in functional resolution as the example func inteded to be extracted from, as is the processed functional data, what is the meaning of the fact that Featquery uses highres2example_func.mat? As this highres2example_func.mat file is not aligned with the fmriprep registration, it need to be overwrriten (as indicated by Mumford workaround and mentioned in the updatedfeatreg:

“* According to which part of the registration chain you want to amend, overwrite example_func2highres.mat, highres2standard.mat, example_func2highres_warp.nii.gz, highres2standard_warp.nii.gz, example_func2initial_highres.mat or initial_highres2highres.mat in the reg directory inside the FEAT output directory (note that some of these will probably not exist, depending on the options you have chosen).”

But no one here or on another post on this issue stated with which file should one overwrite it? is it the identity matrix as in Mumford workaround?

Alternatively, as no registration/warping is needed whatsoever, is there another way to use Featquery in order to extract the data, by skipping this registration stage?


Looking into updatefeatreg and Featquery use of the .mat files, I think updatefeatreg does solve the issue - it just inverses the example_func2standard.mat that was overwritten by an identity matrix in Mumford’s workaround (which means it remains exactly the same) and saves it as standard2example_func.mat for Featquery to move the ROI. By using the identity matrix, the ROI doesn’t move at all, as intended.

I did notice very slight differences between the original ROI and the one Featquery used for extracting the data, but I believe this relates to additional manipulations unrelated to the ROI registration.