Strange ROI-to-Wholebrain FC results

Hi AFNI folks,

Hoping for some guidance on 2 things:

  1. In running some task based ROI-to-Wholebrain results through the simple Correlation approach outlined by Gang’s old webpage (3dDeconvolve > R^2 > R > Z > 3dTtest++), I ended up with very very high internal correlations (see first attached image). What is the proper approach to correct for the massive multiple comparisons? Adding ClustSim into the 3dTtest++ didnt seem to bring things down. Would applying something like 3dFDR be possible?

  2. In trying to verify those ROI-to-Wholebrain results from 3dDeconvolve I endeavored to run the same data through 3dTCorr1D. Unfortunately the results are different and nearly look random (see second image). Not even the original seed region (primary auditory cortex) was correlated with itself. I am posting both sets of scripts below, but 3dTcorr1D is so simple I can’t figure out what could have gone wrong. Any input or assistance here greatly appreciated.

Thanks as always,

~Dane

3dDeconvolve
-force_TR 2.5
-input ${subj}_prepro_all+tlrc.
-polort 2
-mask ${subj}_s4_vr_zp4_cardnudg_e2a_amsk+tlrc.
-censor $censorfile/${subj}_autocensor_AC3VC_pre-moco.1D
-nfirst 0
-GOFORIT 5
-num_stimts 1
-stim_file 1 ${subj}prepro_all_stim5c_dmbfitts_3dSynthRemvBase_StrgClean${ROI}_Timeseries.1D -stim_label 1 Strg_Seed${ROI}
-rout
-bucket ${subj}prepro_all_stim5c_dmbfitts_3dSynthRemvBase_StrgClean${ROI}_roi2wb_r^2map \

----------------- vs ----------------------

3dTcorr1D
-pearson
-prefix ${subj}_prepro_all_stim5c_dmbfitts_3dSynthRemvBase_StrgClean_L_PAC_roi2wb_3dTcorr1DTest3+tlrc
-mask ${subj}_s4_vr_zp4_cardnudg_e2a_amsk+tlrc
${subj}_prepro_all+tlrc.
${subj}_prepro_all_stim5c_dmbfitts_3dSynthRemvBase_StrgClean_L_PAC_Timeseries.1D \

Just bumping the thread.

I’m having problems seeing your posted images.

I posted a question with two images a couple of days ago, and they’re not loading either. It has said “loading image” since Monday.

Howdy-

Yes, there was an issue with the MB itself, but Brian has come to the rescue, and the images should be visible now.

–pt

I will try reposting them here

Thanks for reposting. I deleted your previous images from the first post when I couldn’t get them to show up. (Thanks, Brian).

Maybe Gang will have some comments about that method, but the usual cause of high correlation is motion. Without censoring motion, that is pretty likely. After censoring, it’s still possible depending on the thresholds for motion and outlier limits. There can be other significant artifacts too within the signal. Here, the seed time series is the same for both sets. Is that seed data pre-censored? If it is, then the pre-censored and post-censored data won’t correlate.

Really great avenue to attack. Definitely improved things but let me address points in order:

  1. We are using motion correcting and censoring at 0.3. These seemed quite effective at the activation stage and same parameters are being used now in FC
  2. For 1D file we removed motion and censors via “select -Baseline” and "cenfill none’ in 3dsynth/3dcalc stage of creating our seed ROI time series.
  3. For the 3d+time input file for 3dTcorr1D R^2, (per your concept) I tried using 3dSynth and 3ddcalc A-B to manually remove motion baselines and censors from the preprocessed input file.

This appears to have gotten rid of the random results (see image 1). But now it looks similar to the correlation image previously sent of 3dDeconvolve pathway where its just a wash of correlation with little differentiation.

So I tried to apply your concept as well to the 3dDeconvolve R^2 pathway, I added motion regressors and censor file into the 3dDeconvolve R^2 step (see below scripting) so it can remove them rather than manipulating the input file before hand.

No dice. While its great that they now look similar… I think we might be back at my other question about if we are approaching thresholding and FDR corrections appropriately. @Gang - do you have any feedback here?

The interesting part is that if you bump up the p value WAYYYY up there for the group results they do look very accurate for Left PAC during this task (see image 2). So it appears the analysis is working… just there is a lot of noisy ambient correlations obscuring them.

My only other thought is that perhaps there is a signal cleaning step we are missing for task-based FC, maybe something akin to bandpass or global signal filtering for resting state…? But noting I have read in literature indicates this.

Thanks all,

~Dane


 	3dDeconvolve \
 	-force_TR 2.5 \
	-input ${subj}_prepro_all+tlrc. \
	-polort 2 \
	-mask ${subj}_s4_vr_zp4_cardnudg_e2a_amsk+tlrc. \
	-censor $censorfile/${subj}_autocensor_AC3VC_pre-moco.1D \
	-nfirst 0 \
	-GOFORIT 5 \
	-num_stimts 7 \
	-stim_file 1 $outputdir/${subj}/${subj}_prepro_all_stim5c_dmbfitts_3dSynthRemvBase_StrgClean_${ROI}_Timeseries.1D -stim_label 1 Strg_Seed${ROI} \
	-stim_file 2 $motiondir/${subj}_motion_all.1D'[0]' -stim_label 2 'roll' \
	-stim_file 3 $motiondir/${subj}_motion_all.1D'[1]' -stim_label 3 'pitch' \
	-stim_file 4 $motiondir/${subj}_motion_all.1D'[2]' -stim_label 4 'yaw' \
	-stim_file 5 $motiondir/${subj}_motion_all.1D'[3]' -stim_label 5 'dS' \
	-stim_file 6 $motiondir/${subj}_motion_all.1D'[4]' -stim_label 6 'dL' \
	-stim_file 7 $motiondir/${subj}_motion_all.1D'[5]' -stim_label 7 'dP' \
	-stim_base 2 -stim_base 3 -stim_base 4 -stim_base 5 -stim_base 6 -stim_base 7 \
	-rout \
	-tout \
	-bucket $outputdir/${subj}/${subj}_prepro_all_stim5c_dmbfitts_3dSynthRemvBase_StrgClean_${ROI}_roi2wb_ply2Cen_r^2map \

Hi, Dane-

Quick question—have you processed this data using afni_proc.py (for example, did that form the basis of your initial 3dDeconvolve command)? The benefit of that is that there are useful QC images for looking at seedbased correlation for resting state FMRI (and for task-FMRI, very useful images of the full Fstat and various stimuli/GLT effect estimates and statistics).

I am not familiar with 3dSynthesize. I am not sure I would start with an investigation of correlation mapping using that.

–pt

@ PTaylor - Yes we do have full Fstat, R, T, V, and GLM condition comparison analyses. Not sure which additional output would be of assistance with the FC analysis but please let me know.

For more context: The activation analysis was originally done years and years ago before afni.proc was the primary approach. Specifically we used 3dDeconvolve with DmBlock and AM times (See below). Now we are refining things with a second order analysis.

3dSynthesize is being used here (with the matrix output from that activation 3dDeconvolve) to help isolate specific conditions of interest (by removing the other conditions, motion, and censors) in order to have a cleaner seed signal from which to run an FC correlation analysis with the rest of the brain to investigate the network and connections.

Let me know if this helps clear things up and if any suggestions of how the original deconvolution outputs can be of assistance. Any guidance on correcting for the oddly high correlations very much appreciated as well.

~Dane


3dDeconvolve
-jobs 4
-force_TR 2.5
-input ${subj}_prepro_all+tlrc
-mask ${subj}_s4_vr_zp4_cardnudg_e2a_amsk+tlrc
-censor $censorfile/${subj}_autocensor_AC3VC_pre-moco.1D
-nfirst 0
-polort 16
-allzero_OK
-GOFORIT 3
-local_times
-basis_normall 1
-num_stimts 9
-num_glt 3
-stim_times_AM1 1 $stimdir/${subj}_Strong_stim5c.1D ‘dmBLOCK(1)’ -stim_label 1 ‘Strg’
-stim_times_AM1 2 $stimdir/${subj}_Weak_stim5c.1D ‘dmBLOCK(1)’ -stim_label 2 ‘Weak’
-stim_times_AM1 3 $stimdir/${subj}_Silence_stim5c.1D ‘dmBLOCK(1)’ -stim_label 3 ‘Slnc’
-stim_file 4 $motiondir/${subj}_motion_all.1D’[0]’ -stim_label 4 ‘roll’
-stim_file 5 $motiondir/${subj}_motion_all.1D’[1]’ -stim_label 5 ‘pitch’
-stim_file 6 $motiondir/${subj}_motion_all.1D’[2]’ -stim_label 6 ‘yaw’
-stim_file 7 $motiondir/${subj}_motion_all.1D’[3]’ -stim_label 7 ‘dS’
-stim_file 8 $motiondir/${subj}_motion_all.1D’[4]’ -stim_label 8 ‘dL’
-stim_file 9 $motiondir/${subj}_motion_all.1D’[5]’ -stim_label 9 ‘dP’
-stim_base 4 -stim_base 5 -stim_base 6 -stim_base 7 -stim_base 8 -stim_base 9
-gltsym 'SYM: Strg -Weak ’ -glt_label 1 Strg_vs_Weak
-gltsym 'SYM: Strg -Slnc ’ -glt_label 2 Strg_vs_Slnc
-gltsym 'SYM: Weak -Slnc ’ -glt_label 3 Weak_vs_Slnc
-fout -rout -tout -vout -bout -x1D ${subj}_stim5c_dmb.xmat.1D -xjpeg ${subj}_stim5c_dmb.xmat.jpg -full_first -float
-fitts $subjectsdir/${subj}/${subj}_activationP1_S3_stim5c_dmb_Fitts
-cbucket $subjectsdir/${subj}/${subj}_activationP1_S3_stim5c_dmb_Cbucket
-bucket $subjectsdir/${subj}/${subj}_activationP1_S3_stim5c_dmb_Bucket \

Hi, Dane-

Would it be possible/desirable to convert your processing to an afni_proc.py command? Since you already have the 3dDeconvolve command worked out, I would think that the mapping of that to “-regress_* …” options would not be too bad. The QC HTML would be a major benefit of doing this; hopefully, the other steps that get taken care of by afni_proc.py (like concatenation of warps, etc.) would just be icing on the cake.

I will have to leave it for someone else to comment on the use of 3dSynthesize to further isolate regressors of interest. I am afraid I don’t have a good sense of how that would work. Have you previously taken your output regressors of interest, and they didn’t provide adequate contrasts or something?

I would tend to start with a simple or “classical” analysis of regressors and see how the results look there, before moving into the 3dSynthesize realm. For example, it would be a good sign to see approximate effect estimates that you expect, even if they are a little weak or with too low of statistics. That would give you more confidence in the acquired data and modeling before trying any higher order analyses after.

–pt

Dane,

Do you mind providing some details about the experimental design? How many tasks/conditions? Under what condition/task are you trying to perform the seed-based correlation analysis?

3dSynthesize is being used here (with the matrix output from that activation 3dDeconvolve) to help isolate specific conditions of
interest (by removing the other conditions, motion, and censors) in order to have a cleaner seed signal from which to run an FC
correlation analysis with the rest of the brain to investigate the network and connections.

If you followed some webpage I created a long time ago, I should probably deactivate/delete it. The 3dSynthesize approach is really a bad idea because it can only remove the average effect across trials, but not trial-to-trial fluctuations.

Hi Dr. Chen,

We spoke about the experimental design and 3dSynthesize a bit in a previous posting: https://afni.nimh.nih.gov/afni/community/board/read.php?1,162913,163126#msg-163126 Let me know if you have questions after reviewing.

You did raise the option of beta series to measure trial by trial correlations there. Definitely see the advantage however the end goal is to do some effective connectivity analyses using GIMME (https://www.sciencedirect.com/science/article/abs/pii/S1053811912006404) which requires extracting time series for different conditions as well. Therefore while not ideal we thought we’d see how effective the deconvolution was for unwinding the task conditions and it seemed 3dsynthesize was our best hope of that.

~Dane

Dane,

I still think that it would be difficult, if not impossible, to reliably separate effects at the trial level across different conditions. Unfortunately I’m not an expert on “effective connectivity”, but it remains to be seen as to how much an autoregressive structural equation modeling approach, as demonstrated in the paper you linked, could robustly reveal regarding inter-regional relationships.

Definitely appreciate the candor. Have a few follow up questions:

  • Can you explain a bit more about what is the root of difficulty is for untangling the condition’s task-based signals? Is it experimental design (rapid interleaved), limited modeling capability (simple block and HDR), amount of data, etc.?

  • Could beta series analysis output coefficients be used to estimate a timeseries for different ROIs once it was run? In essence use that to build what we need for correlation matrices to compare conditions?

  • Any Effective connectivity approach you generally are more in favor of? Or resource you’d recommend to ask about it?

~Dane

Hi Dane,

the root of difficulty is for untangling the condition's task-based signals

A typical FMRI experiment is designed to have many trials per condition. The BOLD response tends to vary substantially from trial to trial. For example, see Fig. 8B in this paper[/url], Figs 4 and 13 in [url=https://www.sciencedirect.com/science/article/pii/S1053811920309812]this paper. In other words, simply removing the average effect for a condition would not achieve the goal.

Could beta series analysis output coefficients be used to estimate a timeseries for different ROIs once it was run?

The beta series approach would be basically similar to the situation with resting-state data in the sense you can perform seed-based correlation analysis or compute correlation matrix among regions.

Any Effective connectivity approach you generally are more in favor of?

Unfortunately I don't have the expertise in effective connectivity.

Thank you Dr. Gang (as always). I will have to do some more reading on beta series to get my head around the approach.

One thought our team had in response to your concerns was running Seed-to-whole brain FC correlations analysis using only non-overlapping/interleaved portions of our condition of interest for the seed signal to avoid the modeling/deconvolution issue. Would there be any conceptual issues to looking for correlations of this partial signal (e.g. without many of the HDR tails)?

~Dane

Dane,

One thought our team had in response to your concerns was running Seed-to-whole brain FC correlations analysis using onlyve
non-overlapping/interleaved portions of our condition of interest for the seed signal to avoid the modeling/deconvolution issue.
Would there be any conceptual issues to looking for correlations of this partial signal (e.g. without many of the HDR tails)?

Conceptually this may work if the interval between two consecutive trials is, for example, 10 seconds or more. I don't have any experience with this in real practice, so it's to say how well it works.

Re-opening this topic because I have run into same high correlation issues mentioned previously (New results image at bottom). Note: We have swapped over to the recommended Beta-series estimation approach (Thanks Gang for patience and recommendations there). Now looking for assistance trying to sort out where these excessively high correlations are still coming from. Included below are scripts that could involve motion regression, since Daniel mentioned earlier in this thread that this is most common place these issues arise. Open to other ideas and happy to include scripts where helpful.

Current process is as follows:

  1. Activation analysis using 3dDeconvolve(1st time) with Stim_times_AM1, Dmblock, motion, and censoring
  2. 3dTtest++ with ClustSim for group analysis of conditions and selection of high activitation ROIs (all activation output as expected and normal signif levels)
  3. BetaSeries estimation using 3dDeconvolve(2nd time) with polort 1, stim_times_IM, dmblock, motion, and censoring (see Step #3 script below)
  4. 3dBucket to select relevant trials/subriks from desired condition
  5. 3drefit to change into 3dtime dataset
  6. 3dMaskave to pull relevant .1D ROI timeseries
  7. 1d_tool.py and 3dTstat+3dCalc to demean both .1D ROI time series and whole brain volume (as recommended by Colm in this thread * Note correlation area same with and without step
  8. Seed to Whole-brain Correlation analysis via 3dDeconvolve (3rd time) with stim_file1, no censoring, no motion, and polort 0…(as recommended by gang in this thread (see Step #8 script below)
  9. 3dCalc to change R^2 to R
  10. 3dCalc for R-to-Z transform
  11. 3dTtest++ again with ClustSim to assess across subjects.

12**. I have also run this using 3dfim+ and last 2 steps as a sanity check. Unfortunately that also has same hugely high correlation values.

Assistance and ideas much appreciated since I know this has to be user error somewhere.

~Dane


Step #3 script
3dDeconvolve
-jobs 4
-force_TR 2.5
-input {subj}_prepro_all+tlrc \ -mask {subj}_s4_vr_zp4_cardnudg_e2a_amsk+tlrc
-censor censorfile/{subj}_autocensor_AC3VC_pre-moco.1D
-nfirst 0
-polort 1
-allzero_OK
-GOFORIT 3
-local_times
-basis_normall 1
-num_stimts 9
-stim_times_IM 1 stimdir/{subj}_Strong_stim5c_p3.4.1D ‘dmBLOCK(1)’ -stim_label 1 ‘StrgBeta’
-stim_times_IM 2 stimdir/{subj}_Weak_stim5c_p3.4.1D ‘dmBLOCK(1)’ -stim_label 2 ‘WeakBeta’
-stim_times_IM 3 stimdir/{subj}_Silence_stim5c_p3.4.1D ‘dmBLOCK(1)’ -stim_label 3 ‘SlncBeta’
-stim_file 4 motiondir/{subj}_motion_all.1D’[0]’ -stim_label 4 ‘roll’
-stim_file 5 motiondir/{subj}_motion_all.1D’[1]’ -stim_label 5 ‘pitch’
-stim_file 6 motiondir/{subj}_motion_all.1D’[2]’ -stim_label 6 ‘yaw’
-stim_file 7 motiondir/{subj}_motion_all.1D’[3]’ -stim_label 7 ‘dS’
-stim_file 8 motiondir/{subj}_motion_all.1D’[4]’ -stim_label 8 ‘dL’
-stim_file 9 motiondir/{subj}_motion_all.1D’[5]’ -stim_label 9 ‘dP’
-stim_base 4 -stim_base 5 -stim_base 6 -stim_base 7 -stim_base 8 -stim_base 9
-x1D outputdir/{subj}/${subj}_activationP1_S3_Q2_st5c_p34_dmbIM.xmat.1D -xjpeg
outputdir/{subj}/${subj}_activationP1_S3_Q2_st5c_p34_dmbIM.jpg
-bucket outputdir/{subj}/${subj}_activationP1_S3_Q2_st5c_p34_dmbIM_Bucket \

Step #8 Script
3dDeconvolve
-force_TR 2.5
-input subjectsdir/{subj}/{subj}_activationP1_S3_Q2_st5c_P34_dmbIM_StrgBetas_MAPdemean+tlrc \ -polort 0 \ -mask {subj}_s4_vr_zp4_cardnudg_e2a_amsk+tlrc.
-GOFORIT 3
-local_times
-num_stimts 1
-stim_file 1 subjectsdir/{subj}/{subj}_activationP1_S3_Q2_st5c_P34_dmbIM_StrgBetas_MAP_{ROI}Timeseries_demean.1D
-stim_label 1 StrgBeta_demSeed
${ROI}
-rout
-fout
-bucket subjectsdir/{subj}/{subj}_activationP1_S3_Q2_st5c_P34_dmbIM_StrgBetas_MAPdemean_{ROI}_roi2wb_r^2map \

Dane, what result are you showing: the seed-based correlation under one particular condition, or the contrast between two conditions?