2 files

Permutation testing for non-imaging data using FSL randomise

Download all (3.7 kB)
posted on 22.11.2017, 16:19 by CJ Neurolab, Hugo C Baggio, Alexandra Abos Ortega
The randomise_non_imaging script is designed to take advantage of the functionalities of FSL randomise (https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/Randomise/) to perform GLM-based non-parametric permutation testing using non-imaging data. This can be done fairly easily with other programs, but using randomise could be convenient to FSL users, who are accustomed to creating the necessary input files.

How to make it work

System requirements:
This scripts requires FSL (https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FSL) as well as python (including the numpy (http://www.numpy.org/) and nipy (http://nipy.org/) packages), and is meant to be used in Linux systems. The necessary python packages can be easily obtained by installing Anaconda (https://www.continuum.io/downloads).

Add alias and route to .bashrc:
After unzipping randomise_non_imaging.zip, we recommend adding an alias to the user's .bashrc as an easy way to call the script from any terminal. The path to the folder containing the parameter2nifti.py script should also be specified as route_NIR in the .bashrc:

alias randomise_non_imaging='bash /full/path/to/your/folder/randomise_non_imaging.sh'
export route_NIR=/full/path/to/your/folder/

Input files:
Three basic input files are required:
1. Dependent variable matrix: text file containing the variables to be tested, consisting of one column per variable and one row for each observation. This is equivalent to the image input in randomise – and will in fact be converted to image format so it can be fed into the program
2. Design matrix (.mat)
3. Contrast matrix (.con)

Some options require additional input files:
1. F tests: requires .fts files (with the same root name as the design and contrast files)
2. Block permutation: requires exchangeability block labels .grp file (with the same root name as the design and contrast files)

Output (text) files:
1. P value file: named (output)_p_all_contrasts
2. Stats file: named (output)_stat_all_contrasts
3. F test p value file: (output)_p_F_test
4. F test stats file: (output)_Fstat
5. Corrected p value file: (output)_corrp_all_contrasts
6. Corrected F test p value file: (output)_corrp_F_test

Usage instructions are given here: https://cjneurolab.org/2017/07/21/permutation-testing-for-non-imaging-data-using-fsl-randomise/