Error while running 3ddeconvolve with stim_times_IM

Some background details - I am extracting trial wise estimates within an ROI, so my input to 3ddeconvolve is the 1D file containing the extracted time series.

The code is as follows:


3dDeconvolve \
		  -overwrite \
		  -input $proj_path/data/individual/AAR"$subj"/activation/ROI/vmPFCROI/AAR"$subj"_vmPFC_ROI_meanTS_transpose_p2.1D \
		  -concat '1D: 0 155 310 465' \
		  -polort A \
		  -nobout \
		  -jobs 4 \
		  -noFDR \
		  -num_stimts 7 \
		  -local_times \
		  -stim_times_IM 1 $reg_path/PP_Onset_AAR"$subj".txt 'GAM(8.6,0.547,2)' -stim_label 1 PP \
		  -stim_times_IM 2 $reg_path/PN_Onset_AAR"$subj".txt 'GAM(8.6,0.547,2)' -stim_label 2 PN \
		  -stim_times_IM 3 $reg_path/PU_Onset_AAR"$subj".txt 'GAM(8.6,0.547,2)' -stim_label 3 PU \
		  -stim_times_IM 4 $reg_path/NN_Onset_AAR"$subj".txt 'GAM(8.6,0.547,2)' -stim_label 4 NN \
		  -stim_times_IM 5 $reg_path/NU_Onset_AAR"$subj".txt 'GAM(8.6,0.547,2)' -stim_label 5 NU \
		  -stim_times_IM 6 $reg_path/UU_Onset_AAR"$subj".txt 'GAM(8.6,0.547,2)' -stim_label 6 UU \
		  -stim_times 7 $reg_path/error_p2_Onset_AAR"$subj".txt 'GAM(8.6,0.547,2)' -stim_label 7 Error \
		  -ortvec $proj_path/data/individual/AAR"$subj"/func/AAR"$subj"_MotionPar_p2.txt'[1..6]' 'MotionParam' \
		  -ortvec $proj_path/data/individual/AAR"$subj"/func/AAR"$subj"_MotionPar_derv_p2.1D'[1..6]' 'MotionParamDerv' \
		  -censor $proj_path/data/individual/AAR"$subj"/func/AAR"$subj"_censor_p2.1D \
		  -x1D ./"AAR"$subj"_censor_MR_deconLSS_vmPFC_p2.x1D" \
		  -xsave \
		  -bucket AAR"$subj"_censor_MR_deconLSS_vmPFC_p2

I get the following error for some datasets:

++ N.B.: 3dREMLfit command above written to file AAR422_censor_MR_deconLSS_vmPFC_p2.REML_cmd
++ (b) Visualization/analysis of the matrix via ExamineXmat.R
++ (c) Synthesis of sub-model datasets using 3dSynthesize
++ ==========================================================
*+ WARNING: -------------------------------------------------
*+ WARNING: Problems with the X matrix columns, listed below:
*+ WARNING: !! * Column 123 [NN#3] is all zeros
*+ WARNING: -------------------------------------------------
++ ----- Signal+Baseline matrix condition [X] (587x228): 7.96039 ++ VERY GOOD ++
*+ WARNING: !! in Signal+Baseline matrix:

  • Largest singular value=2.25313
  • 1 singular value is less than cutoff=2.25313e-07
  • Implies strong collinearity in the matrix columns!
    ++ Signal+Baseline matrix singular values:
    0 0.0355564 0.0436993 0.0492131 0.0577978
    0.0892756 0.110403 0.126088 0.256013 0.2727
    0.281473 0.303093 0.309876 0.325382 0.342233
    0.354394 0.362991 0.37427 0.387724 0.391202
    0.411502 0.429886 0.436836 0.448915 0.457823
    0.496387 0.502601 0.509042 0.553889 0.557616
    0.576915 0.63068 0.719514 0.783725 0.904027
    0.941482 0.957081 0.95735 0.960841 0.961597
    0.96235 0.962929 0.964487 0.964815 0.96496
    0.966142 0.966447 0.966914 0.967252 0.967514
    0.968008 0.968228 0.968425 0.969359 0.970175
    0.970596 0.970838 0.971356 0.971415 0.972472
    0.972777 0.972927 0.973019 0.974072 0.974622
    0.975136 0.97543 0.97607 0.976894 0.97729
    0.978213 0.978583 0.979069 0.979363 0.979839
    0.980212 0.980556 0.980849 0.98147 0.98199
    0.982366 0.982807 0.983001 0.983285 0.983533
    0.985222 0.985632 0.985882 0.986138 0.986434
    0.98654 0.986652 0.986781 0.987541 0.987746
    0.987893 0.988053 0.988361 0.988776 0.988897
    0.989485 0.990451 0.990781 0.991491 0.992151
    0.99297 0.994543 0.994645 0.995381 0.995635
    0.99577 0.996407 0.996918 0.997128 0.9983
    0.999303 0.999659 0.999682 0.999896 0.999928
    1.00004 1.00012 1.00021 1.00033 1.00037
    1.00044 1.0005 1.00059 1.00085 1.00091
    1.00135 1.00144 1.00191 1.00221 1.0025
    1.00295 1.00379 1.0042 1.00443 1.00494
    1.00531 1.00607 1.00694 1.00773 1.00838
    1.00847 1.00931 1.01046 1.01096 1.01128
    1.01157 1.0118 1.01247 1.01281 1.01339
    1.01365 1.01374 1.01397 1.01416 1.0143
    1.01476 1.01566 1.01607 1.01631 1.01648
    1.01706 1.01732 1.01748 1.01808 1.01843
    1.01864 1.01937 1.01959 1.02014 1.0209
    1.02135 1.02173 1.02237 1.02375 1.02381
    1.02464 1.02495 1.02626 1.02656 1.0268
    1.02722 1.02752 1.02844 1.02972 1.03069
    1.03134 1.03194 1.03255 1.03271 1.03344
    1.03478 1.03585 1.03642 1.03867 1.04184
    1.04841 1.0511 1.0743 1.09206 1.23316
    1.246 1.27329 1.28907 1.30466 1.32886
    1.3415 1.34336 1.3539 1.36954 1.37128
    1.38535 1.38649 1.39321 1.39463 1.40339
    1.41585 1.4441 1.4605 1.58035 1.64733
    1.74812 1.89015 2.25313
    ++ ----- Signal-only matrix condition [X] (587x200): 3.43049 ++ VERY GOOD ++
    *+ WARNING: !! in Signal-only matrix:
  • Largest singular value=1.40914
  • 1 singular value is less than cutoff=1.40914e-07
  • Implies strong collinearity in the matrix columns!
    ++ Signal-only matrix singular values:
    3.94248e-08 0.119741 0.314574 0.335123 0.411415
    0.602783 0.885504 0.940616 0.955741 0.95688
    0.95728 0.959151 0.960811 0.961574 0.962602
    0.964172 0.964456 0.964787 0.964903 0.965292
    0.966142 0.966342 0.967222 0.967417 0.968081
    0.968324 0.969144 0.969504 0.970283 0.970362
    0.970569 0.971157 0.97217 0.972406 0.972433
    0.972687 0.972765 0.974664 0.974725 0.975229
    0.975812 0.976142 0.977 0.977775 0.978124
    0.979018 0.979032 0.979811 0.980356 0.980804
    0.981163 0.981184 0.981571 0.981968 0.981996
    0.982782 0.983044 0.983684 0.985281 0.98537
    0.985679 0.985875 0.986058 0.986254 0.986286
    0.986298 0.986482 0.987208 0.987611 0.987659
    0.987863 0.988018 0.988624 0.988969 0.990246
    0.990303 0.991378 0.99149 0.991946 0.992378
    0.992918 0.994609 0.994629 0.995347 0.995726
    0.995856 0.995958 0.996799 0.997435 0.998881
    0.999029 0.999507 0.999578 0.999649 0.99999
    1 1 1 1 1
    1 1 1 1 1
    1 1.00001 1.00035 1.00046 1.00049
    1.00097 1.00112 1.00256 1.00319 1.00402
    1.00413 1.00425 1.00447 1.00535 1.00536
    1.00703 1.00756 1.00799 1.00844 1.00856
    1.00962 1.00966 1.01091 1.01125 1.01184
    1.01199 1.01219 1.01224 1.01263 1.01334
    1.01352 1.01353 1.01356 1.01375 1.01393
    1.01412 1.01441 1.01442 1.01604 1.0166
    1.01693 1.0177 1.01771 1.0181 1.01846
    1.01849 1.01883 1.01929 1.01979 1.02054
    1.02055 1.02144 1.02174 1.02249 1.02337
    1.02362 1.02419 1.02465 1.02472 1.02651
    1.02659 1.02683 1.02685 1.02708 1.02805
    1.02859 1.02878 1.02886 1.02959 1.02993
    1.03071 1.03093 1.03155 1.03174 1.03246
    1.03275 1.03354 1.03391 1.03408 1.03433
    1.03454 1.03605 1.037 1.03771 1.03924
    1.04097 1.04126 1.04238 1.05605 1.10267
    1.27938 1.35305 1.37393 1.37889 1.40914
    ++ ----- Baseline-only matrix condition [X] (587x28): 5.49327 ++ VERY GOOD ++
    ++ ----- stim_base-only matrix condition [X] (587x12): 3.23923 ++ VERY GOOD ++
    ++ ----- polort-only matrix condition [X] (587x16): 1.07056 ++ VERY GOOD ++
    ++ +++++ Matrix inverse average error = 2.0185e-05 ++ GOOD ++

++ Matrix setup time = 2.63 s
** ERROR: !! 3dDeconvolve: Can’t run past 3 matrix warnings without ‘-GOFORIT 3’
** 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 !!
** Program compile date = Sep 1 2020
** ERROR: mri_read_ascii: couldn’t open file AAR422_censor_MR_deconLSS_vmPFC_p2.1D
** FATAL ERROR: Can’t read input file ‘AAR422_censor_MR_deconLSS_vmPFC_p2.1D’
** Program compile date = Sep 1 2020
** ERROR: mri_read_ascii: can’t read any valid data from file AAR422_censor_MR_deconLSS_vmPFC_clean_p2.1D
** FATAL ERROR: Can’t read input file ‘AAR422_censor_MR_deconLSS_vmPFC_clean_p2.1D’
** Program compile date = Sep 1 2020

Please help me resolve it. Thanks.

It looks like one of the NN responses is being totally censored out (which is not so odd). That is one difficulty with IM, there is a reasonable chance that censoring will cover all of the time points for at least one event response, giving you one or more all-zero regressors. To have it proceed, it is necessary to include at least the warned about -GOFORIT level (in this case, 3). But some subjects might have higher levels if this happens more.

The other question is what to do for these events, as you have no estimate of a BOLD response for them. If it is a very low fraction of events, you might choose to ignore them. I am curious what Gang tends to suggest.

  • rick

Hello,

Thanks for your response. With this error, is it possible that there are some discrepancies in the input? or is this just a result of using stim_times_IM for calculating trial wise estimates?

Sanjana

Hi Sanjana,

This depends on individual subject motion, leading to which time points get censored. I cannot tell what your TR is, but if it were 2s, there would only be about 6 non-zero time points in each IM regressor (since each covers only a single event response). So all you need is a subject to have motion for that many contiguous TRs (or plus a few) to have one regressor get censored out. Censoring and IM often have this trouble.

I don't recall what @gang tends to suggest in these cases.

  • rick

@SanjanaH Two questions:

  • Is some head motion, especially those occurrences that prevent 3dDeconvolve from proceeding, task-induced?

  • What are you planning to use those trial-level effect estimates for?

Hello,

thank you for your response.

  1. The head motion has no connection to the task, as they are spread out across my conditions of interest.
  2. I am planning on using the trial wise estimates to test a linear model predicting the type of interaction in my study.

I'm curious about this, as my estimates with and without censored volumes are very different.

Which estimates are different: the ones affected by head motion? How about the ones unaffected by it?

I'm not familiar with the details of your subsequent analysis. If the estimates for trials unaffected by head motion appear reasonable, a conservative approach, albeit a bit cumbersome and suboptimal, might be excluding the trials with head motion from the follow-up analysis.

Gang

Keep in mind that with IM, a single beta is estimated from just a few time points, and motion generally censors multiple time points per motion event. In some cases censoring might leave a regressor with only 1 non-zero time point (which will model the data (and noise) exactly) or 0 non-zero time points (leading to a GOFORIT warning and to beta=0, since there is no data to model). Censoring can indeed have a large effect when regressors only have a few non-zero time points, and the difference may be driven by spiky noise, since the subject was presumably moving at those time points.

  • rick