I recently started using fmriprep for preprocessing instead of SPM. I next run all my statistical models in SPM. For completeness I first ran everything in SPM and next I reran my FFX on data preprocessed in fmriprep. In SPM I smooth the data before running my GLMs. All stats are done in MNI space so I use the 2009MNI_preproc_bold images from fmriprep.
While my activation maps look very similar in both conditions, it seems like the maps based on fmriprep are shifted and show more activation outside the brain. I just posted on example below - but there are plenty in my data. These are data from a single subject (FFX level).
Left is the Map when all processing takes place in SPM - on the right is the map when preprocessing took place in fmriprep:
Does anyone have suggestions or reasons why this might be the case? Note that in both images the activation map is overlayed on the normalized T1 (2009MNI_T1 as outputted in fmriprep).
preprocessing in fmriprep → 2) smoothing → 3) GLM
2 and 3 being the same (they are, right?) then the differences we see should be due to the preprocessing.
No quick answer comes to me and trying to figure out why would try to reproduce closely the fmriprep preprocessing pipeline using SPM which I think is not possible anyway because fmriprep does things that SPM cannot do.
if you smooth your data, you may often see activation outside of the brain, so you may want to consider running your GLM only within the mask brain (either that one that you computed or by using the one generated by fmriprep or the default from SPM).
mind you I have seen activations outside of the brain countless times on SPM preprocessed data
thanks for your reply! It is not my intention to mimic the preprocessing done in fmriprep in SPM. I have been working in SPM for years and now I want to benefit from the fmriprep pipeline (and stay up to date with the field). However I do think it important to check how things change when you use a new pipeline, and I am concerned that something is off when using the fMRIprep preprocessed data in SPM. I am currently looking whether maybe the slicetiming correction is the reason - maybe I am not using the correct parameters for my FFX in SPM. I am running my subject without slicetiming correction and will have a look at the results.
Thanks for this very interesting discussion !
Just a few thoughts :
Yes, slice-timing can induce some small changes in the pre-processed data (but, in my humble opinion, relatively few).
Regarding activation outside the brain, you could look specifically at the masks used with the two GLM analyses.
Which one did you use with the two types of pre-processed data ?
For our part, we’ve noticed that the BOLD masks (one for each run) proposed by fmriprep are a bit large: do you use them ? the intersection or union of them ?
It is also possible to use the anatomical mask, which is much closer to the grey matter.
But another thing: in your images, it seems that even the activation inside the brain is quite different with the two pipelines. For example, the big blob on the left side (central sulcus ?) only appears with the data processed by SPM: that’s strange, isn’t it?
I checked the results without STC and indeed, nothing changes so this is not it
with respect masking, I don’t typically mask when running my analyses because I like to see the full picuture but good to know that the masks are bigger in case I want to mask in the future.
Most importantly, I checked the thresholding as Remi suggested - if I look at a lower threshold in the SPM pipeline maps they look much more similar so indeed, it seems to be a matter of thresholding.
Ok, so then I am not worried anymore! Thanks again for replying!
Actually this may be worth checking: even if you do not pass an explicit mask to SPM it will compute an “implicit” one by selecting voxels that have “enough” signals in them to run the GLM in.
This resulting mask is the mask.nii you find in the folder of your GLM where your SPM.mat is.
Maybe quickly compare the 2 masks to see if one is more “conservative” than the other. It ultimatily does not anwser where the difference is from but it is a good sanity check.
Hi Remi,
I’m currently trying to run the same process as Nina with the only difference that we keep the images in native space during fmriprep and then normalize it to a Dartel template in SPM12. And unfortunately, we also get some activity outside of the brain. We checked the brain masks and it looks like something is wrong. See for example the picture below. Do you happen to have any ideas on what could be causing this?