Group Analysis: Visual/Motor Activation
This tutorial covers group analysis via batch scripting and various AFNI functions: sswarper2 (for converting data to standard space), afniproc.py (for individual subject preprocessing), and gen_group_command.py (for group-level statistics with 3dttest++ or 3dMEMA).
Workflow Overview

The basic flow of this pipeline is as follows:
First-Level Analysis:
Download data from XNAT and automatically convert it to BIDS format using xnat2bids
Convert psychopy timing files to be used by AFNI
Prepare fMRI data for preprocessing by warping to standard space (using sswarper2)
Use afni_proc.py to create a preprocessing stream and run the general linear model per subject
Second-Level Analysis:
Use gen_group_command.py to build and run your statistical tests
Compute a group intersection mask
Calculate the average smoothness across participants
Use 3dClustSim to simulate noise and determines what cluster sizes are needed to control false positives
Use 3dClusterize to apply the thresholds to your group-level statistical maps from 3dMEMA. It outputs final significant clusters and effect estimate maps
Last updated
Was this helpful?