help > Error using CONN from batch to perform compcor regression after fMRI preprocessing with SPM
Showing 1-2 of 2 posts
Display:
Results per page:
Feb 23, 2024  02:02 PM | Sjir Schielen - Eindhoven University of Techonology
Error using CONN from batch to perform compcor regression after fMRI preprocessing with SPM

Hello,


To preprocess some fMRI data, one of the steps I would like to perform is compcor. I am trying to use the CONN toolbox from batch as I am working with ABIDE which contains many participants. Specifying all the file locations in the GUI is inconvenient for larger datasets. I already performed several preprocessing steps (realignment, slice timing correction, coregistration, segmentation, and spatial normalization) outside of CONN (using SPM and FSL) and now I want to use CONN to perform compcor regression. 


I created a struct called batch, where I fill in the fields Setup (isnew, subjects, RT, masks.{grey, white, CSF}.files, functionals, structural) and Denoising (filter, detrending, despiking, confounds). I specified the locations of the functional and structural files and the segmentation maps of grey matter, white matter, and CSF. All of these files are niftis.  I then run conn_batch(batch.Setup) and conn_batch(batch) of which the latter provides the message 'Not ready to process step conn_process_5', which is raised in the script conn_process because the file 'ROI_Subject001_Session001.mat' does not exist. I thought this file had to be created in conn_batch(batch.Setup) from the files I specified.  


What could I do to resolve this problem? Should I try to make this file myself and then specify that file's location? Or is there something wrong in the setup which causes this file to not be created? Any help will be much appreciated. 


Thank you for your time.


Kind regards,


Sjir

Mar 1, 2024  12:03 AM | Alfonso Nieto-Castanon - Boston University
RE: Error using CONN from batch to perform compcor regression after fMRI preprocessing with SPM

Hi,


I would probably suggest also running ART to get a list of outlier scans, if you don't have that already, and entering the resulting files in addition to the realignment files, to have aCompCor also include those common regressors. Regarding your batch script, my guess would be that perhaps you are missing a Setup.done=true option in your batch to have CONN create those ROI-level files before denoising? (if that is not the case please share your script to see if that helps clarify what the issue may be)


Also, if you are planning to use CONN just for denoising and you don't need to create a CONN project I would probably suggest considering using conn_module instead of conn_batch functionality (see the example scripts at the bottom of the https://web.conn-toolbox.org/fmri-method... and https://web.conn-toolbox.org/fmri-method... pages)


Best


Alfonso


Originally posted by Sjir Schielen:



Hello,


To preprocess some fMRI data, one of the steps I would like to perform is compcor. I am trying to use the CONN toolbox from batch as I am working with ABIDE which contains many participants. Specifying all the file locations in the GUI is inconvenient for larger datasets. I already performed several preprocessing steps (realignment, slice timing correction, coregistration, segmentation, and spatial normalization) outside of CONN (using SPM and FSL) and now I want to use CONN to perform compcor regression. 


I created a struct called batch, where I fill in the fields Setup (isnew, subjects, RT, masks.{grey, white, CSF}.files, functionals, structural) and Denoising (filter, detrending, despiking, confounds). I specified the locations of the functional and structural files and the segmentation maps of grey matter, white matter, and CSF. All of these files are niftis.  I then run conn_batch(batch.Setup) and conn_batch(batch) of which the latter provides the message 'Not ready to process step conn_process_5', which is raised in the script conn_process because the file 'ROI_Subject001_Session001.mat' does not exist. I thought this file had to be created in conn_batch(batch.Setup) from the files I specified.  


What could I do to resolve this problem? Should I try to make this file myself and then specify that file's location? Or is there something wrong in the setup which causes this file to not be created? Any help will be much appreciated. 


Thank you for your time.


Kind regards,


Sjir