Functional pipeline

The functional connectivity pipeline builds upon the same modular organization as the structural connectivity pipeline, including a preprocessing stage, anatomical stage and connectivity reconstruction stage. Resting-state fMRI processing starts with the main function functional_pipeline that runs the processing steps according to the parameters provided on the command line or in the functional configuration file.

Preprocessing

The preprocessing step functional_preprocessing provides users the option to preprocess rs-fMRI data with their preferred software package, specified by preprocessingScript. Further details on using a custom preprocessing script are provided in the structural pipeline section (see Custom preprocessing script).

CATO provides an example preprocessing script preprocess_default.sh that:
  1. performs slice timing correction using FSL tool sliceTimer,

    In the provided preprocessing script, parameter sliceTimingCorrection informs whether slice timing correction should be performed (true or false) and sliceTimerOptions are the optional input arguments to sliceTimer:

    slicetimer -i fmriFileInput -o fmriFileOutput slicetimerOptions
    

    That can be specified in the configuration file as follows:

    "functional_preprocessing":{
            "sliceTimingCorrection":true,
            "sliceTimerOptions": "YOUR_OPTIONS"
    }
    
  2. performs motion correction using FSL tool MCFLIRT,

  3. computes a rs-fMRI reference image by averaging all (motion corrected) rs-fMRI frames (using FSL),

  4. computes the registration matrix between the rs-fMRI reference image and the T1 image [3] (using Freesurfer) and

  5. registers the T1 parcellation to the reference rs-fMRI image (using Freesurfer).

Anatomical steps

The functional pipeline utilizes the same anatomical as the structural pipeline to parcellate the surface into brain regions with respect to reference atlases, compute the anatomical statistics of these regions and collect the region properties of these statistics into the region properties file regionPropertiesFile.

See the anatomical steps section in the structural pipeline for a description of the parcellation and collect_region_properties steps.

Compute motion metrics

Compute_motion_metrics computes for each frame the motion metrics ‘framewise displacement’ (FD) and the change in signal intensity between frames (known as ‘DVARS’) [15]. Both measures are derived from the motionParametersFile file (which can for example be obtained using MCFLIRT [16]) and saved in the motionMetricsFile.

Following the implementation of Power et al., [15] framewise displacement (FD) is defined as the sum of the estimated translational and rotational displacement in a frame. Rotational displacement should be provided in degrees by the motionParametersFile file, and is subsequently converted to millimeters by calculating the expected displacement on the surface of a sphere of radius 50 mm as model for the cerebral cortex following [15]. DVARS is calculated as the square root of the average squared intensity differences of all brain voxels between two consecutive frames in the rs-fMRI volume [15].

Network reconstruction

The reconstruction_functional_network step computes region-to-region functional connectivity by means of correlation analysis, preceded by three (optional) steps.

Step 1. Regression

First, the regression step removes covariates (referred to as regressors) from the signal intensity time series of the rs-fMRI data. Per voxel, regressors are removed from the signal intensity time series by calculating the residuals of a linear model of the signal intensities with the regressors as predictors. Standard regressors include:
  • the linear trends of the six motion parameters (from motionParametersFile),

  • first order drifts of the six motion parameters (from motionParametersFile) and

  • mean signal intensity of voxels in white matter and CSF (specific regions are defined by configuration parameter regression.regressionMask). Each region code in the regression mask is included as separate regressor.

Optionally, the mean signal intensity of all voxels in the brain can be included as an additional regressor to perform global mean correction (indicated by regression.globalMeanRegression) [17].

Step 2. Bandpass filter (optional)m

The next step is applying a band-pass filter to the rs-fMRI data (indicated by parameter bandpass_filter.filter). Filtering frequencies aims to remove noise frequencies such as low frequencies that result from scanner drift, coil interference, slow motions or slow vascular oscillations as well as high frequencies that include artifacts from from breathing or heart beats (More information). A standard zero-phase Butterworth bandpass filter is used with lower and higher cutoff frequencies set by the configuration parameter bandpass_filter.frequencies.

Step 3. Scrubbing (optional)

Frames that display significant motion artifacts are (optionally) removed from the rs-fMRI time-series in the scrubbing-step [15]. When scrubbing is enabled (determined by the parameter scrubbing.scrubbing), frames with motion artifacts are identified based on two indicators:

where IQR refers to the the interquartile range IQR = Q3 – Q1, with Q1 and Q3 referring to the first and third quartile of the DVARS over all frames. Frames with a number of indicators larger or equal to scrubbing.minViolations are labeled as frames with potential motion artifacts and are excluded from further analysis. To accommodate temporal smoothing of data, frames consecutive to frames with labeled motion artifacts are optionally excluded: configuration parameter scrubbing.backwardNeighbors determines the number of preceding frames and scrubbing.forwardNeighbors determines the number of succeeding frames to be excluded from further analysis.

Step 4. Correlation Analysis

Functional connectivity is estimated between brain regions (specified by the ROIsFile) as the correlation coefficient of the average signal intensity of these regions across the selected frames. The correlation measure is specified by the reconstructionMethod parameter and can be MATLAB functions such as corr (Pearson’s correlation coefficient (default)) or partialcorr (partial correlation coefficient). Connectivity matrices are saved to the file connectivityMatrixFile and time series of each region are saved to the file timeSeriesFile.