Milwaukee AFNI Workshop 2018

Below is an annotated agenda for the workshop. To prepare for the course, do the following steps:

1. Get Started with Unix

This workshop requires you to be familiar with Unix. Watch this playlist for an introduction to Unix, and go through the tutorials located here. It is also recommended that you install Xcode from the Apple Store. (This makes it easier to view and edit scripts.)

2. Install AFNI

Use this link to install AFNI. Follow the instructions for downloading and installing AFNI on a Macintosh. A tutorial video for installing AFNI and testing your installation will be uploaded soon.

3. Download the Data

We will be using this dataset from for the practicals. This dataset uses the Flanker task, a robust measure of cognitive control.

4. Download Programs and Scripts

Some of the practical sessions require downloading an application or analysis script. Here is a list of links to the relevant applications and analysis scripts, which can also be found in the agenda below.


Day 1: fMRI Fundamentals and an Introduction to AFNI



(9:00am-10:15am) Review of fMRI Data Processing and Analysis (Lecture)
This will be a brief overview of what is done with fMRI data from start to finish in a typical pipeline. This lecture will cover:

  • Hemodynamics and the BOLD signal

  • The BOLD signal and linearity

  • Understanding preprocessing: motion correction, registration, normalization, and smoothing

  • From scanner to computer: Converting DICOM files to NIFTI with MRIcroGL (exercise dataset can be downloaded here)

  • Power analysis for fMRI studies

(10:15am-11:30am) Preprocessing the individual subject (Practical)
This first practical will be a guided hands-on tutorial about how to process fMRI data. We will review the following topics:

  • Skull Stripping

  • Registration of T1 and T2-weighted data

  • Slice timing correction, registration, and smoothing size

  • Non-linear warping

  • Troubleshooting preprocessing failures

(11:30am-12:15pm) Viewing results with the AFNI GUI (Practical)
We will tour the AFNI data visualization GUI, which is useful for understanding fMRI data conceptually – for example, the connection between the canonical HRF and beta weights.

  • Touring the AFNI GUI

  • Overlays, underlays, and thresholds

  • Atlases

  • Using Clusterize

(12:15pm-1:00pm) LUNCH BREAK

(1:00pm-2:00pm) First-level analysis and the general linear model (Lecture & Practical)
How to set up the GLM for an individual subject and generate parameter estimates.

  • Overview of the GLM

  • How the GLM relates to fMRI data

  • Beta values, parameter estimates, and variability

  • Design matrices

  • Custom timing files, and how to make OpenNeuro timing files compatible with AFNI.

(2:00pm-3:00pm) Group-level analysis (Lecture & Practical)
An overview of how to set up group-level analyses, as well as caveats to be aware of. The lecture will cover the basic mechanisms of group analysis, and correction issues unique to fMRI data. We will also briefly discuss the findings of Eklund et al. (2016).

  • Setting up group-level analyses

  • T-tests and F-tests: How to set them up and when to use them

  • Correction mechanisms: FWE, FDR, and cluster-forming thresholds

  • Beyond the basics: Programs available for group-level analyses (e.g., 3dLME, 3dMEMA)

(3:00pm-4:00pm) General Q&A / Extended Practice Time
This is an opportunity to ask questions about any of the topics covered during the day, as well as practice any of the steps we have discussed so far.

After the first day is done, you can submit questions anonymously using this form.

Day 2: ROI Analysis, Graph Theory, and MVPA



(9:00am - 11:00am) Region of Interest (ROI) analysis & Scripting (Lecture & Practical)
This expands upon the group-level analysis lecture by demonstrating different methods for performing inferential statistics.

  • Anatomical vs. Spherical ROIs

  • Testing for double dissociations

  • ROI analysis

  • Review of shell scripting

  • Looping your analysis over subjects

(11:00am-12:00pm) Introduction to Graph Theory (Lecture)
This lecture will provide a conceptual overview of graph theory. Participants who are interested in applying graph theory to data are encouraged to look for datasets available at

  • Introduction to graph theory terminology: Nodes, edges, and modularity

  • Community structures and network differences between populations

  • Thresholding and community detection

  • Applications of graph theory for basic and clinical research

(12:00pm-12:45pm) LUNCH BREAK

(12:45pm-3:45pm) Introduction to Multivariate Pattern Analysis (MVPA) (Lecture & Practical)
This session will provide an overview of MVPA, a popular multivariate tool for neuroimaging data.

  • Overview of Machine Learning and hyperplanes

  • Uses of MVPA

  • Experimental design considerations for studies that will use MVPA

  • Creating testing and training datasets

  • Using AFNI’s 3dsvm

(3:45pm-4:30pm) General Q&A / Extended Practice Time