I am using fMRIprep for preprocessing of my data. I am trying to compare normal and shuffled data (only functional raw-data is shuffled, not anatomical) with each others.
As the anatomical inputdata is same then the brain masks should be identical, but the fMRIprep output for shuffled functional data is highly different from normal data.
Can I somehow preprocess shuffled data in fMRIprep? And if not, which part of the code I should try to add it myself (I use two spaces T1w and MNI152NLin6Asym)
I would be wary of randomly shuffling the functional data. The raw fMRI data shows low frequency drift that reflects hardware-related heating. Likewise, most head motion is modeled as low frequency (with resulting impacts on shim). Finally, the BOLD HRF function has a relatively low frequency that spans multiple volumes, and statistics attempts to model this auto-correlation. For all these reasons, random shuffling will dramatically disrupt the inherent assumptions of an image processing and analysis pipeline.
If your fMRI task used random or suitably staggered onset times, it might be worth simply reversing the temporal order of your volumes to try to preserve the non-task related temporal coherence.
sorry my first question was a bit confusing. I am actually trying to do spatial shuffling to the data not temporal shuffling and this does not change the spatial structure
Perhaps you could explain what this means with an example. Is the spatial shuffling only done after spatial pre-processing, are all timepoints in the volume shuffled the same way? Due to partial volume effects, neighboring voxels are inherently correlated and this spatial structure underlies the choice of Gaussian blurs, TFCE-style statistical thresholds, etc. Perhaps it would help to work out what problem you are trying to solve here.
I am trying to only shuffle the functional image spatially. My goal is to have the same functional brain mask as in non-shuffled version, as the the brain mask should be determined according the anotomical image.
Whether the shuffling is done before or after the pre-processing does not matter to me, but I need it done before the image is changed to MNI-space and I do not want to keep any correlations between neighboring voxels.
When shuffling I only shuffle the places of voxels so the voxels are shuffled same way in time.
I hope this clears a bit what I am trying to do.