fspalm is a FreeSurfer script written to aid in the use of Permutation Analysis of Linear Models (PALM) for the correction of multiple comparisons on the surface and in the volume. PALM, written by Anderson Winkler, offers a huge number of analysis options for permutation. See fsl.fmrib.ox.ac.uk/fsl/fslwiki/PALM for more details. The purpose of fspalm is to make it relatively easy to interface with PALM, though it is still up to the user to make most of the decisions. Those using PALM should cite the appropriate articles, eg:

Winkler AM, et al. Non-Parametric Combination and related permutation tests for neuroimaging. Hum Brain Mapp. 2016 Apr;37(4):1486-511.
Winkler AM, et al, . Multi-level block permutation. Neuroimage. 2015;123:253-68.
Winkler AM, et al, . Faster permutation inference in brain imaging. Neuroimage. 2016 Jun 7;141:502-516

Before using fspalm, download PALM from fsl.fmrib.ox.ac.uk/fsl/fslwiki/PALM and add it to your matlab path. You must also have these two FreeSurfer paths in your matlab path (if not there already): $FREESURFER_HOME/matlab and $FREESURFER_HOME/fsfast/toolbox

To use fspalm, first run mri_glmfit to get a glm folder. This folder will contain the contrasts as specified with the --C option to mri_glmfit as well as all the other mri_glmfit output. An example command line is

fspalm --glmdir glmdir --cft 1.3 --name mypalm --iters 1000
--glmdir is the output folder of mri_glmfit
--cft 1.3 is the voxel-wise cluster forming threshold as -log10(p). for cft = 1.3, p=.05
--iters 1000 means to run 1000 permutation iterations
--name mypalm means to create a folder called mypalm in glmdir where the PALM output will be stored

This command will do several things. First it will convert the design and contrast matrices to design.mat and design.con files expected by PALM. It will create a matlab file called run_palm.m where it will create a palm command line. It will then run 1000 permutations and save the output with a base name of fsp (eg, fsp_clustere_tstat_fwep_c2.mgz).

Another use case is to have fspalm just prepare the design and command line files so that the user can then customize the run_palm.m file to his/her liking. To do this, just add --monly.