This is a tutorial giving an overview of an fMRI preprocessing pipeline developed by GG and members of the O’Doherty lab. It is based on Nipype workflow, and uses an ICA-based approach for data cleaning. The script is available here.
The pipeline is a shell script which means that it can be run remotely with minimised dependencies. The pipeline relies, however, on installs of:
The pipeline consists of 7 modularised scripts which perform the following actions:
- Reorientation/fieldmapping
- ICA
- Classification and component removal
- Fieldmap correction
- Structural normalisation
- Functional normalisation
- Smoothing
The following describes the pipeline, as well as some extra steps described in the tutorial, in greater detail.
This should consist of a manual inspection of the data to ensure standard quality. This includes structural and functional data, as well as any field maps or physiological measures collected. At this point it is also a good idea to rename or reorganise the data in a standard way (e.g. BIDS).
This first consists or realigning the data to a standard, and running the brain extraction tool (BET) to isolate brain tissue from non-brain tissue (bone, ventricles, etc.). Secondly, any collected fieldmaps are also reoriented to this standard, and prepared for future field correction.
This is carried out by the first module of the script, 01.Reorient_Preprocess_Fieldmaps.sh.
This next step runs MELODIC independent component analysis (ICA) on the data, which will identify the key components that account for the most variance in space and time. These components can be viewed using the Melview tool. Note that at this point the raw data is not affected.
This is carried out by the second module of the script, 02.Run_ICA_Analysis.sh.
This next step relies on FIX, a support vector machine classifier which applies noise/signal labels to the ICA components.
This classifier has been trained on a number of different samples, two of which are in-house samples (i.e. from the Caltech scanner, using behavioural tasks similar to those used in the lab) provided here. These are specific to data acquired using either a TR of 2.5-3 secs, with 3 mm voxels, or using multiband EPI with a 1 sec TR and 2.5 mm voxels.
There are also some pre-trained classifiers available on the FIX website. In general, it is recommended to use a custom trained classifier, optimised for the scanner and experiment.
Once these are classified, the script then removed the noise components from the data.
However, note that it is possible in general to view and amend the classification labels prior to removal of the components.
This is carried out by the third module of the script, 03.Apply_ICA_Denoising.sh. Note that the script requires a pointer toward the desired classifier.
This applies fieldmap correction to the structural and functional data.
This is carried out by the fourth module of the script,
04.Apply_Fieldmaps_Spatial_Unwarping.sh.
The next step carries out normalisation using ANTs, before the structural and function data are aligned together.
Note that this also re-runs BET for the functional image.
This is carried out by the fifth (05.Compute_Structural_Warp.sh) and sixth (06.Compute_Functional_Warp.sh) modules of the script.
Finally, a gaussian kernel is applied to smooth the data.
This is carried out by the final module of the script, 07.Apply_Spatial_Smoothing.sh.
