Fatal errors from 3dDeconvolve

Hi AFNI experts,

I’m now using proc.py to process fMRI data following the example 6. The scripts are as follows:

afni_proc.py -subj_id subj_task12
-dsets pre_task?.nii.gz
-do_block align tlrc
-copy_anat pre_anat.nii.gz
-tcat_remove_first_trs 10
-align_opts_aea -cost lpc+ZZ
-volreg_align_to MIN_OUTLIER
-regress_stim_times left_hand_time.1D right_hand_time.1D rest_time.1D
-regress_stim_labels lefthand righthand rest
-regress_basis ‘TENT(0,6,4)’
-regress_censor_motion 0.3
-gltsym ‘SYM: +lefthand -righthand’
-glt_label 1 left-right
-gltsym ‘SYM: +lefthand -rest’
-glt_label 2 left-rest
-gltsym ‘SYM: +righthand -rest’
-glt_label 3 right-rest

It can generates the process script and works fine at beginning. However, fatal error occurs as follows when at 3dDeconvolve step:

*+ WARNING: !! in Signal+Baseline matrix:

  • Largest singular value=2.23282
  • 1 singular value is less than cutoff=2.23282e-07
  • Implies strong collinearity in the matrix columns!
    *+ WARNING: +++++ !! Matrix inverse average error = 0.00488281 ** BEWARE **
    ** ERROR: !! 3dDeconvolve: Can’t run past 2 matrix warnings without ‘-GOFORIT 2’
    ** ERROR: !! Currently at -GOFORIT 0
    ** ERROR: !! See file 3dDeconvolve.err for all WARNING and ERROR messages !!
    ** ERROR: !! Be sure you understand what you are doing before using -GOFORIT !!
    ** ERROR: !! If in doubt, consult with someone or with the AFNI message board !!
    ** FATAL ERROR: !! 3dDeconvolve (regretfully) shuts itself down !!

I cannot figure out how the error occurs and not sure to use ‘-GOFORIT 2’. Could you please help?

BTW, just for your reference, the “regress_stim_times” 1D file I used here are like follows:

0 2 4 18 20 22 56 58 60 72 74 76 78 80 82 142 144 146 148 150 152 160 162 164 172 174 176 184 186 188 212 214 216 230 232 234 236 238 240 274 276 278 280 282 284 296 298 300 328 330 332 334 336 338
0 2 4 18 20 22 56 58 60 72 74 76 78 80 82 142 144 146 148 150 152 160 162 164 172 174 176 184 186 188 212 214 216 230 232 234 236 238 240 274 276 278 280 282 284 296 298 300 328 330 332 334 336 338

So two run, two rows with stimulate time(TR=2s). I don’t know if this kind of file cause the problem or not. I’m not quite sure if the providing stim_time is right. Or something wrong with my gltsym?

Many thanks!

Best regards,

Hello? Any one can help?

I have added the ‘-GOFORIT 2’ to the scripts and it seems works fine and ignores the errors and warnings. But is there any side effect if doing so? I’m wondering if those errors occurred because of my regress_stim_times files. Since I have included all stimuli including the baseline time (rest_time.1D).

But if I didn’t include it, I can’t do contrast between the right hand or left hand task with the resting state(baseline) using gltsym. Am I right?

Many thanks to your help!

Best regards,

Hi Tracy,

How long are the events? It looks to me like they might
be 6 seconds long, since the timing file seems to show
triplets of events, spaced on the TR grid. Are they
consecutive short events that you want to model, or are
they really single longer (6 s) events? If the latter,
Consider modeling each as a single event, and then using
longer response functions.

Along those lines, what is the reasoning for using basis
function TENT(0,6,4)? That allows for 6 second response
functions. For humans, we generally do not expect them
to be shorter than 12 s, though the endpoints can be
removed if they are assumed to be zero.

What does rest_time.1D represent? Is it actually the
time points that are not part of left_hand_time.1D and
right_hand_time.1D? If so, it should not be included.
Rest time is implicit in 3dDeconvolve. If rest time is
included as events, that will probably lead to the errors
and warnings you are seeing.

  • rick

Hi Rick!

Really thanks for your reply!

For your first question, they aren’t consecutive short events but single longer (6 s) events. That is to say, each event lasts for 6 seconds(e.g. first 6s showing a “L” on the screen is to ask subjects to do left hand task within the 6s, no matter how many tasks they can perform within the 6s and the same for right hand). And what do you mean by using longer response functions? Like TENT(b,c,n) to make parameter c as longer?

For using TENT(0,6,4), since each event lasts 6s, therefore I assume that the subjects can response within the 6s. If exceeding 6s, they may be asked to do other tasks. (The whole process is to ask subjects to do left or right hand task or keep rest within the 12min) So c is 6 and TR is 2, then n is 4.

And rest_time.1D, yes, just represents the time points that are not part of left_hand_time.1D and right_hand_time.1D. But if it is not be included, how can I use “gltsym” to do contrasts with the rest baseline ones? I’ve tried without rest_time.1D file and just find the results are not reasonable. I mean, when I chose Thr, like “lefthand#0_Tstat”, on ANFI to see clustim results, all areas are included no matter small p values… Or did I use a wrong way to look at the results?

Looking forward to your reply. Thank you Rick

Best regards,

Hi Tracy,

The main point about longer response function is that
the basis function provided to 3dDeconvolve is indeed
intended to be a response function, notably not just
a stimulus function. If the stimuli last 6 s, one would
expect the response to last at least 18 s, maybe longer.
So TENT(0,18,10) would make more sense.

To be sure, are you expecting the response shapes to
differ across the brain, or at least not to look like
the BLOCK() or SPMG() shapes? What is your reasoning
for using TENT over fixed shape regression?

Right, rest_time.1D should not be included. The default
betas output by 3dDeconvolve are automatically contrasts
against the implicit baseline. If you ask for lefthand
as a GLT, it would simply be the same as that main beta.

  • rick

Hi Rick,

Yes, I expected that the BOLD responses vary across the brain. Therefore I used TENT function. And I also think that TENT is more suitable for event-related stimulus right? And my stimulus is event-related not blocked.

For GLT, I have tried without including rest_time.1D following your suggestion. And to make sure I myself do the right analysis, may I write down the steps I did as follows?:
So for the underlay, I chose the “fitts” results (Actually no matter what is ok right?)
And for the overlay, I chose results from “bucket”, named “stats” to see the GLT results.

For the functional color overlay controls:
OLay - chose lefthand#0_Coef
Thr - chose lefthand#0_Tstat

Then to see the clustim results, I chose cluster size of pthr=0.01 and alpha=0.05, which is 80 voxels from NN1_2sided.1D file.
Then click Report to see the activated regions. And the listed clusters are the real responsive ones, right?

I’m sorry that perhaps my questions are quite boring and stupid. But I just found I can not ask for help except in AFNI’s forum…
Really appreciate for your reply Rick.

Best regards,

Hi Tracy,

Well, I might say that assuming one chooses to uses TENTs,
then an event-related design (slow, preferably) is more
suitable than a block design. But having an event-related
design does not mean that TENTs are preferable. This task
might be well suited for using BLOCK(6,1), unless handling
variable response shapes is desired (you have suggested it

In any case, since the events last 6 seconds, there should
only be an event at time 0 s, for example, not also at times
2 and 4 s. The TENT functions will account for the different
time points.

Also, the TENTs should be modeling the full response period,
not just the stimulus period. The purpose of the TENTs is
to model the average response, which might last about 18 s
in this case. So consider TENT(0,18,10), say, or something
else along those lines.

Yes, the underlay can be anything in the final space. If
you want to ponder the fitts, maybe make all_runs the
underlay and use the Dataset #N plugin to plot the fitts
along with it.

That overlay plotting seems good to me, though it is not
usually important to perform such a cluster correction at
the single subject level, not if the plan is to do it at
the group level later. But still, it is fine.

  • rick

Dear Rick,

Really appreciate to your clear explanation!
Many thanks to your help!

Best regards,