open-discussion > RE: Including CompCor (CONN toolbox) into SPM batch
Feb 13, 2019  03:02 AM | Lars Kasper - Translational Neuromodeling Unit, IBT, University of Zurich and ETH Zurich
RE: Including CompCor (CONN toolbox) into SPM batch
Dear Sara,

concerning your first question how to setup the SPM batch: You can just start with the default batch that comes with the toolbox


examples/tapas_physio_example_philips_ecg3t_spm_job.m


and apply the following modifications:

  • Setting the log file names to empty values (press done w/o selecting a file in the batch editor)
  • Selecting model.noise_rois = Yes, and RETROICOR = No. In the noise_rois section, specify the fmri time series file (I would use the unsmoothed but normalized, preprocessed nifti file here) as well as the noise ROIs image files (the normalized tissue probability maps of white matter and csf, wc2* and wc3*, from unified segmentation would be a good choice). ROI thresholding and cropping as well as PCA number of components/explained share of variance can be set to your liking, see the attached examples.
  • You will still have to specify the sqpar values (number of slices, volumes, TR) to create the regressors in a meaningful way.
  • Everything else (scan_timing, preproc) can stay at its default values, because the modules are ignored, if no log_files are specified.


I have attached a batch that includes the PhysIO module, but makes a "refined" choice of the noise_rois parameters (basically adjusting their erosion/thresholding and number of components to robust values after visual inspection of the results when running with default values for my dataset).

Note that the output of the PhysIO module will only be the nuisance regressors for the GLM (as text file). In order to remove their variance from the nifti file, you will have to specify the GLM with those and then choose to "write residuals" in the model estimation module (or spm_write_residuals in the command line). There is one file (Res*) for each volume, and the new, preprocessed time series with noise filtered out is the combination of those. You can add a batch utility to create a single 4D file from these residual images as well. The attached batch file includes GLM, estimation, residuals and 4D file combination after the PhysIO module as well (*noise_regression.m). The only deviation from a classical GLM specification here is that the model only include multiple regressors, but no conditions, and that I set the masking threshold to 0.05 (instead of 0.8). This is very liberal, but avoids holes in the output nifti file which could otherwise occur in low intensity regions still of interest to your resting state analysis.

Concerning your question about the preprocessing pipeline, these seem to be the right modules in the right order (one could debate whether slice timing or realignment goes first, but often this is an empirical question). I would only advise to do the noise regression on the unsmoothed time series, because otherwise you might smooth gray matter voxels (and their temporal signature) partly into your noise ROI, and consequently regress them out of your data. You can smooth the data after denoising by adding this module at the end of this third batch.

I hope that helps!

All the best,
Lars

Threaded View

TitleAuthorDate
Sara Calzolari Jan 30, 2019
Lars Kasper Jan 31, 2019
Sara Calzolari Feb 11, 2019
RE: Including CompCor (CONN toolbox) into SPM batch
Lars Kasper Feb 13, 2019
Ralf Veit Feb 28, 2019
Lars Kasper Feb 28, 2019
Ralf Veit Mar 1, 2019
Lars Kasper Mar 1, 2019
Ralf Veit Mar 1, 2019
Lars Kasper Mar 1, 2019
Ralf Veit Mar 4, 2019
Ralf Veit Mar 5, 2019
Lars Kasper Mar 5, 2019
Ralf Veit Mar 5, 2019
Lars Kasper Mar 9, 2019
Ralf Veit Mar 11, 2019