$ ls derivatives/fmriprep/ | head
dataset_description.json
desc-aparcaseg_dseg.tsv
desc-aseg_dseg.tsv
README
sub-10003
sub-10003_ses-V1.html
sub-10005
sub-10005_ses-V1.html
sub-10008
sub-10008_ses-V1.html10 fMRIPrep
Before being analyzed, structural and functional neuroimaging data must undergo a core set of preprocessing steps. The need for these preprocessing steps are relatively uncontroversial, and they include intensity non-uniformity correction (for structural), correction for motion across volumes (functional), coregistration (structural and functional), as well as several others. As such, these outputs are the result of a minimal preprocessing stream (acknowledging that the meaning of “minimal” differs between datasets). That is, these derivatives have not undergone many steps that are common in other preprocessing pipelines, such as denoising, nuisance regression, or scrubbing. If you need data that have gone through data cleaning, please see either Chapter 13 or Chapter 17. The fMRIPrep derivatives are most useful for tasks like reviewing the quality of preprocessing, implementing your own cleaning pipeline, or working from HCP-style CIFTI data.
10.1 Starting Project
10.1.1 Locate Data
On TACC, the neuroimaging data are stored underneath the releases. For example, data release v2.#.# is underneath
pre-surgery/mrisThe fMRIPrep derivatives are underneath derivatives/fmriprep. Let’s take a look.
10.1.2 Extract Data
For a detailed description of the files produced by fMRIPrep, please review their documentation.
10.2 Considerations While Working on the Project
10.2.1 Brain Masking
As a part of release 2.x, a custom brain mask was on the raw structural scan with SynthStrip (Hoopes et al., 2022). SynthStrip is a cutting edge tool that can efficiently and accurately extract brains in a wide variety of challenging situations. Our use of SynthStrip was inspired by QSIprep. However, while conducting quality control on the spatial normalization templates, we discovered that SynthStrip interacts poorly with the normalization tool used by fMRIPrep (and QSIPrep). For details of the issue, see: https://github.com/PennLINC/qsiprep/issues/954. The basic issue is that, while SynthStrip is effective at stripping the skull from an image, its default configuration leaves CSF and dura intact, which interferes with normalization to a template that does not include those materials (that is, a template that is only a brain). While we expect that the issue is relatively minor and have not observed obvious issues in the downstream products, this will be addressed in a future release (expected: 3.0). If you would like to evaluate the masks produced by SynthStrip, they are in mris/derivatives/synthstrip.
10.2.2 Variability Across Scanners
Many MRI biomarkers exhibit variability across the scanners, which may confound some analyses. For an up-to-date assessment of the issue and overview of current thinking, please see Confluence.
10.2.3 Data Quality
As with any MRI derivative, all pipeline derivatives have been included. This means that products were included regardless of their quality, and so some products may have been generated from images that are known to have poor quality—rated “red”, or incomparable. For details on the ratings and how to exclude them, see Appendix A. Additionally, extensive QC has not yet been performed on the derivatives themselves, and so there may be cases where pipelines produced atypical outputs. For an overview of planned checks, see Confluence.
10.2.4 Data Generation
These outputs were generated by the fmriprep_app.
Results included in this manuscript come from preprocessing performed using fMRIPrep 24.1.1 (Esteban et al. (2019); Esteban et al. (2018); RRID:SCR_016216), which is based on Nipype 1.8.6 (K. Gorgolewski et al. (2011); K. J. Gorgolewski et al. (2018); RRID:SCR_002502).
10.2.4.1 Preprocessing of B0 inhomogeneity mappings
A B0-nonuniformity map (or fieldmap) was estimated based on two (or more) echo-planar imaging (EPI) references with topup (Andersson et al. (2003); FSL None).
10.2.4.2 Anatomical data preprocessing
The T1w image was corrected for intensity non-uniformity (INU) with N4BiasFieldCorrection (Tustison et al., 2010), distributed with ANTs 2.5.3 (Avants et al., 2008, RRID:SCR_004757), and used as T1w-reference throughout the workflow. A pre-computed brain mask was provided as input and used throughout the workflow Section 10.2.1. Brain tissue segmentation of cerebrospinal fluid (CSF), white-matter (WM) and gray-matter (GM) was performed on the brain-extracted T1w using fast (FSL, RRID:SCR_002823, Zhang et al., 2001). Brain surfaces were reconstructed using recon-all (FreeSurfer 7.3.2, RRID:SCR_001847, Dale et al., 1999), and the brain mask estimated previously was refined with a custom variation of the method to reconcile ANTs-derived and FreeSurfer-derived segmentations of the cortical gray-matter of Mindboggle (RRID:SCR_002438, Klein et al., 2017). Volume-based spatial normalization to two standard spaces (MNI152NLin2009cAsym, MNI152NLin6Asym) was performed through nonlinear registration with antsRegistration (ANTs 2.5.3), using brain-extracted versions of both T1w reference and the T1w template. The following templates were were selected for spatial normalization and accessed with TemplateFlow (24.2.0, Ciric et al., 2022): ICBM 152 Nonlinear Asymmetrical template version 2009c [Fonov et al. (2009), RRID:SCR_008796; TemplateFlow ID: MNI152NLin2009cAsym], FSL’s MNI ICBM 152 non-linear 6th Generation Asymmetric Average Brain Stereotaxic Registration Model [Evans et al. (2012), RRID:SCR_002823; TemplateFlow ID: MNI152NLin6Asym]. Grayordinate “dscalar” files containing 91k samples were resampled onto fsLR using the Connectome Workbench (Glasser et al., 2013).
10.2.4.3 Functional data preprocessing
For each of the 4 BOLD runs found per subject (across all tasks and sessions), the following preprocessing was performed. First, a reference volume was generated, using a custom methodology of fMRIPrep, for use in head motion correction. Head-motion parameters with respect to the BOLD reference (transformation matrices, and six corresponding rotation and translation parameters) are estimated before any spatiotemporal filtering using mcflirt (FSL, Jenkinson et al., 2002). The estimated fieldmap was then aligned with rigid-registration to the target EPI (echo-planar imaging) reference run. The field coefficients were mapped on to the reference EPI using the transform. The BOLD reference was then co-registered to the T1w reference using bbregister (FreeSurfer) which implements boundary-based registration (Greve & Fischl, 2009). Co-registration was configured with six degrees of freedom. Several confounding time-series were calculated based on the preprocessed BOLD: framewise displacement (FD), DVARS and three region-wise global signals. FD was computed using two formulations following Power (absolute sum of relative motions, Power et al. (2014)) and Jenkinson (relative root mean square displacement between affines, Jenkinson et al. (2002)). FD and DVARS are calculated for each functional run, both using their implementations in Nipype (following the definitions by Power et al., 2014). The three global signals are extracted within the CSF, the WM, and the whole-brain masks. Additionally, a set of physiological regressors were extracted to allow for component-based noise correction (CompCor, Behzadi et al., 2007). Principal components are estimated after high-pass filtering the preprocessed BOLD time-series (using a discrete cosine filter with 128s cut-off) for the two CompCor variants: temporal (tCompCor) and anatomical (aCompCor). tCompCor components are then calculated from the top 2 percent variable voxels within the brain mask. For aCompCor, three probabilistic masks (CSF, WM and combined CSF+WM) are generated in anatomical space. The implementation differs from that of Behzadi et al. in that instead of eroding the masks by 2 pixels on BOLD space, a mask of pixels that likely contain a volume fraction of GM is subtracted from the aCompCor masks. This mask is obtained by dilating a GM mask extracted from the FreeSurfer’s aseg segmentation, and it ensures components are not extracted from voxels containing a minimal fraction of GM. Finally, these masks are resampled into BOLD space and binarized by thresholding at 0.99 (as in the original implementation). Components are also calculated separately within the WM and CSF masks. For each CompCor decomposition, the k components with the largest singular values are retained, such that the retained components’ time series are sufficient to explain 50 percent of variance across the nuisance mask (CSF, WM, combined, or temporal). The remaining components are dropped from consideration.
The head-motion estimates calculated in the correction step were also placed within the corresponding confounds file. The confound time series derived from head motion estimates and global signals were expanded with the inclusion of temporal derivatives and quadratic terms for each (Satterthwaite et al., 2013). Frames that exceeded a threshold of 0.5 mm FD or 1.5 standardized DVARS were annotated as motion outliers. Additional nuisance timeseries are calculated by means of principal components analysis of the signal found within a thin band (crown) of voxels around the edge of the brain, as proposed by (Patriat et al., 2017). The BOLD time-series were resampled onto the left/right-symmetric template “fsLR” using the Connectome Workbench (Glasser et al., 2013). Grayordinates files (Glasser et al., 2013) containing 91k samples were also generated with surface data transformed directly to fsLR space and subcortical data transformed to 2 mm resolution MNI152NLin6Asym space. All resamplings can be performed with a single interpolation step by composing all the pertinent transformations (i.e. head-motion transform matrices, susceptibility distortion correction when available, and co-registrations to anatomical and output spaces). Gridded (volumetric) resamplings were performed using nitransforms, configured with cubic B-spline interpolation.
Many internal operations of fMRIPrep use Nilearn 0.10.4 (Abraham et al., 2014, RRID:SCR_001362), mostly within the functional processing workflow. For more details of the pipeline, see the section corresponding to workflows in fMRIPrep’s documentation.
10.2.5 Citations
If you use these products in your analyses, please cite the relevant papers written by members TReNDS.
In publications or presentations including data from A2CPS, please include the following statement as attribution:
Data were provided [in part] by the A2CPS Consortium funded by the National Institutes of Health (NIH) Common Fund, which is managed by the Office of the Director (OD)/ Office of Strategic Coordination (OSC). Consortium components and their associated funding sources include Clinical Coordinating Center (U24NS112873), Data Integration and Resource Center (U54DA049110), Omics Data Generation Centers (U54DA049116, U54DA049115, U54DA049113), Multi-site Clinical Center 1 (MCC1) (UM1NS112874), and Multi-site Clinical Center 2 (MCC2) (UM1NS118922).
When using neuroimaging derivatives, please also cite Sadil et al. (2024).