Doubts on 3dDeconvolve - task-based fMRI preprocessing

AFNI version info (afni -ver): AFNI_24.0.06

Dear AFNI experts,

I am new to AFNI and the command line in general. I need your help, as I would like to double check that what I am doing is correct. I have fMRI data of a working memory task from an OpenNeuro dataset, partially preprocessed.

Briefly, participants are shown an array of yellow circles [1, 3, 5, or 7], followed by a variable delay (1.5, 3 or 4.5 s) and finally a single green target circle. Participants are required to indicate whether the green circle was in the same position as one of the yellow target circles.

For each subject, I would like to obtain beta maps for high (5 and 7) and low (1 and 3) working memory load and for each of the three experimental delays separately (3x2 maps for each subject), using a box car regression. From my understanding, I need to run 3dDeconvolve to perform deconvolution, optionally followed by 3dREMLfit.

As nuisance regressors, I would like to use six motion regressors (3 translations and 3 rotations), their derivatives,the square of all 12 of them, CSF, and WM signals, all coming from external files sources

Here is how set up the call to 3dDeconvolve and 3dReMLfit :

*BLOCK(d,p): d is the duration of the stimulus (e.g., 6.5=2s presentation of array of yellow circles + 1.5s delay + 3s green target circle), p is the amplitude of the basis function, typically set to 1.

3dDeconvolve \
-force_TR 2 \
-mask "$mask" \
-input "$input" \
-polort 'A' \
-bucket "derivatives/$sub_id/func/"$sub_id"_scap_decon_outputs"/Decon \
-num_stimts 32 \
-stim_times 1 "$events_low15" 'BLOCK(6.5,1)' -stim_label 1 low_WM_1500 \
-stim_times 2 "$events_low30" 'BLOCK(8,1)' -stim_label 2 low_WM_3000 \
-stim_times 3 "$events_low45" 'BLOCK(9.5,1)' -stim_label 3 low_WM_4500 \
-stim_times 4 "$events_high15" 'BLOCK(6.5,1)' -stim_label 4 high_WM_1500 \
-stim_times 5 "$events_high30" 'BLOCK(8,1)' -stim_label 5 high_WM_3000 \
-stim_times 6 "$events_high45" 'BLOCK(9.5,1)' -stim_label 6 high_WM_4500 \
-stim_file 7 "$regressor_tsv"'[0]' -stim_base 7 -stim_label 7 TransX \
-stim_file 8 "$regressor_tsv"'[4]' -stim_base 8 -stim_label 8 TransY \
-stim_file 9 "$regressor_tsv"'[8]' -stim_base 9 -stim_label 9 TransZ \
-stim_file 10 "$regressor_tsv"'[12]' -stim_base 10 -stim_label 10 RotX \
-stim_file 11 "$regressor_tsv"'[16]' -stim_base 11 -stim_label 11 RotY \
-stim_file 12 "$regressor_tsv"'[20]' -stim_base 12 -stim_label 12 RotZ \
-stim_file 13 "$regressor_tsv"'[2]' -stim_base 13 -stim_label 13 TransXd \
-stim_file 14 "$regressor_tsv"'[6]' -stim_base 14 -stim_label 14 TransYd \
-stim_file 15 "$regressor_tsv"'[10]' -stim_base 15 -stim_label 15 TransZd \
-stim_file 16 "$regressor_tsv"'[14]' -stim_base 16 -stim_label 16 RotXd \
-stim_file 17 "$regressor_tsv"'[18]' -stim_base 17 -stim_label 17 RotYd \
-stim_file 18 "$regressor_tsv"'[22]' -stim_base 18 -stim_label 18 RotZd \
-stim_file 19 "$regressor_tsv"'[1]' -stim_base 19 -stim_label 19 TransX2 \
-stim_file 20 "$regressor_tsv"'[5]' -stim_base 20 -stim_label 20 TransY2 \
-stim_file 21 "$regressor_tsv"'[9]' -stim_base 21 -stim_label 21 TransZ2 \
-stim_file 22 "$regressor_tsv"'[13]' -stim_base 22 -stim_label 22 RotX2 \
-stim_file 23 "$regressor_tsv"'[17]' -stim_base 23 -stim_label 23 RotY2 \
-stim_file 24 "$regressor_tsv"'[21]' -stim_base 24 -stim_label 24 RotZ2 \
-stim_file 25 "$regressor_tsv"'[3]' -stim_base 25 -stim_label 25 TransXd2 \
-stim_file 26 "$regressor_tsv"'[7]' -stim_base 26 -stim_label 26 TransYd2 \
-stim_file 27 "$regressor_tsv"'[11]' -stim_base 27 -stim_label 27 TransZd2 \
-stim_file 28 "$regressor_tsv"'[15]' -stim_base 28 -stim_label 28 RotXd2 \
-stim_file 29 "$regressor_tsv"'[19]' -stim_base 29 -stim_label 29 RotYd2 \
-stim_file 30 "$regressor_tsv"'[23]' -stim_base 30 -stim_label 30 RotZd2 \
-stim_file 31 "$regressorCSF_tsv"'[0]' -stim_base 31 -stim_label 31 csf \
-stim_file 32 "$regressor_wm"'[0]' -stim_base 32 -stim_label 32 wm \
-fout \
-tout \
-x1D "$output_xmat" \
-xjpeg "$output_jpg" \
-jobs 2 \
-virtvec

3dREMLfit \
-input "$input" \
-matrix "$matrix" \
-mask "$mask" \
-Rbuck "$fit_output" \
-fout \
-tout \
-Rwherr "$res_output" \
-verb

My concerns are about the 3dDeconvolve call. Am I missing something important?

Thanks for your time
Gabriele

Gabriele,

The justification for including certain covariates (e.g., CSF, white matter, estimated motion effects) may be debatable, but your scripts appear to be syntactically correct to me.

Gang Chen

Dear Gang Chen,

Thanks a lot for your reply.

Gabriele