Missing aCompCor parameter makes no difference in Nilearn seed-to-voxel output

(I’m working with resting-state data, preprocessed in fmriprep)

In my earlier analyses, I happened to miss the first aCompCor confound (aCompCor00)- the one that accounts for the most variance- when I was making my first subject-level seed-to-voxel maps (using the following example )

Relevant code below:

from nilearn import input_data
seed_masker = input_data.NiftiSpheresMasker
(pcc_coords, radius=6, detrend=True, standardize=True, low_pass=0.1, high_pass=0.01, t_r=3., memory=‘nilearn_cache’, memory_level=1, verbose=0)
seed_time_series = seed_masker.fit_transform(func_filename, confounds=[confound_filename])

brain_masker = input_data.NiftiMasker(smoothing_fwhm=None, mask_strategy = ‘template’, detrend=True, standardize=True, low_pass=0.1, high_pass=0.01, t_r=3., memory=‘nilearn_cache’, memory_level=1, verbose=0)
brain_time_series = brain_masker.fit_transform(func_filename, confounds=[confound_filename])

Twelve confounds for my earlier analyses: FD, aCompCor01-05, trans-x, trans-y, trans-z, rot-x, rot-y, rot-z.

After adding the aCompCor00 parameter back in, I now have thirteen confounds, but the resulting single-subject seed-to-voxel maps are completely identical- down to byte size. (I’ve checked the voxels too, and the voxel connectivity values appear identical)

I thought they would not be identical, given aCompCor00 should be the most important aCompCor parameter. Is this an expected result?

Thanks,
Edward

I am nowhere near an expert, but in my functional connectivity analysis I have noticed that sometime adding/removing certain confounds (e.g. csf) using nilearn.clean_signal() makes little difference. However, identical results do sound a bit odd. A couple of things to try maybe

  1. Check the correlation between the pcc seed and the aCompCor00. I would expect this would be very low if this confound makes no difference to the analysis.
  2. Compute functional connectivity to the aCompCor00 confound. Again, I would expect this to be low if this confound makes no difference
  3. Check the correlation between the confounds. If aCompCor00 is correlated with the other confounds then adding it may not make a difference.

It’s not exhaustive, but maybe a good place to start. Hope this helps

1 Like

Thanks for the reply. 1. and 2. will take some time for me to figure out the code.

I’ve tried (3.) correlating the confounds with each other, and the correlations between aCompCor00 and the others are quite weak (ranging from -0.2 to 0.1).

Something just clicked for me- aCompCor finds the anatomical components not expected to be responsible for the fMRI signal (e.g., WM, CSF). In my code, I use mask_strategy = ‘template’, which resamples the MNI gray matter mask to the field of view of my subjects’ data. If this mask works properly, then aCompCor (even aCompCor00) shouldn’t have an effect because functional connectivity is only computed between the PCC seed and other gray matter voxels. Thoughts?

A simpler explanation: I didn’t clear nilearn_cache before running the new region analyses- perhaps it was using the old confounds, which explains why the new maps took a very short time to make. Will test this now.

Edit: this did not work. Still perplexed :open_mouth:

aCompCor finds the anatomical components not expected to be responsible for the fMRI signal (e.g., WM, CSF). In my code, I use mask_strategy = ‘template’, which resamples the MNI gray matter mask to the field of view of my subjects’ data. If this mask works properly, then aCompCor (even aCompCor00) shouldn’t have an effect because functional connectivity is only computed between the PCC seed and other gray matter voxels. Thoughts?

Well aCompCorr is supposed to highlight signals that are … lets say “not of interest”. The voxels most strongly associated with these signals may be outside the brain, or subcortical or whatever. However the extent to which these signals are reflected in the voxels you are interested in (say cortical gray matter) is unknown. That’s what we’re trying to figure out.

Perhaps a simpler check at this point would be to compare no removal of confounds with removal of only aCompCor00. This should only require minor modifications to your existing code.

My feeling is that if there is no difference in that comparison then something may not be quite right.

Dror

1 Like

Final edit: I realised that to avoid caching, I had to remove the memory = ‘nilearn_cache’ part. New results looking good without caching. Sorry for any misinformation!

Thanks everyone for the responses. There is a difference (yay!) I think the difference was so miniscule that I missed it when looking at it through FSLeyes. The correlation values do indicate that there is a very small difference to adding aCompCor00:

Seed-based correlation fisher’s z (thirteen confounds, incl. aCompCor): min -0.950, max 2.571
Seed-based correlation fisher’s z (twelve confounds, excl. aCompCor): min -0.942, max 2.571
Seed-based correlation fisher’s z (no confounds): min -0.845 , max 2.460

What’s perhaps more interesting (to me) is the fact that when trying to make a connectome based on the power coordinates, adding aCompCor00 makes a big difference in the output data, immediately and clearly visible. Seems to reflect a difference between how confounds affect the output in seed-to-voxel (which, in the case of a PCC seed, and an adequate gray matter mask, might avoid many of the signals out of the brain/subcortical) versus seed-to-seed analyses (which probably capture some out-of-brain and subcortical/WM/CSF signals).