1. In step one, you will be taking the BFmaps that the Bfold program generated and creating masks that will contain only voxels that satisfy two criteria: a certain correlation cutoff and a percent intensity change. Because of the great many command lines it would take to perform all of these transformations for all of your data, you will be using a command line loop to obtain your results. In other words, you will tell the computer to do a particular command, but do it multiple times, each time with different values and prefix names, etc. (Trust us, this should work). Starting in a participant’s directory (for our example, participant #23), you will be creating mask datasets that you will use to obtain cluster time-course information from. The best way to go about doing this is to write out the following command line program to an ASCII file, so that you can copy and paste it whenever you need it. The command line program is:

foreach [factor1] ( [level1] [level2] … [leveln] )

foreach [factor2] ( [level1] [level2] … [leveln] )

foreach orient ( tlrc orig )

foreach motion ( 23F 23)

3dcalc –a0 ${[factor1]}${[factor2]}${motion}_BFmap+${orient} –b1 ${[factor1]}${[factor2]}${motion}_BFmap+${orient} –prefix clusters[corr]${[factor1]}${[factor2]}${motion}_BFmap –expr “step(a – 0.05*max0)*step(b – [corr])”

end

end

end

end

Where:

[factor1] = the name of the first independent variable in your study. For example, “emotion”.

[factor2] = the name of the second independent variable in your study. For example, “shock”.

[leveln] = the name of level of the particular factor in your study. This must match the filename prefix. For instance, if your datasets are named HappyLowParticipant23_BFmap+tlrc, or SadHighParticipant23_BFmap+tlrc, then level1, level2, etc., must be exactly as they are in the filename prefixes (Happy for level1, and Sad for level2 of emotion). For shock, level1 and level2 would be Low and High, respectively.

[corr] = a correlation cutoff. You will need to run this entire command line a total of 4 times – once for each correlation cutoff. The cutoffs are: 0.6, 0.65, 0.7, and 0.75.

Note: If your study involves more than 2 factors, you will need to include more “foreach” command lines (and associated “end”) to the program above for each new factor.

This will have made a whole whack of datasets, organized as follows: You will have M number of tasks (M = levels of [factor1] times levels of [factor2] times levels of [factor3], etc.), each of which has 4 correlation cutoffs (0.6, 0.65, 0.7, 0.75), in both Talairach (+tlrc) and Original (+orig) orientations, for both motion corrected as well as uncorrected data. Thus, for each participant, you should have a total of (M x 4 cutoffs x 2 orientations x 2 motion correction types) mask datasets.

2. The next step is to further modify the masks that you just made, so that only clusters of a certain size are kept for the final analysis. You don’t want to be analyzing very small clusters, because they are likely to be noise instead of relevant HDR. To do this, you will again be running a command line loop (because of the large number of files that you just created). You should write this out to an ASCII file first, so that you can copy it to the command line when you need it, making the necessary adjustments. Assuming that we’re still working on the same subject (#23), the program loop is:

foreach [factor1] ( [level1] [level2] … [leveln] )

foreach [factor2] ( [level1] [level2] … [level3] )

foreach corr ( 0.6 0.65 0.7 0.75 )

foreach motion ( 23F 23 )

3dmerge –1clust 1.954 350 –prefix large${corr}${[factor1]}${[factor2]}${motion}_BFmap clusters${corr}${[factor1]}${[factor2]}${motion}_BFmap+orig

end

end

end

end

Where:

[factor1] = the name of the first independent variable in your study. For example, “emotion”.

[factor2] = the name of the second independent variable in your study. For example, “shock”.

[leveln] = the name of level of the particular factor in your study. This must match the filename prefix. For instance, if your datasets are named HappyLowParticipant23_BFmap+tlrc, or SadHighParticipant23_BFmap+tlrc, then level1, level2, etc., must be exactly as they are in the filename prefixes (Happy for level1, and Sad for level2 of factor “emotion”). For “shock”, level1 and level2 would be Low and High, respectively.

Repeat this step, replacing “orig” with “tlrc”, and “1.954” with “1.1”. Therefore, you should have 2 (step 2) ASCII files containing syntax for “orig” and “tlrc”. The value “350” is given as a recommended volume cutoff. The experimenter may want a larger or smaller volume cutoff, but a cutoff of less than 350 is not recommended, because it will result in a large number of small clusters (<350l).

3. Once you have finished steps 1 and 2 for, say, participant 23, go on to do the same command line programs for the rest of the participants. To do this, you must change directories, so that you are in the directory containing the files of the new participant. Remember to replace “23” in the command line programs with the new participant’s number appropriately (you can copy and paste the ASCII files you created for participant 23 to the command line, but make sure to change the participant’s number throughout the code). When copying and pasting to the command line, make sure that you don’t highlight the “return / enter” space at the end of the code, otherwise the program will run before you get a chance to go back and change anything.

4. You should now print out cluster reports for each of the mask datasets that you have created. Once again, you will be using a command line program that will be written out in ASCII format, and then copied into the command shell. The command line program is:

foreach [factor1] ( [level1] [level2] … [leveln] )

foreach [factor2] ( [level1] [level2] … [leveln] )

foreach corr ( 0.6 0.65 0.7 0.75 )

foreach motion ( 23F 23 )

3dclust 1.954 350 large${corr}${[factor1]}${[factor2]}${motion}_BFmap+orig > report${corr}${[factor1]}${[factor2]}${motion}_BFmap+orig

end

end

end

end

The “>” symbol redirects the output to an ASCII file, named according to the file it was taken from (large0.6HappyLow23F_BFmap’s output is saved in report0.6HappyLow23F_BFmap). In the above example, 1.954 is given as the connectivity radius, and 350 as the minimum cluster volume. This can be changed according to what the experimenter wishes to use as the cutoff. In the example, all clusters (as defined by the 1.954 mm connectivity distance), with a volume of less than 350 l will not be included in the cluster report. The experimenter may wish to use a larger or smaller volume cutoff. However, much smaller than 350 is not recommended, as it will result in a very large number of small clusters (<350l). In terms of connectivity distance, 1.954 corresponds to the connectivity of the “original” (+orig) orientation dataset masks. This is the recommended value. When you return to perform this program line code on your Talairach orientation dataset masks (+tlrc), you will need to change “1.954” to “1.1”, and “+orig” to “+tlrc”. Once you are finished running this for one participant, go back and change the values in “motion” (from 23F and 23 to new participant numbers, say 15F and 15), and run this program again for each of the subjects, and at each of the orientations (+tlrc and +orig).

5. Using the cluster reports, and the Excel Template provided, fill in the Center of Mass (CM) values for the original and Talairach orientations. Start with the original orientations, and then, numbering each new Talairach cluster (by size, starting with the largest), figure out to which Talairach cluster each of the original clusters belong. Then, looking at the *.1D files that you created, judge the soundness of each cluster as responding to the experimental task (make sure they aren’t motion confounds), and report this in the “notes” section of the Template. The template also has space for Brodmann areas. To find the Brodmann areas of each cluster, open AFNI and load up your Talairached anatomical and functional overlay. Right-click in the image viewer area, and open the “jump to (x y z)” control. Type in your Center of Mass coordinates for the desired cluster (Talairach orientation). This will bring you to the desired cluster. Without moving the crosshairs, again right-click and bring up the “Where Am I?” controls. This will give you a report of the anatomical structures and Brodmann areas within 7mm of the Center of Mass that you specified. Fill this into your Excel sheet. Remember also to fill in the mass of each cluster (the size column).

6. Complete the Excel sheets for each participant, for each of the tasks, and at each eta cutoff. This will give you a total of (# participants X # tasks X 4 cutoffs) Excel sheets. You should name each Excel file to be easily identifiable, for example: 23HappyHigh0.6.xls.