Functional magnetic resonance imaging (fMRI) is a standard tool to investigate the neural correlates of cognition. fMRI noninvasively measures brain activity, allowing identification of patterns evoked by tasks performed during scanning. Despite the long history of this technique, the idiosyncrasies of each dataset have led to the use of ad-hoc preprocessing protocols customized for nearly every different study. This approach is time consuming, error prone and unsuitable for combining datasets from many sources. Here we showcase fMRIPrep (http://fmriprep.org), a robust tool to prepare human fMRI data for statistical analysis. This software instrument addresses the reproducibility concerns of the established protocols for fMRI preprocessing. By leveraging the Brain Imaging Data Structure to standardize both the input datasets (MRI data as stored by the scanner) and the outputs (data ready for modeling and analysis), fMRIPrep is capable of preprocessing a diversity of datasets without manual intervention. In support of the growing popularity of fMRIPrep, this protocol describes how to integrate the tool in a task-based fMRI investigation workflow.
Subscribe to Journal
Get full journal access for 1 year
only $41.25 per issue
All prices are NET prices.
VAT will be added later in the checkout.
Rent or Buy article
Get time limited or full article access on ReadCube.
All prices are NET prices.
This protocol uses ds000003, a dataset publicly available at https://openneuro.org under the terms of the CC0 license. OpenNeuro and other neuroimaging archives contain a large number of open datasets in which this protocol can be exercised and evaluated. The outcomes of preprocessing ds000003 are available using DataLad (https://datalad.org) under a CC0 license, with DataLad dataset locator ///labs/poldrack/ds003_fmriprep. Results of the analysis workflow described in this protocol are also distributed under the CC0 license and can be accessed with DataLad, with DataLad dataset locator ///labs/poldrack/NP-180740.
fMRIPrep is open source, available at https://github.com/poldracklab/fmriprep under a three-clause Berkeley Software Distribution license. The code for the exemplary analysis and visualizations is available at https://github.com/poldracklab/ds003-post-fMRIPrep-analysis under an Apache-2.0 license.
Poldrack, R. A. & Farah, M. J. Progress and challenges in probing the human brain. Nature 526, 371–379 (2015).
Ogawa, S., Lee, T. M., Kay, A. R. & Tank, D. W. Brain magnetic resonance imaging with contrast dependent on blood oxygenation. Proc. Natl Acad. Sci. USA 87, 9868–9872 (1990).
Poldrack, R. A. et al. Toward open sharing of task-based fMRI data: the OpenfMRI project. Front. Neuroinformatics 7, 12 (2013).
Gorgolewski, K. J., Esteban, O., Schaefer, G., Wandell, B. & Poldrack, R. A. OpenNeuro—a free online platform for sharing and analysis of neuroimaging data. in Organization for Human Brain Mapping 1677 (2017).
Carp, J. On the plurality of (methodological) worlds: estimating the analytic flexibility of fMRI experiments. Front. Neurosci. 6, 149 (2012).
Bowring, A., Maumet, C. & Nichols, T. E. Exploring the impact of analysis software on task fMRI results. Hum. Brain Mapp. 40, 3362–3384 (2019).
Esteban, O. et al. fMRIPrep: a robust preprocessing pipeline for functional MRI. Nat. Methods 16, 111–116 (2019).
Xue, G. & Poldrack, R. A. The neural substrates of visual perceptual learning of words: implications for the visual word form area hypothesis. J. Cogn. Neurosci. 19, 1643–1655 (2007).
Gorgolewski, K. et al. Nipype: a flexible, lightweight and extensible neuroimaging data processing framework in Python. Front. Neuroinform. 5, 13 (2011).
Jenkinson, M., Beckmann, C. F., Behrens, T. E. J., Woolrich, M. W. & Smith, S. M. FSL. NeuroImage 62, 782–790 (2012).
Esteban, O. et al. MRIQC: advancing the automatic prediction of image quality in MRI from unseen sites. PLoS One 12, e0184661 (2017).
Gorgolewski, K. J. et al. The brain imaging data structure, a format for organizing and describing outputs of neuroimaging experiments. Sci. Data 3, 160044 (2016).
Working draft of BIDS Derivatives (BIDS Extension Proposals 3, 11, 12, 13, 14, and 16): representation of the outputs of common processing pipelines. Available at https://github.com/bids-standard/bids-specification/pull/109 (accessed 18 March 2019) (2019).
Ciric, R. et al. Mitigating head motion artifact in functional connectivity MRI. Nat. Protoc. 13, 2801–2826 (2018).
Finc, K., Chojnowski, M. & Bonna, K. fMRIDenoise: automated denoising, denoising strategies comparison, and functional connectivity data quality control. https://doi.org/10.5281/zenodo.3383310 (accessed 30 September 2019) (2019).
Detre, J. A., Leigh, J. S., Williams, D. S. & Koretsky, A. P. Perfusion imaging. Magn. Reson. Med. 23, 37–45 (1992).
Qiu, D., Zaharchuk, G., Christen, T., Ni, W. W. & Moseley, M. E. Contrast-enhanced functional blood volume imaging (CE-fBVI): enhanced sensitivity for brain activation in humans using the ultrasmall superparamagnetic iron oxide agent ferumoxytol. NeuroImage 62, 1726–1731 (2012).
Lu, H., Golay, X., Pekar, J. J. & van Zijl, P. C. M. Functional magnetic resonance imaging based on changes in vascular space occupancy. Magn. Reson. Med. 50, 263–274 (2003).
Davis, T. L., Kwong, K. K., Weisskoff, R. M. & Rosen, B. R. Calibrated functional MRI: mapping the dynamics of oxidative metabolism. Proc. Natl Acad. Sci. USA 95, 1834–1839 (1998).
Sikka, S. et al. Towards automated analysis of connectomes: the configurable pipeline for the analysis of connectomes (C-PAC). in 5th INCF Congress of Neuroinformatics. 117 (2014).
Van Essen, D. C. et al. The Human Connectome Project: a data acquisition perspective. NeuroImage 62, 2222–2231 (2012).
Glasser, M. F. et al. The minimal preprocessing pipelines for the Human Connectome Project. NeuroImage 80, 105–124 (2013).
Poldrack, R. A., Mumford, J. A. & Nichols, T. E. Handbook of Functional MRI Data Analysis (Cambridge University Press, 2011).
Mumford, J. A. & Nichols, T. E. Power calculation for group fMRI studies accounting for arbitrary design and temporal autocorrelation. NeuroImage 39, 261–268 (2008).
Nichols, T. E. & Holmes, A. P. Nonparametric permutation tests for functional neuroimaging: a primer with examples. Hum. Brain Mapp. 15, 1–25 (2002).
Halchenko, Y. O. et al. Open Brain Consent: make open data sharing a no-brainer for ethics committees. https://doi.org/10.5281/zenodo.1411525 (accessed 18 March 2019) (2018).
Cox, R. W. & Hyde, J. S. Software tools for analysis and visualization of fMRI data. NMR Biomed. 10, 171–178 (1997).
Avants, B. B. et al. A reproducible evaluation of ANTs similarity metric performance in brain image registration. NeuroImage 54, 2033–2044 (2011).
Fischl, B. FreeSurfer. NeuroImage 62, 774–781 (2012).
Abraham, A. et al. Machine learning for neuroimaging with scikit-learn. Front. Neuroinform 8, 14 (2014).
Kennedy, D. N. et al. Everything matters: the ReproNim perspective on reproducible neuroimaging. Front. Neuroinform. 13, 1 (2019).
Halchenko, Y. O. et al. Open Source Software: Heudiconv. https://doi.org/10.5281/zenodo.1012598 (accessed 18 March 2019) (2018).
Yoo, A. B., Jette, M. A. & Grondona, M. SLURM: simple Linux utility for resource management. in Job Scheduling Strategies for Parallel Processing (eds. Feitelson, D., Rudolph, L. & Schwiegelshohn, U.) 44–60 (Springer, 2003).
Kurtzer, G. M., Sochat, V. & Bauer, M. W. Singularity: scientific containers for mobility of compute. PLoS One 12, e0177459 (2017).
Feingold, F., Esteban, O. & Markiewicz, C. fMRIPrep tutorial: running the docker image. https://doi.org/10.5281/zenodo.2597592 (accessed 18 March 2019) (2019).
Esteban, O. et al. Open Source Software: Task fMRI Analysis using FSL and data preprocessed with fMRIPrep. https://doi.org/10.5281/zenodo.2634481 (accessed 10 April 2019) (2019).
Smith, S. M. & Brady, J. M. SUSAN—a new approach to low level image processing. Int. J. Comput. Vis. 23, 45–78 (1997).
Woolrich, M. W., Ripley, B. D., Brady, M. & Smith, S. M. Temporal autocorrelation in univariate linear modeling of FMRI data. NeuroImage 14, 1370–1386 (2001).
Woolrich, M. W., Behrens, T. E. J., Beckmann, C. F., Jenkinson, M. & Smith, S. M. Multilevel linear modelling for FMRI group analysis using Bayesian inference. NeuroImage 21, 1732–1747 (2004).
Mechelli, A., Friston, K. J. & Price, C. J. The effects of presentation rate during word and pseudoword reading: a comparison of PET and fMRI. J. Cogn. Neurosci. 12, 145–156 (2000).
Mechelli, A., Gorno-Tempini, M. L. & Price, C. J. Neuroimaging studies of word and pseudoword reading: consistencies, inconsistencies, and limitations. J. Cogn. Neurosci. 15, 260–271 (2003).
Gorgolewski, K. J. et al. BIDS apps: improving ease of use, accessibility, and reproducibility of neuroimaging data analysis methods. PLoS Comput. Biol. 13, e1005209 (2017).
Tustison, N. J. et al. N4ITK: improved N3 bias correction. IEEE Trans. Med. Imaging 29, 1310–1320 (2010).
Dale, A. M., Fischl, B. & Sereno, M. I. Cortical surface-based analysis: I. segmentation and surface reconstruction. NeuroImage 9, 179–194 (1999).
Klein, A. et al. Mindboggling morphometry of human brains. PLoS Comput. Biol. 13, e1005350 (2017).
Fonov, V. et al. Unbiased average age-appropriate atlases for pediatric studies. NeuroImage 54, 313–327 (2011).
Avants, B. B., Epstein, C. L., Grossman, M. & Gee, J. C. Symmetric diffeomorphic image registration with cross-correlation: evaluating automated labeling of elderly and neurodegenerative brain. Med. Image Anal. 12, 26–41 (2008).
Zhang, Y., Brady, M. & Smith, S. Segmentation of brain MR images through a hidden Markov random field model and the expectation-maximization algorithm. IEEE Trans. Med. Imaging 20, 45–57 (2001).
Huntenburg, J. M. Evaluating nonlinear coregistration of BOLD EPI and T1w images (Freie Universität, Berlin, Germany, 2014).
Wang, S. et al. Evaluation of field map and nonlinear registration methods for correction of susceptibility artifacts in diffusion MRI. Front. Neuroinform. 11, 17 (2017).
Treiber, J. M. et al. Characterization and correction of geometric distortions in 814 diffusion weighted images. PLoS One 11, e0152472 (2016).
Greve, D. N. & Fischl, B. Accurate and robust brain image alignment using boundary-based registration. NeuroImage 48, 63–72 (2009).
Jenkinson, M., Bannister, P., Brady, M. & Smith, S. Improved optimization for the robust and accurate linear registration and motion correction of brain images. NeuroImage 17, 825–841 (2002).
Power, J. D. et al. Methods to detect, characterize, and remove motion artifact in resting state fMRI. NeuroImage 84, 320–341 (2014).
Behzadi, Y., Restom, K., Liau, J. & Liu, T. T. A component based noise correction method (CompCor) for BOLD and perfusion based fMRI. NeuroImage 37, 90–101 (2007).
Lanczos, C. Evaluation of noisy data. J. Soc. Ind. Appl. Math. Ser. B Numer. Anal. 1, 76–85 (1964).
We thank the many community contributors who have helped fMRIPrep with code and documentation (github.com/poldracklab/fmriprep/blob/master/.maint/contributors.json). This work was supported by the Laura and John Arnold Foundation (R.A.P. and K.J.G.), the NIH (grant NBIB R01EB020740; S.S.G.) and NIMH (R24MH114705 and R24MH117179; R.A.P.). K.F. was supported by the Foundation for Polish Science, Poland (START 23.2018). D.E.P.G. was supported by a Marie Curie FP7-PEOPLE-2013-ITN ‘Initial Training Networks’ Action from the European Union (Project Reference Number: 608123). F.L. was supported by the University Research Priority Program ‘Dynamics of Healthy Aging’ at the University of Zurich. N.J. was supported by a National Science Foundation Graduate Research Fellowship (grant number DGE 16-44869). H.S. was supported by the Max Planck Society, Munich, Germany (grant number 647070403019). S.U. and E.D. were supported by Brain Canada.
The authors declare no competing interests.
Peer review information Nature Protocols thanks Jo Etzel and Angela Laird for their contribution to the peer review of this work.
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Key references using this protocol
Esteban, O. et al. Nat. Methods 16, 111–116 (2019): https://doi.org/10.1038/s41592-018-0235-4
Key data used in this protocol
Xue, G. & Poldrack, R. A. J. Cogn. Neurosci. 19, 1643–1655 (2007): https://openneuro.org/datasets/ds000003
About this article
Cite this article
Esteban, O., Ciric, R., Finc, K. et al. Analysis of task-based functional MRI data preprocessed with fMRIPrep. Nat Protoc 15, 2186–2202 (2020). https://doi.org/10.1038/s41596-020-0327-3