Hi there,
I am running a regression using afni_proc.py.
I want to contrast one condition against the average of the others. I have put this in as I think it should go using the general linear tests in the regression block (gltsym), but wondered if anyone could confirm I have entered this correctly. I had a read of various other posts on the forum, but could not find a similar question.
Thank you for your help,
H
AFNI version info (afni -ver
):
Precompiled binary linux_ubuntu_24_64: Oct 1 2024 (Version AFNI_24.3.00 'Elagabalus')
#!/bin/tcsh
# Set up participant details
set sub = sub-TS
set ses = ses-01
# Set up directories
set base_dir = $pwd
set script_dir = $base_dir/scripts
set data_base_dir = $base_dir/data/$sub/$ses
# Set up files
set extension = .nii.gz
set anat_raw_dir = $data_base_dir/anat
set anat_raw = ${sub}_acq-MP2RAGE_T1w
set anat_ss_dir = $base_dir/derivatives/hdbet/$sub/$ses
set anat_ss = ${anat_raw}_SS
set data_dir = $data_base_dir/func
set data_base = ${sub}_acq-BodyLoc_HIRF
set blip_rev_base = ${sub}_acq-BodyLoc_PA_HIRF
set surf_dir = $base_dir/derivatives/FastSurfer/output/${sub}_${ses}/SUMA
set surf_anat = ${sub}_${ses}_SurfVol.nii
set surf_spec = ${sub}_${ses}_lh.spec
# Get stimulus timing file names
set stimuli_loc = $base_dir/stimuli/$sub/$ses
cd $stimuli_loc
set stim1_la = BodyLoc_${sub}_${ses}_*_ONSETSFIX_leftarm.txt
set stim2_lf = BodyLoc_${sub}_${ses}_*_ONSETSFIX_leftfoot.txt
set stim3_lh = BodyLoc_${sub}_${ses}_*_ONSETSFIX_lefthand.txt
set stim4_l = BodyLoc_${sub}_${ses}_*_ONSETSFIX_lips.txt
set stim5_ra = BodyLoc_${sub}_${ses}_*_ONSETSFIX_rightarm.txt
set stim6_rf = BodyLoc_${sub}_${ses}_*_ONSETSFIX_rightfoot.txt
set stim7_rh = BodyLoc_${sub}_${ses}_*_ONSETSFIX_righthand.txt
cd $script_dir
# Set blur
set blur_size = 3
# Script
afni_proc.py \
-subj_id ${sub}_${ses} \
-dsets $data_dir/${data_base}${extension} \
-blip_forward_dset $data_dir/${data_base}${extension}'[194..204]' \
-blip_reverse_dset $data_dir/${blip_rev_base}${extension} \
-blocks tcat despike align volreg surf blur scale regress \
-copy_anat $anat_ss_dir/${anat_ss}${extension} \
-anat_has_skull no \
-anat_follower orig_anat_w_skull anat $anat_raw_dir/${anat_raw}${extension} \
-surf_anat $surf_dir/$surf_anat \
-surf_spec $surf_dir/$surf_spec \
-tcat_remove_first_trs 0 \
-align_opts_aea -giant_move \
-partial_coverage \
-cost lpc \
-align_unifize_epi local \
-volreg_align_e2a \
-volreg_align_to MIN_OUTLIER \
-volreg_post_vr_allin yes \
-volreg_pvra_base_index MIN_OUTLIER \
-volreg_interp -Fourier \
-volreg_warp_final_interp wsinc5 \
-volreg_compute_tsnr yes \
-blur_size $blur_size \
-regress_stim_times \
$stimuli_loc/$stim1_la \
$stimuli_loc/$stim2_lf \
$stimuli_loc/$stim3_lh \
$stimuli_loc/$stim4_l \
$stimuli_loc/$stim5_ra \
$stimuli_loc/$stim6_rf \
$stimuli_loc/$stim7_rh \
-regress_stim_labels leftarm \
leftfoot \
lefthand \
lips \
rightarm \
rightfoot \
righthand \
-regress_basis 'BLOCK(9.9,1)' \
-regress_opts_3dD -gltsym 'SYM: leftarm-((leftfoot+lefthand+lips+rightarm+rightfoot+righthand)/6)' \
-glt_label 1 leftarm-others \
-gltsym 'SYM: leftfoot-((leftarm+lefthand+lips+rightarm+rightfoot+righthand)/6)' \
-glt_label 2 leftfoot-others \
-gltsym 'SYM: lefthand-((leftarm+leftfoot+lips+rightarm+rightfoot+righthand)/6)' \
-glt_label 3 lefthand-others \
-gltsym 'SYM: lips-((leftarm+leftfoot+lefthand+rightarm+rightfoot+righthand)/6)' \
-glt_label 4 lips-others \
-gltsym 'SYM: rightarm-((leftarm+leftfoot+lefthand+lips+rightfoot+righthand)/6)' \
-glt_label 5 rightarm-others \
-gltsym 'SYM: rightfoot-((leftarm+leftfoot+lefthand+lips+rightarm+righthand)/6)' \
-glt_label 6 rightfoot-others \
-gltsym 'SYM: righthand-((leftarm+leftfoot+lefthand+lips+rightarm+rightfoot)/6)' \
-glt_label 7 righthand-others \
-regress_censor_motion 0.3 \
-regress_censor_outliers 0.05 \
-regress_make_ideal_sum sum_ideal.1D \
-html_review_style basic