Missing regressors in 3dDeconvolve with stim_times_IM

Hi All,

I am having an issue with 3dDeconvolve when using stim_times_IM. My timing file (Win_afni_mssd.txt) for the following script contains 60 events, yet 3dDeconvolve only reports 30 regressors upon startup. Similarly, the bucket output from this script only lists 30 “win trials” instead of the full 60 I would expect.
If anyone has any idea as to why only a portion of the trial-by-trial regressors are being accounted for, your help is greatly appreciated.

Here is the script in question:

3dDeconvolve -input
epi_run1_fnirt_6run_melodic.ica/denoised_data.nii.gz
epi_run2_fnirt_6run_melodic.ica/denoised_data.nii.gz
epi_run3_fnirt_6run_melodic.ica/denoised_data.nii.gz
epi_run4_fnirt_6run_melodic.ica/denoised_data.nii.gz
epi_run5_fnirt_6run_melodic.ica/denoised_data.nii.gz
epi_run6_fnirt_6run_melodic.ica/denoised_data.nii.gz
-force_TR 2.0 -polort 2 -TR_times 1 -num_stimts 4
-iresp 1 /deep/heller/work/savorema/${i}/FinancialWin/glm_WinLoss_Win_IM_310/Win_IM_TEST.nii
-iresp 2 /deep/heller/work/savorema/${i}/FinancialWin/glm_WinLoss_Win_IM_310/Loss_TEST.nii
-stim_label 1 Win -stim_times_IM 1 /deep/heller/work/savorema/1DDirs/${i}_1Dfiles/Win_afni_mssd.txt ‘SPMG3’
-stim_label 2 Loss -stim_times 2 /deep/heller/work/savorema/1DDirs/${i}_1Dfiles/Loss_afni_mssd.txt ‘SPMG3’
-stim_label 3 WM_mask -stim_file 3 /deep/heller/work/savorema/anatDirs/${i}_anat/WM_all.txt
-stim_label 4 CSF_mask -stim_file 4 /deep/heller/work/savorema/anatDirs/${i}_anat/CSF_all.txt
-xsave -xjpeg /deep/heller/work/savorema/${i}/FinancialWin/glm_WinLoss_Win_IM_310
-errts /deep/heller/work/savorema/${i}/FinancialWin/glm_WinLoss_Win_IM_310/residuals_IM_TEST.nii
-bout
-bucket /deep/heller/work/savorema/${i}/FinancialWin/glm_WinLoss_Win_IM_310/glm_WinLoss_Win_IM_TEST.nii

Hello,

Perhaps there is an issue with the timing file.

Please feel free to send me the Win_afni_mssd.txt and X.xmat.1D
files via email. That might clarify this. Also, it might help to see
(or include) the entire screen output from 3dDeconvolve.

  • rick

Hi Rick,

Thank you for your prompt response and your willingness to assist!
I am sending you an email with the .xmat.1D file, the Win_afni_mssd.txt timing file, and the screen output attached.
Note that the files attached pertain to a slightly different GLM consisting of two stim_times_IM inputs. Regardless of this difference, this model has the same issue with missing regressors.

Best,
Bill

Hi Bill,

It looks like there is a bug in the case of applying -force_TR while
using global stimulus times. Using local timing (events per run),
nothing is lost. But with global timing, it seems to use the data TR
(probably 1 in your case) to determine whether times are outside
the range of the data.

In your case, it thinks any events after ~1000s are off the end
of the run.

I will try to take a look at then sometime soon. In the meantime,
you would have to either fix the TR in the -input datasets (e.g.
3drefit -TR 2 DSET.nii.gz) or use the local timing format.

Does that seem reasonable?

  • rick

Hi Rick,

Thank you for attending to this!
I refit my dataset to 2 second TRs and attempted to run the same model with global timing, but the issue seems to persist. Upon initiation of 3dDeconvolve, the program still lists only 30 regressors.
I am currently writing a script for a model that uses local timing in lieu of global timing. I will post again to let you know if it works properly.

Thanks again!

Bill

Sorry for missing this post, Bill.

To convert from global to local timing, consider trying
“timing_tool.py -global_to_local”, as is applied in example
9a from the help.

P.S. So “3dinfo -tr” shows 2.0s for all of the input datasets?

  • rick