Table 5.
#!/bin/tcsh # Set top level directory structure set subjID = $1 set currDir = 'pwd’ set anatDir =./freesurfer.anat/${subjID}/mri set epiDir = afni set stimDir = stim.files # miscellaneous parameters or options set motion_max = 1.0; set delete_nfirst = 4; set costfunc = lpc+zz # run afni_proc.py to create a single subject processing script afni_proc.py ‐subj_id ${subjID}\ ‐script proc.script.FINAL.1.20.17.${subjID} ‐scr_overwrite\ ‐blocks despike tshift align tlrc volreg blur mask scale regress\ ‐copy_anat $anatDir/brainmask.nii\ ‐tcat_remove_first_trs $delete_nfirst\ ‐dsets $epiDir/r01+orig $epiDir/r02+orig $epiDir/r03+orig\ ‐blur_size 5 ‐out_dir NL.results\ ‐anat_unif_GM no ‐anat_has_skull no ‐tlrc_NL_warp\ ‐volreg_align_e2a ‐volreg_align_to MIN_OUTLIER ‐volreg_tlrc_warp\ ‐align_opts_aea ‐cost $costfunc ‐giant_move ‐AddEdge\ ‐regress_stim_times\ $stimDir/${subjID}n_A_timing.1D\ $stimDir/${subjID}a50_timing.1D\ $stimDir/${subjID}a100_timing.1D\ $stimDir/${subjID}a150_timing.1D\ $stimDir/${subjID}n_F_timing.1D\ $stimDir/${subjID}f50_timing.1D\ $stimDir/${subjID}f100_timing.1D\ $stimDir/${subjID}f150_timing.1D\ $stimDir/${subjID}n_H_timing.1D\ $stimDir/${subjID}h50_timing.1D\ $stimDir/${subjID}h100_timing.1D\ $stimDir/${subjID}h150_timing.1D\ $stimDir/${subjID}w_timing.1D\ ‐regress_stim_labels\ n_A a50 a100 a150 n_F f50 f100 f150 n_H h50 h100 h150 w\ ‐regress_local_times ‐regress_censor_outliers 0.1\ ‐regress_basis 'BLOCK(2,1)’ ‐regress_censor_motion $motion_max\ ‐regress_est_blur_epits ‐regress_est_blur_errts\ ‐regress_reml_exec ‐regress_compute_fitts ‐regress_opts_3dD\ ‐allzero_OK ‐regress_opts_reml ‐GOFORIT\ ‐regress_make_ideal_sum sum_ideal.1D\ ‐gltsym 'SYM: +n_A +a50 +a100 +a150 +n_F +f50 +f100 +f150 +n_H +h50 +h100 +h150 ’\ ‐glt_label 1 Positive_Control tcsh ‐xef proc.script.${subjID} |& tee proc.script.${subjID}.output |
Note. To implement across the group, one simply loops through a list of subjects, entering the given file name as the sole command line argument, which is passed to the variable $subjID. Here, stimulus variables are encoded as: h = happy, n = neutral, f = fearful, w = wrong; and each is followed by the duration (50, 100, 150 s).