14.2.1. Chao & Torrisi (2026). Effects of predicted Khamisiyah exposure on default mode network …¶
Introduction¶
Here we present commands used in the following paper:
- Chao LL, Torrisi S (2026). Effects of predicted Khamisiyah exposure on default mode network resting state functional connectivity in Gulf War Veterans. Front Toxicol. 8:1772515.
Abstract:
Introduction:
Potentially more than 100,000 US troops were exposed to organophosphorus (OP) nerve agents when an ammunition bunker at Khamisiyah, Iraq was destroyed shortly after the end of the 1991 Gulf War (GW). We previously reported evidence of differences in brain structure and function in GW veterans with predicted exposure to the Khamisiyah plume compared to veterans without predicted exposure. Here, we investigate the effects of predicted exposure to the Khamisiyah plume on brain functional connectivity in the default mode network (DMN).
Methods:
Forty-one GW veterans (19 with and 22 without predicted exposure) underwent structural and resting-state magnetic resonance imaging (MRI) on a 3 Tesla scanner. Differences in DMN connectivity between veterans with and without predicted Khamisiyah exposure were examined using a left posterior cingulate cortex (PCC) seed-based analysis in AFNI. FreeSurfer was used to derive quantitative estimates of total hippocampal volume. The veterans were also assessed with the Conners Continuous Performance Test (CPT).
Results:
Compared to veterans without predicted exposure, those with predicted Khamisiyah exposure demonstrated weaker connectivity between the left PCC and a cluster in the caudal right anterior cingulate cortex (ACC). Veterans with predicted exposure also had smaller left hippocampal volume compared to unexposed veterans.
Discussion:
Although the cross-sectional nature of this study precludes conclusions about causality, the finding of decreased DMN functional connectivity in GW veterans with predicted Khamisiyah exposure warrants replication in a larger, independent sample. If confirmed, this result would add to the literature suggesting persistent differences in brain function between deployed GW veterans with and without predicted Khamisiyah exposure and argue for further investigation into the long-term effects of GW-deployment related exposures.
Main programs:
dcm2niix_afni, sswarper2, afni_proc.py, 3dmaskave,
3dTcorr1D, 3dMean, 3dcalc, 3dresample, 3dttest++
Download scripts¶
To download, either:
... click the link(s) in the following table (perhaps Rightclick -> “Save Link As…”):
show major processing steps in single file
... or copy+paste into a terminal:
curl -O https://afni.nimh.nih.gov/pub/dist/doc/htmldoc/codex/fmri/media/2026_ChaoTorrisi/s1.processing_cmds.tcsh
View scripts¶
The script shown here contains major processing steps/stages used in the associated paper.
s1.processing_cmds.tcsh¶
1#!/bin/tcsh
2
3# Main commands and code blocks used in:
4
5# Chao LL, Torrisi S. Effects of predicted Khamisiyah exposure on
6# default mode network resting state functional connectivity in Gulf War
7# Veterans. Front Toxicol. 2026 Mar 5;8:1772515.
8# doi:10.3389/ftox.2026.1772515. PMID: 41858729; PMCID: PMC12999065.
9#
10# Most of the sections are here independent code snippets for both
11# per-subject and group-level steps. As such, most paths are left out
12# of commands, for brevity and readability.
13#
14# Note: although the paper does not refer to the acronym "VAS", the
15# code does; it is just internal shorthand for "VA Sarin".
16#
17# A couple of the variables used throughout
18#
19# subj : subject ID
20# ssw_dir : directory storing outputs of sswarper2
21#
22# ============================================================================
23
24# convert to DICOM format files to NIFTI format files
25
26dcm2niix_afni -z y -f "${subj}_rs" VAS*fmri*/*.IMA
27dcm2niix_afni -z y -f "${subj}_t1" VAS*t1_mpr*/*.IMA
28
29# ============================================================================
30
31# execute sswarper2 (SSW): skullstrip the T1w anatomical and estimate
32# nonlinear warp to MNI template space
33
34sswarper2 \
35 -input VAS*mpr*/VAS*_t1_crop.nii.gz \
36 -base MNI152_2009_template_SSW.nii.gz \
37 -aniso_off \
38 -odir ${ssw_dir} \
39 -subid ${subj}
40
41# ============================================================================
42
43# Run afni_proc.py (AP) for full single subject processing.
44#
45# Notes:
46# + "-ShowMeClassicFWHM" is used to see directional smoothness
47# estimates provided by the older ("classic") Gaussian method. These
48# smoothness values are not used for clustering, but instead for
49# separate, directional checks.
50
51afni_proc.py \
52 -subj_id ${subj} \
53 -script proc.${subj} \
54 -out_dir ${subj}.results \
55 -blocks despike tshift align tlrc volreg mask blur \
56 scale regress \
57 -radial_correlate_blocks tcat volreg \
58 -copy_anat ${ssw_dir}/aanatSS.VAS???-?.nii \
59 -anat_has_skull no \
60 -anat_follower anat_w_skull anat VAS*/VAS*_t1.nii.gz \
61 -dsets VAS*/VAS*_rs.nii.gz \
62 -tcat_remove_first_trs 2 \
63 -align_unifize_epi local \
64 -align_opts_aea -cost lpc+ZZ \
65 -check_flip \
66 -tlrc_base MNI152_2009_template_SSW.nii.gz \
67 -tlrc_NL_warp \
68 -tlrc_NL_warped_dsets ${ssw_dir}/anatQQ.VAS???-?.nii \
69 ${ssw_dir}/anatQQ.VAS???-?.aff12.1D \
70 ${ssw_dir}/anatQQ.VAS???-?_WARP.nii \
71 -volreg_align_to MIN_OUTLIER \
72 -volreg_align_e2a \
73 -volreg_tlrc_warp \
74 -volreg_compute_tsnr yes \
75 -mask_epi_anat yes \
76 -blur_size 5 \
77 -regress_censor_motion 0.5 \
78 -regress_censor_outliers 0.05 \
79 -regress_anaticor_fast \
80 -regress_apply_mot_types demean deriv \
81 -regress_est_blur_errts \
82 -regress_run_clustsim yes \
83 -regress_opts_fwhmx -ShowMeClassicFWHM \
84 -html_review_style pythonic \
85 -execute
86
87# ============================================================================
88
89# After spherical seed in the PCC was "undumped", calculate average
90# time series and make a whole-brain correlation map of Fisher
91# Z-values (run per subject, in the AP results dir)
92
933dmaskave \
94 -quiet \
95 -mask vas_pcc_sphere6.nii \
96 errts.${subj}.fanaticor+tlrc. \
97 > ${subj}_r6_pcc_fa.1D
98
993dTcorr1D \
100 -prefix ${subj}_pcc_6mm_seed_fa.nii.gz \
101 -Fisher \
102 errts.${subj}.fanaticor+tlrc. \
103 ${subj}_r6_pcc_fa.1D
104
105# ============================================================================
106
107# Intermediate code to get thresholded mask mean intersected with GM
108# to use for group stats and cluster correction:
109
110# After afni_proc.py finishes, get an averaged and then thresholded
111# mask from all subjs.
112
113# The mask is thresholded because we do not wish to perform stats on
114# regions with high signal dropout.
1153dMean \
116 -prefix vas_avg_mask.nii.gz \
117 subjects*.results/mask_epi_anat.*.HEAD
118
1193dcalc \
120 -a vas_avg_mask.nii.gz \
121 -expr 'step(a-0.75)' \
122 -prefix vas_avg_mask_75p.nii.gz
123
124# Get a template GM mask, resampled to EPI grid and then intersected
125# with vas_avg_mask_75p.nii.gz.
1263dresample \
127 -input '~/abin/MNI152_2009_template_SSW.nii.gz[4]' \
128 -master vas_avg_mask_75p.nii.gz \
129 -prefix MNI152_2009_template_gm_rs.nii.gz
130
1313dcalc \
132 -a MNI152_2009_template_gm_rs.nii.gz \
133 -b vas_avg_mask_75p.nii.gz \
134 -expr 'a*b' \
135 -prefix vas_ave_mask_75p_gm.nii.gz
136
137# Extract ACF coeficients:
138gen_ss_review_table.py \
139 -write_table vas_review_table.xls \
140 -infiles subjects*.results/out.ss_rev*.txt
141# ... and vas_review_table.xls was simply brought into Excel to
142# average ACF coefficients.
143
144# And 3dClustSim used the final group GM mask and those averaged ACFs:
1453dClustSim \
146 -prefix VAS_group_75p_gm \
147 -mask vas_avg_mask_75p_gm.nii.gz \
148 -LOTS \
149 -iter 50000 \
150 -acf 0.70094065 3.69261775 12.65456525
151
152# Finally, the output "VAS_group_75p_gm.NN2_bisided.1D" was used to
153# cluster-correct group stats obtained thusly:
154
155# =================================
156
1573dttest++ \
158 -prefix vas_pcc_sarin_compare.nii.gz \
159 -setA sarinYes \
160 014-2 "pcc_corr_maps/VAS014-2_pcc_6mm_seed_fa.nii.gz" \
161 028-2 "pcc_corr_maps/VAS028-2_pcc_6mm_seed_fa.nii.gz" \
162 030-2 "pcc_corr_maps/VAS030-2_pcc_6mm_seed_fa.nii.gz" \
163 034-2 "pcc_corr_maps/VAS034-2_pcc_6mm_seed_fa.nii.gz" \
164 047-2 "pcc_corr_maps/VAS047-2_pcc_6mm_seed_fa.nii.gz" \
165 054-2 "pcc_corr_maps/VAS054-2_pcc_6mm_seed_fa.nii.gz" \
166 060-2 "pcc_corr_maps/VAS060-2_pcc_6mm_seed_fa.nii.gz" \
167 061-2 "pcc_corr_maps/VAS061-2_pcc_6mm_seed_fa.nii.gz" \
168 062-2 "pcc_corr_maps/VAS062-2_pcc_6mm_seed_fa.nii.gz" \
169 063-2 "pcc_corr_maps/VAS063-2_pcc_6mm_seed_fa.nii.gz" \
170 070-2 "pcc_corr_maps/VAS070-2_pcc_6mm_seed_fa.nii.gz" \
171 090-2 "pcc_corr_maps/VAS090-2_pcc_6mm_seed_fa.nii.gz" \
172 096-2 "pcc_corr_maps/VAS096-2_pcc_6mm_seed_fa.nii.gz" \
173 107-2 "pcc_corr_maps/VAS107-2_pcc_6mm_seed_fa.nii.gz" \
174 114-2 "pcc_corr_maps/VAS114-2_pcc_6mm_seed_fa.nii.gz" \
175 115-2 "pcc_corr_maps/VAS115-2_pcc_6mm_seed_fa.nii.gz" \
176 149-2 "pcc_corr_maps/VAS149-2_pcc_6mm_seed_fa.nii.gz" \
177 262-1 "pcc_corr_maps/VAS262-1_pcc_6mm_seed_fa.nii.gz" \
178 283-1 "pcc_corr_maps/VAS283-1_pcc_6mm_seed_fa.nii.gz" \
179 -setB sarinNo \
180 065-2 "pcc_corr_maps/VAS065-2_pcc_6mm_seed_fa.nii.gz" \
181 071-2 "pcc_corr_maps/VAS071-2_pcc_6mm_seed_fa.nii.gz" \
182 116-2 "pcc_corr_maps/VAS116-2_pcc_6mm_seed_fa.nii.gz" \
183 118-2 "pcc_corr_maps/VAS118-2_pcc_6mm_seed_fa.nii.gz" \
184 121-2 "pcc_corr_maps/VAS121-2_pcc_6mm_seed_fa.nii.gz" \
185 124-2 "pcc_corr_maps/VAS124-2_pcc_6mm_seed_fa.nii.gz" \
186 157-2 "pcc_corr_maps/VAS157-2_pcc_6mm_seed_fa.nii.gz" \
187 182-2 "pcc_corr_maps/VAS182-2_pcc_6mm_seed_fa.nii.gz" \
188 243-1 "pcc_corr_maps/VAS243-1_pcc_6mm_seed_fa.nii.gz" \
189 248-1 "pcc_corr_maps/VAS248-1_pcc_6mm_seed_fa.nii.gz" \
190 259-1 "pcc_corr_maps/VAS259-1_pcc_6mm_seed_fa.nii.gz" \
191 263-1 "pcc_corr_maps/VAS263-1_pcc_6mm_seed_fa.nii.gz" \
192 265-1 "pcc_corr_maps/VAS265-1_pcc_6mm_seed_fa.nii.gz" \
193 266-1 "pcc_corr_maps/VAS266-1_pcc_6mm_seed_fa.nii.gz" \
194 269-1 "pcc_corr_maps/VAS269-1_pcc_6mm_seed_fa.nii.gz" \
195 270-1 "pcc_corr_maps/VAS270-1_pcc_6mm_seed_fa.nii.gz" \
196 274-1 "pcc_corr_maps/VAS274-1_pcc_6mm_seed_fa.nii.gz" \
197 275-1 "pcc_corr_maps/VAS275-1_pcc_6mm_seed_fa.nii.gz" \
198 276-1 "pcc_corr_maps/VAS276-1_pcc_6mm_seed_fa.nii.gz" \
199 278-1 "pcc_corr_maps/VAS278-1_pcc_6mm_seed_fa.nii.gz" \
200 279-1 "pcc_corr_maps/VAS279-1_pcc_6mm_seed_fa.nii.gz" \
201 -covariates covariate.txt'[1]' \
202 -center SAME \
203 -mask vas_avg_mask_75p_gm.nii.gz
204
205# =================================
206
207# Create anatomical underlay for viewing final results:
2083dMean -prefix vas_avg_anat.nii.gz subjects*.results./anat_final.*HEAD
209
210# =================================
211# Following these steps other miscellaneous smallish scripts were written
212# in tcsh to pull betas (3dROIstats), or in R to correlate w/ behavior
213# or self-reports or to address reviewer comments.
214# For example, vas_review_table.xls above was also used to demonstrate that
215# there were no between-group differences in 3 head motion parameters.