Let a(r) be the association model assigned for ROI r in Table I and l(r) be the corresponding SNP locus
Let GT(s, l(r)) be the genotype of subject s at SNP locus l(r)
for each subject s do
Calculate PT(s, r), the phenotype group of its ROI r, using GT(s, l(r)), a(r) and Table II
Let m be the total number of subjects whose ROI r's are in phenotype group P+, i.e., m = |{s|PT(s, r) = P+}|
Let n be the total number of subjects whose ROI r's are in phenotype group P−, i.e., n = |{s|PT(s,r) = P−}|
Let f(x) be the modulation function defined in Fig. 5.
for each voxel x in the ROI r of each subject s do
Let Iorig(x) be the original voxel value
if PT(s, r) = P+ then
else if PT(s, r) = P− then
Inew(x) = Iorig(x) * (1 − f(x))
Let Inew(x) be the new voxel value after modulation