help > Importing fMRIPrep-20.0.0 ROI masks
Showing 1-7 of 7 posts
Display:
Results per page:
Mar 28, 2020  01:03 AM | Adam Raikes
Importing fMRIPrep-20.0.0 ROI masks
Hi Alfonso,
I was watching the log files as I was importing a dataset I processed this week. At the point of importing the structural images and ROIs, ROIs 1, 2, and 3 are imported as sub-xxxxx_space-MNI152NLin2009cAsym_desc-preproc_T1w.nii.gz instead of the label-CSF/WM/GM files.

Looking at conn_importbids.m, I think this is because in the 20.x series of fMRIPrep these are named sub-xxxxx_space-MNI152NLin2009cAsym_label-CSF/WM/M_probseg.nii.gz without the "desc-preproc" portion.
Mar 28, 2020  12:03 PM | Alfonso Nieto-Castanon - Boston University
RE: Importing fMRIPrep-20.0.0 ROI masks
Hi Adam,

Thanks a lot for reporting this, could you please try the attached patch and let me know whether that seems to fix this issue? (this patch is for release 19c, to install it simply copy the attached file to your conn distribution folder overwriting the file with the same name there)

Thanks again
Alfonso
Originally posted by Adam Raikes:
Hi Alfonso,
I was watching the log files as I was importing a dataset I processed this week. At the point of importing the structural images and ROIs, ROIs 1, 2, and 3 are imported as sub-xxxxx_space-MNI152NLin2009cAsym_desc-preproc_T1w.nii.gz instead of the label-CSF/WM/GM files.

Looking at conn_importbids.m, I think this is because in the 20.x series of fMRIPrep these are named sub-xxxxx_space-MNI152NLin2009cAsym_label-CSF/WM/M_probseg.nii.gz without the "desc-preproc" portion.
Attachment: conn_importbids.m
Mar 30, 2020  05:03 PM | Adam Raikes
RE: Importing fMRIPrep-20.0.0 ROI masks
Hi Alfonso,
That patch worked well.

One further question. For the aCompCor decompositions from fMRIPrep, how is CONN importing the regressors? I ask because I know they changed the setup recently for the confounds to where all aCompCor regressors are "a_comp_cor_Xxx" and the classification (WM/CSF/combined) is written into a JSON file. Before I go through denoising, I want to make sure that it's pulling the right confounds.
Apr 1, 2020  09:04 PM | Alfonso Nieto-Castanon - Boston University
RE: Importing fMRIPrep-20.0.0 ROI masks
Hi Adam,

Mainly for consistency with other analyses in CONN, when importing data from fMRIPrep CONN will use the white/CSF segmentation masks computed in fMRIPrep and it will re-compute the aCompCor signals from these areas (instead of using the fMRIPrep a_comp_cor parameters). Those re-computed aCompCor signals will be the ones used by default during CONN's denoising step (corresponding with the 'White' and 'CSF' elements in the 'Confounds' list in the Denoising tab). Those aCompCor parametes will be slightly different than the ones estimated by fMRIPrep since both packages use slightly different definitions (CONN will threhsold and erode the white&csf masks, and compute a PCA decomposition after orthogonalization with other other known temporal effects, such as constant and linear session effects, motion parameters, task parameters if applicable, and scrubbing / outlier scans)

Just for reference, f you would prefer to use fMRIPrep a_comp_cor timeseries during denoising instead of CONN's estimated timeseries, those will still be available/imported to your project as a separate first-level covariate named QC_a_comp_cor (so simply remove the 'White' and 'CSF' elements from the Confounds list, and enter your desired aCompCor term instead)

Hope this helps
Alfonso
Originally posted by Adam Raikes:
Hi Alfonso,
That patch worked well.

One further question. For the aCompCor decompositions from fMRIPrep, how is CONN importing the regressors? I ask because I know they changed the setup recently for the confounds to where all aCompCor regressors are "a_comp_cor_Xxx" and the classification (WM/CSF/combined) is written into a JSON file. Before I go through denoising, I want to make sure that it's pulling the right confounds.
Apr 3, 2020  10:04 PM | Adam Raikes
RE: Importing fMRIPrep-20.0.0 ROI masks
That's great. I'm glad that it is recomputing the aCompCor values. That makes it a lot easier for consistency.

Thanks
Apr 9, 2020  06:04 PM | Adam Raikes
RE: Importing fMRIPrep-20.0.0 ROI masks
Hi Alfonso,

One last question for the time being (I hope). I am planning to use the default CONN ROI atlas, at least for the time being. I know that in the "regular" CONN processing pipeline, functional images are resampled to 2mm MNI space (91 x 109 x 91). The MNI152NLin2009cAsym space from fMRIPrep is 97 x 115 x 97. Do I need to be outputting fMRIPrep in MNI152NLin6Asym (91 x 109 x 91) for importing to CONN if the only preprocessing step is smoothing?

Also, if I have both spaces, how will CONN choose which to use?

Originally posted by Alfonso Nieto-Castanon:
Hi Adam,

Mainly for consistency with other analyses in CONN, when importing data from fMRIPrep CONN will use the white/CSF segmentation masks computed in fMRIPrep and it will re-compute the aCompCor signals from these areas (instead of using the fMRIPrep a_comp_cor parameters). Those re-computed aCompCor signals will be the ones used by default during CONN's denoising step (corresponding with the 'White' and 'CSF' elements in the 'Confounds' list in the Denoising tab). Those aCompCor parametes will be slightly different than the ones estimated by fMRIPrep since both packages use slightly different definitions (CONN will threhsold and erode the white&csf masks, and compute a PCA decomposition after orthogonalization with other other known temporal effects, such as constant and linear session effects, motion parameters, task parameters if applicable, and scrubbing / outlier scans)

Just for reference, f you would prefer to use fMRIPrep a_comp_cor timeseries during denoising instead of CONN's estimated timeseries, those will still be available/imported to your project as a separate first-level covariate named QC_a_comp_cor (so simply remove the 'White' and 'CSF' elements from the Confounds list, and enter your desired aCompCor term instead)

Hope this helps
Alfonso
Originally posted by Adam Raikes:
Hi Alfonso,
That patch worked well.

One further question. For the aCompCor decompositions from fMRIPrep, how is CONN importing the regressors? I ask because I know they changed the setup recently for the confounds to where all aCompCor regressors are "a_comp_cor_Xxx" and the classification (WM/CSF/combined) is written into a JSON file. Before I go through denoising, I want to make sure that it's pulling the right confounds.
Apr 10, 2020  07:04 PM | Alfonso Nieto-Castanon - Boston University
RE: Importing fMRIPrep-20.0.0 ROI masks
Hi Adam,

That's perfectly fine, currently CONN will always import the MNI152NLin2009cAsym data when available (otherwise it will attempt to us the T1w data), and then when appropriate (e.g. when combined with ROIs that use a different resolution and/or bounding box) it will simply resample the data using their relative voxel-to-world mappings, so any MNI-space ROI (no matter its resolution or bounding box) would be appropriate to use together with MNI152NLin2009cAsym-space functional data

Best
Alfonso

Originally posted by Adam Raikes:
Hi Alfonso,

One last question for the time being (I hope). I am planning to use the default CONN ROI atlas, at least for the time being. I know that in the "regular" CONN processing pipeline, functional images are resampled to 2mm MNI space (91 x 109 x 91). The MNI152NLin2009cAsym space from fMRIPrep is 97 x 115 x 97. Do I need to be outputting fMRIPrep in MNI152NLin6Asym (91 x 109 x 91) for importing to CONN if the only preprocessing step is smoothing?

Also, if I have both spaces, how will CONN choose which to use?

Originally posted by Alfonso Nieto-Castanon:
Hi Adam,

Mainly for consistency with other analyses in CONN, when importing data from fMRIPrep CONN will use the white/CSF segmentation masks computed in fMRIPrep and it will re-compute the aCompCor signals from these areas (instead of using the fMRIPrep a_comp_cor parameters). Those re-computed aCompCor signals will be the ones used by default during CONN's denoising step (corresponding with the 'White' and 'CSF' elements in the 'Confounds' list in the Denoising tab). Those aCompCor parametes will be slightly different than the ones estimated by fMRIPrep since both packages use slightly different definitions (CONN will threhsold and erode the white&csf masks, and compute a PCA decomposition after orthogonalization with other other known temporal effects, such as constant and linear session effects, motion parameters, task parameters if applicable, and scrubbing / outlier scans)

Just for reference, f you would prefer to use fMRIPrep a_comp_cor timeseries during denoising instead of CONN's estimated timeseries, those will still be available/imported to your project as a separate first-level covariate named QC_a_comp_cor (so simply remove the 'White' and 'CSF' elements from the Confounds list, and enter your desired aCompCor term instead)

Hope this helps
Alfonso
Originally posted by Adam Raikes:
Hi Alfonso,
That patch worked well.

One further question. For the aCompCor decompositions from fMRIPrep, how is CONN importing the regressors? I ask because I know they changed the setup recently for the confounds to where all aCompCor regressors are "a_comp_cor_Xxx" and the classification (WM/CSF/combined) is written into a JSON file. Before I go through denoising, I want to make sure that it's pulling the right confounds.