1st/2nd Level Modeling post fMRIPrep

Hello all,

I have successfully run fMRIPrep (1.3.2) on some data and need to begin modeling. I have never modeled fMRI data so I am a little lost on what the best way to proceed is. Is it recomended to use fitlins or to follow the tutorial Chris made (https://github.com/poldrack/fmri-analysis-vm/blob/master/analysis/postFMRIPREPmodelling/First%20and%20Second%20Level%20Modeling%20(SPM).ipynb)? I started following this tutorial with my data, but it was made 2 years ago so it seems some of the exact lines/variables don’t match. Any suggestions would be appreciated.

I have also seen some tutorials on custom pipelines using Nipype, but they all use custom preprocessing not fMRIPrep outputs.

Thanks,
Alen

It depends what your goal is right now. There are a number of things that most people would want for results they’re interested in publishing that are not yet implemented. For example, thresholding and cluster correction are completely missing, first-level variance estimates are not yet accounted for in second level modeling, and subject-level variables cannot currently be used as confounds.

If you’re looking to explore your data, want to try to write a BIDS model, and potentially want to engage with me to develop the features you need, then FitLins can be useful to you, and you’re likely to learn a fair bit.

But if you want to do standard modeling, it’s probably best to use Nipype, or, if you can find a usable tutorial, one of the standard packages.

I think for now our lab just needs to start with the basic/standard modeling. I will try something in Nipype for now based on the tutorials I’ve seen. Thank you.

As another potential reference, we’ve also put together an example Nipype workflow for post-fMRIPrep first- and second-level models in FSL here. Let us know if there’s anything else that we can help clarify!

3 Likes

Hello again,

I have a working script based off of this notebook: https://github.com/poldrack/fmri-analysis-vm/blob/master/analysis/postFMRIPREPmodelling/First%20and%20Second%20Level%20Modeling%20(FSL).ipynb

However, I just had a question about applying it to my data. I have a task that has two runs. At what point do I combine the two runs in FSL? How does that work? Everything from the notebook above grabs 1 run (I’m assuming the task was one run), and there is nothing about dealing with multiple runs.

Thanks.