Adding additional regressors to SPM modelgen with nipype

spm12
nipype
fmriprep

#1

Hello,

I am using nipype to set up my first level analysis, following the tutorials on https://miykael.github.io/nipype_tutorial/notebooks/example_preprocessing.html and the Nipype Beginner’s guide.

I’ve used fmriprep to preprocess my data and now I would like to add the motion parameters (from fmriprep confounds.tsv ) to the SPM model as well as FD (and maybe other parameters from the fmriprep confounds.tsv) as additional regressors to the SPM model. However, I can’t find a way to add additional regressors in the documentation of nipype.algorithms.modelgen.SpecifySPMModel (http://nipype.readthedocs.io/en/latest/interfaces/generated/nipype.algorithms.modelgen.html)

Do I have to use a generic model, or is there some other way that I might have missed?

Thanks in advance for your help!
Johannes


#2

@jAchtzehn you can define them using the subject_info input and defining a ‘regressors’ section.

Here’s an example notebook (courtesy of @ChrisGorgolewski) that does this very thing (see block [95])


#3

I will try that out, thanks!