Resting-state BOLD imaging

Data preparation

To automate the processing steps, imaging files should be named and stored in a predefined way in this pipeline. Specifically, there should be a cohortFolder, which includes multiple studyFolder (studyFolder can be subject ID’s). In each studyFolder, there should exist a T1-weighted scan (named struc.nii), a resting-state BOLD imaging scan (named func.nii), and if images in reverse PE directions for distortion correction were acquired, ap.nii and pa.nii (e.g., MAS2 data).

cohortFolder --- studyFolder_1 (ie. subjID) - struc.nii, func.nii, ap.nii, pa.nii
          |
          |--- studyFolder_2 (ie. subjID) - struc.nii & func.nii
          |
          |--- studyFolder_3 (ie. subjID) - struc.nii & func.nii

Visual inspection of image quality

It is always a good idea to visualise func.nii and struc.nii to identify any defects.

Generate lists

Generate lists, so that the processing steps can be applied to all subjects. Depending on the following denoising strategy, lists can be generated by:

# Generate lists
cohortFolder=/srv/scratch/cheba/Imaging/mas2/pilot2_Karina/dnldFromFlywheel/fmri/work/cohortFolder
bmp_fmri_ini_genLists.sh -c ${cohortFolder} -l fix    # If FIX denoising will be used
bmp_fmri_ini_genLists.sh -c ${cohortFolder} -l aroma  # If AROMA denoising will be used

Extract anat brain

Brain extraction from T1-weighed image:

# Extract brain from T1
for_each -nthreads 8 $(cat ${cohortFolder}/studyFolder.list) : bmp_fmri_ini_Xbrain.sh IN

Visualise struc_brain.nii.gz for the quality of brain extraction.

[OPTIONAL] Despike rsfMRI data

Despike rsfMRI data. This calls AFNI’s 3dDespike, and requires AFNI to be installed.

# Despike
for_each -nthreads 8 $(cat ${cohortFolder}/studyFolder.list) : bmp_fmri_ini_despike.sh IN

Remove existing func.feat, func+.feat, etc., if any

Removing previous FEAT results. If you want to keep previous results, rename them.

for_each -nthreads 8 $(cat ${cohortFolder}/studyFolder.list) : rm -fr IN/func*.feat