FMRIprep: Building a Robust Preprocessing Pipeline for fMRI

Submission No:


Submission Type:

Abstract Submission 


Christopher Markiewicz1, Oscar Esteban1, Ross Blair2, Feilong Ma3, James Kent4, Anibal Heinsfeld5, Mathias Goncalves6, Russell Poldrack1, Krzysztof Gorgolewski1


1Stanford University, Stanford, CA, United States, 2Stanford University, Stanford, CA, 3Dartmouth College, Hanover, NH, United States, 4University of Iowa, Iowa City, IA, United States, 5Independent Researcher, Rio De Janeiro, Brazil, 6MIT, Cambridge, MA, United States



Statistical analysis of functional MRI data requires a series of preprocessing steps to ensure the validity and interpretability of results [1]. These steps, such as head-motion and susceptibility distortion correction as well as spatial normalization [2], are organized into workflows, which are typically tailored to a set of sequences and acquisition parameters and the statistical analysis tools the researcher intends to use. We previously introduced FMRIprep [3], a tool that aims to provide standardized fMRI preprocessing workflows that use state-of-the-art techniques and are robust to variations in input data. To achieve this promise of robustness, we have tested FMRIprep on 326 subjects from 60 heterogeneous, publicly available fMRI datasets. For each participant, a quality assurance (QA) report was generated for visual inspection and rating.


Experiments - We assessed the robustness of FMRIprep in two phases. Datasets for the first phase were selected for likelihood of producing errors. Failures to complete were corrected and re-run, and QA reports were visually inspected for errors in preprocessing. After the issues were fixed, a second phase of testing was run on a larger, random selection of subjects. Tests were run on the TACC and Sherlock clusters.

Data - Data were selected from the OpenfMRI database [4] and organized according to the BIDS specification [5]. In the first phase, 30 datasets were selected, targeting a mix of older and more recent acquisitions to ensure a variety of protocols. MRIQC [6] reports were used to select 2 representative and 2 outlier subjects from each dataset. In the second phase, 4 subjects were selected randomly from each of 58 datasets along with 2 single-subject datasets, sampling from all datasets with BOLD data accessible through datalad [7] as of September 2017.

Design - FMRIprep is organized as a series of nipype [8] pipelines that are constructed to take advantage of the input data available (Fig. 1) at the subject level. For instance, if a fieldmap acquisition is missing for a subject, the corresponding unwarping is skipped. FMRIprep generates reports (Fig. 2) for assessing the quality of data and preprocessing, implementing where feasible the checkpoints laid out by Strother [2]. FMRIprep implements the BIDS-App standard [9], facilitating its use in Docker or Singularity containers or on the OpenNeuro platform [10].
Supporting Image: Figure1.png
Supporting Image: Figure2.png


FMRIprep constructed workflows for each subject and generated reports and logs, permitting detection of errors and failures. In the first assessment phase, 21 issues affecting 7 datasets were identified and resolved. In the second phase, 32 additional issues were identified, affecting 14 datasets. Visual inspection and rating of the 326 reports is in progress, with more than 70 participants assessed.


The reproducibility of an analysis depends on consistent application of preprocessing steps to data with different acquisition parameters. Attempts to outline best practices of acquisition and preprocessing [1,2,11] have been invaluable steps toward high-quality, reliable preprocessing, but preprocessing idiosyncratic datasets with maximal consistency has remained an open problem. FMRIprep aims to fill this gap by adapting workflows to a given dataset, providing high-quality preprocessing to the individual dataset and highly consistent preprocessing across datasets. Through rigorous testing, we have achieved a high degree of robustness, as demonstrated by successfully preprocessing 60 disparate OpenfMRI datasets. FMRIprep constitutes a concrete proposal for the standardization of fMRI preprocessing without imposing acquisition requirements. We estimate from voluntary feedback that FMRIprep is being used by around 20 laboratories, unrelated to the authors. This feedback shows that fMRI practitioners in clinical and research settings will be better equipped to perform reliable, reproducible, statistical analyses with simple, consistent preprocessing tools such as FMRIprep.

Imaging Methods:

Anatomical MRI


Workflows 1

Modeling and Analysis Methods:

Exploratory Modeling and Artifact Removal
Motion Correction and Preprocessing


Other - Preprocessing

1|2Indicates the priority used for review