University of Wisconsin-Milwaukee AFNI / FreeSurfer Workshop 2021

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 and TextWrangler from the Apple Store, which are useful for creating and editing 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 has been uploaded here.

3. Install FreeSurfer

Use this link to install FreeSurfer, and follow the instructions for downloading and installing the program on a Macintosh. A tutorial video for installing FreeSurfer can be found here. (Note: In contrast to the video, do both the tcsh and bash setups for your installation; this avoids certain syntax issues later.)

4. Download the Data

We will be using this dataset from openneuro.org for the practicals. This dataset uses the Flanker task, which is designed to tap into cognitive control. Download and unzip the dataset, move it to your Desktop, and rename it to “Flanker”.

5. 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:

Download all of these scripts and place them in the Flanker folder. If you open up a Terminal, navigate to the Flanker directory by typing “cd Desktop/Flanker” and then type “ls”, you should see something like this:

Run the scripts by typing “bash run_AFNI_Preproc.sh”. This will take about 40-50 minutes to run, depending on the speed of your computer. When it is finished, type “bash runFS_SUMA.sh” and press return. This will analyze subjects #1-#5 with FreeSurfer, and will take 20-30 hours; I recommend leaving this to run overnight or over a weekend.

 


Day 1: fMRI Fundamentals and an Introduction to AFNI

Agenda

(10:00am-11: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)

(11:15am-12: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

(12:30pm-1:30pm) LUNCH BREAK

(1:30pm-2:00pm) 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

  • Checking preprocessing before and after each step

(2:00pm-3: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 collinearity

  • Design matrices

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

(3:00pm-4: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

  • Group-level analysis with 3dttest++ and 3dMEMA

Day 2: FreeSurfer, SUMA, and Analyses on the Cortical Surface

Agenda

(10:00am - 11:30am) Region of Interest (ROI) analysis (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

  • What not to do: Biased & Circular Analysis

(11:30am-1:00pm) Introduction to FreeSurfer (Lecture)
This lecture will provide an overview of FreeSurfer, a popular software package for analyzing structural data. Instructions for how to install FreeSurfer and process a single subject will be sent out ahead of the workshop.

  • Introduction to FreeSurfer terminology: vertices, edges, parcellations, and segmentations

  • Viewing data in freeview

  • The FSGD file and single-subject modeling

  • Overview of failure modes

1:00pm Group Photo

(1:00pm-2:00pm) LUNCH BREAK

(2:00pm-4:00pm) Integrating FreeSurfer with AFNI (Lecture & Practical)
This session will provide an overview of SUMA, a separate software package that allows the user to analyze fMRI data on a cortical surface generated by FreeSurfer.

  • Benefits of surface analysis

  • Preparing the surface data for AFNI

  • Quality checks of the surface data

  • Overview of the SUMA interface

  • Statistical modeling and multiple comparisons correction with SUMA