Indiana University AFNI / FreeSurfer Workshop 2019
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:
MRIcroGL and a sample dataset: Used for converting DICOM to NIFTI files.
makeTimings.sh: Creates timing files needed for estimating GLMs
proc_Flanker.sh: Contains code needed to preprocess the data and fit a GLM
run_AFNI_Preproc.sh: Runs the scripts makeTimings.sh and proc_Flanker.sh for subjects #1-#5.
SUMA_proc_MNI.sh: Contains code for analyzing fMRI data on a surface.
runFS_Suma.sh: Analyzes the anatomical datasets of subjects #1-#5 with FreeSurfer, and and runs the SUMA_proc script.
Flanker_inc-con_Group.sh: Performs a group-level analysis on subjects #1-#5
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
(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)
(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: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
(12:00pm-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 collinearity
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
Group-level analysis with 3dttest++ and 3dMEMA
(3:00pm-3:25pm) 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. An analysis script will also be provided which can be used to analyze several subjects at once.
(3:25pm-3:30pm) Group Photo
(3:30pm-5:00pm) Individual Assistance
Andy will help individuals (or small groups of individuals) with their data. One session runs from 3:30pm-4:15pm, and the second one runs from 4:15pm-5:00pm. These meetings will be set up ahead of the workshop.
After the first day is done, you can submit questions anonymously using this form.
Day 2: FreeSurfer, SUMA, and Analyses on the Cortical Surface
Agenda
(9:00am - 10: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
(10:30am-12: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
(12:00pm-1:00pm) LUNCH BREAK
(1: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
(4:00pm-5:30pm) Individual Assistance
As with the previous day, Andy will help individuals (or small groups of individuals) with their data. One session runs from 4:00pm-4:45pm, and the second one runs from 4:45pm-5:30pm. These meetings will be set up ahead of the workshop.