func processing

This module performs all pre-processing of a subject’s task or resting-state functional MRI (fMRI) scans, in preparation for the sampling of regional timeseries and construction of functional connectomes. This pipeline is optimized for spin-echo images with reverse phase encoding used for distortion correction and multi echo acquisitionstions. The pipeline is mainly based on tools from FSL and AFNI for volumetric processing, and FreeSurfer and Workbench for surface-based mapping. For increased functionality, micapipe can also handle protocols in which a single fieldmap is acquired.



Prerequisites 🖐🏼

You need to run -proc_structural, -proc_surf and -post_structural before this stage

  • Remove first five TRs (optional, only if flag -dropTR is specified)

  • Reorient input to LPI

  • Perform motion correction within fMRI run and provided fieldmaps by registering each volume to the scan’s own average

  • Calculate motion outliers

  • Apply distortion correction to motion-corrected images

  • Calculate binary mask from motion and distortion corrected volume

  • High-pass filtering of functional timeseries to remove frequencies below 0.01Hz

  • Run Multivariate Exploratory Linear Optimized Decomposition into Independent Components (MELODIC) on filtered timeseries

  • Compute linear and non-linear registrations between fMRI and T1-nativepro space, as well as boundary-based registration between fMRI and native Freesurfer space

  • Run FMRIB’s ICA-based Xnoiseifier (ICA-FIX) using specified training file. Note that if ICA-FIX is not found on the user’s system, or if MELODIC failed, ICA-FIX will be skipped and further processing will be performed using high-pass filtered timeseries

  • Extract global and tissue-specific signal (cerebrospinal fluid, white matter, and gray matter) from processed timeseries

  • Calculate and save motion confounds matrix from processed timeseries

  • Register processed timeseries to the native cortical surface. Minimially pre-processed (i.e. motion and distortion corrected) timeseries are also registered to the native cortical surface to compute statistics such as temporal signal-to-noise

  • Surface-based registration of native surface timeseries to surface templates (fsaverage5, conte69)

  • Native surface, fsaverage5, and conte69-mapped timeseries are each smoothed with a 10mm Gaussian kernel

  • Use previously computed registrations to align cerebellar and subcortical parcellations to fMRI space

  • Concatenate cerebellar, subcortical, and parcellated cortical timeseries

  • Regress motion spikes from cerebellar, subcortical, and cortical timeseries in linear model. If specified using optional flags, regression of tissue-specific signals and six motion confounds (-NSR) and global signal (-GSR) will also be performed. Following this step, timeseries are saved in two formats: (1) cerebellar regions, subcortical regions, and vertexwise cortical timeseries (conte69), and (2) cerebellar regions, subcortical regions, and parcellated cortical regions.

  • Cross-correlate functional signals across all parcellated regions and output correlation matrix. If flag -noFC is specified, this step will be skipped.