Add non-stim-times regressors to (Task-RVHRCOR)

Hello AFNI experts.

We are currently optimizing our task based analysis and are trying out different ways to include physiological data. For resting state analysis we preformed an ordinary script (with ANATICOR and RICOR) and cleaned up the resulting .errts.anaticor file even further by e.g. using the rvhrcor method. This was quite straight forward since the regressors created by the rvhrc-matlab script could be applied to the errts.anaticor in a sperate 3dDeconvolve step after finishing the -subj_id $sub_id \ -dsets ${fmri_data}  -regress_anaticor   ............ etc \
tcsh -xef proc.$sub_id |& tee output.proc.$sub_id

#RUN reaklocs
matlab -nosplash -nodisplay -r "try, addpath('$rvhr_m_path'), peaklocs($samp,$nframes,'$card','$resp',$TR), end, quit"

#RUN RVHRCOR: outputs rvhr_regs.1D
matlab -nosplash -nodisplay -r "try, addpath('$rvhr_m_path'), rvhrcor_imgs([],$TR,[],'$resp_tr',$samp,'$ECG',$nframes), end, quit"

3dDeconvolve -float -GOFORIT 1 -jobs 10 \
		 -input $Results_Path/errts.$sub_id.anaticor+tlrc -nfirst 0 -num_stimts 2 \
		 -polort 0 \
		 -stim_file 1 rvhr_regs.1D'[0]($num_rm_TRs..$end)' -stim_label 1 'bla' \
		 -stim_file 2 rvhr_regs.1D'[1]($num_rm_TRs..$end)' -stim_label 2 'blabla' \
		 -errts residuals \
		 -censor $Results_Path/censor_${sub_id}_combined_2.1D

With task data it is not as straight forward for me. I want these regressors to be a part of the big resgresson as noise regressors (of no interest). I can preform this part prior to the command but how do I get them in? RICOR is very similar but then you have a build in way to use the ricor-regressors (which makes sense since RICOR is provided by AFNI). I cannot just simply add the rvhr_regs.1D into the stim-files folder since those files need to have an onset and a duration (onset:duration since I use dm_BLOCK). These are more “continuous” regressors from PPU and Resp measurements.

Hope you can help, thanks!

Hi Robin,

Pass them to

  1. Remove the first $num_rm_TRs time points to begin with, and
    make a separate file for each such regressor, e.g.
1dcat rvhr_regs.1D"[0]{$num_rm_TRs..$end}" > sfile_1_bla.1D
1dcat rvhr_regs.1D"[1]{$num_rm_TRs..$end}" > sfile_2_blabla.1D
  1. Pass those files along with the others via -regress_stim_times, e.g.
-regress_stim_files timing*.1D sfile_[12]_bla*.1D
  1. Include -regress_stim_types, where timing files are specified
    as ‘times’ and the new simple regressors are as ‘file’, e.g.
-regress_stim_types times times times ... times file file

See Example 7 from the -help output, as well as the description
of the -regress_stim_types option.

To be clear, parameters of the following options should match
one for one:


Does that seem reasonable? Please feel free to send me your
proc script via email for verification.

  • rick