help > Using fMRIPrep confounds in CONN
Showing 1-2 of 2 posts
Display:
Results per page:
Jun 6, 2025  07:06 AM | Clara wakonigg
Using fMRIPrep confounds in CONN

Hi Alfonso,


I’m working with fMRIPrep-preprocessed data and using the CONN GUI to import the data for denoising. After importing using the import fMRIPrep dataset and labeling the structural and functional scans as secondary datasets under the "Preprocessing" step, I proceed to the "Denoising" step and attempt to include the confound regressors from the desc-confounds_timeseries.tsv files generated by fMRIPrep.


However, I encounter an error when CONN tries to process the confounds. From what I’ve read, this may be due to some regressors containing NaN values in the first row. Is there a known solution for this? If not, would replacing the initial NaNs with zeros be an acceptable workaround?


Additionally, I noticed that when importing fMRIPrep data, CONN seems to recompute white matter (WM), CSF, realignment, and scrubbing confounds. Could you clarify whether CONN's WM and CSF confounds correspond to signal averages from those compartments, or if they correspong to the compcor of WM and CSF?


Thanks in advance for your help, and for all the work you’ve put into maintaining CONN!


Best,
Clara

Jun 10, 2025  11:06 AM | Alfonso Nieto-Castanon - Boston University
RE: Using fMRIPrep confounds in CONN

Hi Clara,


That's a good point, I don't think this had been addressed already so I have updated (to the development version in github/alfnie/conn) an automated fix for this issue (the fix simply replaces those NaN values with 0's when importing covariate data from fMRIPrep). Alternatively, of course, you may manually replace those NaN values with 0's manually/directly in your project if you prefer to avoid having to re-import the data/covariates. Let me know if you run into any issues


And regarding the WM/CSF ROIs, yes those are re-computed from the corresponding WM/CSF masks and they will contain the average plus a number of principal components characterizing the BOLD signal within each of those areas (i.e. aCompCor components).


Best


Alfonso


Originally posted by Clara wakonigg:



Hi Alfonso,


I’m working with fMRIPrep-preprocessed data and using the CONN GUI to import the data for denoising. After importing using the import fMRIPrep dataset and labeling the structural and functional scans as secondary datasets under the "Preprocessing" step, I proceed to the "Denoising" step and attempt to include the confound regressors from the desc-confounds_timeseries.tsv files generated by fMRIPrep.


However, I encounter an error when CONN tries to process the confounds. From what I’ve read, this may be due to some regressors containing NaN values in the first row. Is there a known solution for this? If not, would replacing the initial NaNs with zeros be an acceptable workaround?


Additionally, I noticed that when importing fMRIPrep data, CONN seems to recompute white matter (WM), CSF, realignment, and scrubbing confounds. Could you clarify whether CONN's WM and CSF confounds correspond to signal averages from those compartments, or if they correspong to the compcor of WM and CSF?


Thanks in advance for your help, and for all the work you’ve put into maintaining CONN!


Best,
Clara