name: title layout: true class: center --- layout: false count: false .center[
https://www.nipreps.org/assets/fmriprep-bootcamp-geneva2024/day1-01-fmriprep-primer/
## Overview of the fMRI neuroimaging pipeline & *fMRIPrep* Chris Markiewicz <
markiewicz@stanford.edu
> Oscar Esteban <
phd@oscaresteban.es
> ] ??? NOTES TO OURSELVES GO HERE --- name: newsection layout: true .perma-sidebar[
Day 1 :: Introduction
] --- # Outlook .right-column3.center[
https://www.nipreps.org/assets/fmriprep-bootcamp-geneva2024/day1-01-fmriprep-primer/
] .left-column3.larger[
* Overview of the neuroimaging pipeline structure * Why do data require preprocessing? * *fMRIPrep* * Introduction * Design and requirements * Community * Continuous validation * *NiPreps* ] ??? --- # The neuroimaging worflow
.boxed-content[
.center[ [Esteban et al., (2020)](http://doi.org/10.1038/s41596-020-0327-3); [Niso et al., (2022)](https://doi.org/10.1016/j.neuroimage.2022.119623) ] ] ??? The selling points are: - Data collection and organization is mostly data management. It's true sequences improve over time and that demands updates in the data management workflow (e.g., BIDS conversion), but you can get a very stable solution here (esp. if you use things like ReproIn and datalad) and standardization has been implemented (following different approaches and standards at each institution, true). - Statistical modeling requires some flexibility to come up with new and better models, so you may allow some analytical variability not to styme progress. - Preprocessing is the step in between, where standardization can (i) give you as an individual researcher a solid ground for this and future studies; (ii) make your study more comparable to others who standardize the same way. WDYT? --- # Why do data require preprocessing? .boxed-content[
.large.center[
MRI measurements *generally* **cannot** be directly analyzed.
]
.pull-left[ .center.larger[
**Spatiotemporal location**] signal drawn from the same location and accurate time at all time points, sampled consistently with the analysis' design (e.g., surface, volume) ] .pull-right[ .center.larger[
**Signal *validity***] extraction of confounds, identification/accounting for artifacts, spatiotemporal filtering for denoising, etc. ]
.boxed-bottom.large.center[ **End goal**: minimize false positives without increasing false negatives ] ] --- # Why do data require preprocessing? .boxed-content[
.large[ All analyses require consistency and accuracy in **spatiotemporal location**. ]
.larger[
**within runs** (head-motion, slice-timing),
**within individuals** (coregistration between runs, coregistration with anatomy [T1w images, surfaces, etc.], susceptibility distortion), and
**across subjects** (spatial normalization) ] ] --- ## Example: susceptibility distortion
--- # Why do data require preprocessing?
.boxed-content[ .large[ All analyses must consider confounders and covariates that undermine the **validity** of the measurements. ] .larger[ * confounders such as global signals, signal drifts, DVARS, etc. * spatiotemporal filtering to increase SNR, * known artifacts such as head-motion parameters and derivations, etc. ]
.boxed-bottom.large[ **Minimal preprocessing**: .gray-text[*fMRIPrep* is *conservative* in that it will not regress out signals or apply intended smoothing kernels] ] ] ---
.boxed-content[ .large.center[ # Processing and reproducibility ] .larger.center.gray-text[How do they interact? Why *fMRIPrep*? ]] --- .center[
.small[ *The Turing Way project* illustration by Scriberia. Used under a CC-BY 4.0 licence. doi:
10.5281/zenodo.3332807
.] ] --- # Reproducibility: increasing measurements' reliability
.large[
Repeat the measurement .gray-text[Random errors cancel out]
Standardize the measurement procedure .gray-text[Reduce methodology variance (potentially at the cost of bias)] ]
.center.large[ Both strategies *reduce the variance* of the measurement. Neither ensures the *validity* of the measurement] --- # Preprocessing & Reproducibility .boxed-content[ .large[ The reproducibility of preprocessing sets bounds to the reproducibility of downstream analyses. ] .larger[ * NARPS ([Botvinik-Nezer et al., 2020](https://doi.org/10.1038/s41586-020-2314-9)): single dataset, 70 teams, 9
ex-ante
hypotheses.
Striking analytical variability (even with teams using same preprocessing) * [Li et al., (2024)](https://doi.org/10.1038/s41562-024-01942-4): single test-retest dataset, 5 pipelines
Moderate inter-pipeline agreement, limiting cross-study
reproducibility
[replicability] ] ] --- # Preprocessing & Reproducibility .boxed-content[
.large[ Beyond analytical variability, other sources of variability are on the way: ] .larger[ * Random seeds
Keep track (*do not fix*) and report. * [Chatelain et al., (2023)](https://doi.org/10.48550/arXiv.2307.01373): Random rounding of floating-point calculations.
Uncovered substantial changes between patch-releases of *fMRIPrep* ] ] --- # fMRIPrep: bird's eye picture .boxed-content.center[
] --- .pull-left.center[
] .pull-right[ # Anatomical processing .large[ Delivered within *sMRIPrep* ] .larger[
Denoising
INU correction
Averaging (multi-session)
Brain extraction
Spatial normalization
Brain tissue segmentation
Surface reconstruction ] ] --- .pull-left.center[
] .pull-right[ # Functional processing .larger[
Reference volume
Slice-timing (optional)
Head-motion (estimation)
Susceptibility distortion (estimation)
Co-registration with anatomical T1w
Resampling into specific spaces
Confound collection ] ] --- # *TemplateFlow* .boxed-content.center[
(
Ciric et al., 2022
) ] --- # *SDCFlows* .boxed-content[ .large[ SDC
Susceptibility-derived Distortion Correction ]
.larger[ *SDCFlows* "caters" preprocessed fieldmap estimations for *fMRIPrep* to reconstruct the nonlinear displacements field to revert geometrical distortion. ] .center[
] ] --- # fMRIPrep's design .boxed-content[ .large[
Robust & adaptive fMRI preprocessing] .larger[ * Minimalist requirements (T1w + BOLD run) * Will utilize additional scans (T2w/FLAIR, field maps) when available * Capable of preprocessing multi-echo BOLD. ] .large[
Cross-suite tooling] .larger[ * Select tools from each suite according to strengths * Use *Nipype* to abstract from tool details and construct modular workflows ] .large[
Standardization and best-practices — [check (Esteban, 2024)](https://doi.org/10.31219/osf.io/42bsu)] .larger[ * BIDS (inputs), BIDS Derivatives (outputs), BIDS Apps (architecture). * Containers, versioning, LTS, open-source, CI/CD, etc. * Visual reports ] ] --- # fMRIPrep's constrains and limitations .boxed-content[ .large[
Agnostic to downstream analysis] .larger[ * Minimalist processing that refrains from applying analysis-specific steps. ] .large[
Cross-sectional studies] .larger[ * *fMRIPrep* assumes individuals' anatomy does not change * Today, execution can be *hacked* but a *longitudinal mode* does not exist yet. ] .large[
Driven by the 80/20 principle] .larger[ * 7T data fell on the 20 side (although that's about to change) ] ] --- # Standardization in the research workflow .boxed-content[
.center[
]
.larger[ Data collection
easy to standardize (BIDS, scanners' software) Statistical modeling
keep analytical flexibility not to stifle the development of new ideas Preprocessing
offers an **opportunity** to reduce analytical flexibility and **enable** cross-study comparisons ] ] --- # Standardizing preprocessing: visual reports .boxed-content[
] --- # Standardizing preprocessing: community building .large[fMRI practitioners have massively adopted *fMRIPrep* globally:]
--- # Standardizing preprocessing: community building
.large.center[
which has permitted the creation of a large community.] --- # Building a community was important to *fMRIPrep* .boxed-content.large[ .no-bullet[ *
Feedback & support: * error & bug reports
help development, * feature requests
help driving a roadmap, * questions
are the entry point to deliver support * [
NeuroStars.org](https://neurostars.org) *
Engage contributors (see [our guidelines](https://www.nipreps.org/community/CONTRIBUTING/)): * documentation, assistance debugging, code patches, everything counts! *
Reach out, increase user-base. ] ] --- # Standardizing preprocessing: software versions .larger[
It's critical to report **exact versions**
Semantics inform about compatibility: **24.0.1**
Long-term support (LTS) program. ]
--- # Standardizing preprocessing: validation .boxed-content.center[
(
Esteban et al., 2019
) ] --- count:false # Standardizing preprocessing: validation .boxed-content.center[
(
Esteban et al., 2019
) ] --- count:false # Standardizing preprocessing: validation .boxed-content.center[
(
Esteban et al., 2019
) ] ---
NiPreps
(
Esteban et al., 2020
)
--- # *NiPreps* produce *analysis-grade* data .boxed-content[
.larger.center[ "*analysis-grade*" data
data **directly consumable by analyses** ] .pull-left[
*Analysis-grade* data is an analogy to the concept of "*sushi-grade (or [sashimi-grade](https://en.wikipedia.org/wiki/Sashimi)) fish*" in that both are: .large[
**minimally preprocessed**,] and .large[
**safe to consume** directly.] ] .pull-right.center[
www.nipreps.org
] ] ??? --- ## Highlights
.boxed-content[ .no-bullet[ * .large[
MRI data cannot directly be analyzed] * Spatiotemporal location, and signal 'validity' * **Analytical variability** * .large[
Preprocessing is an area with standardization potential] * *fMRIPrep* as an an example of implementation in fMRI * *fMRIPrep* design principles * **Visual reports** * .large[
Introduced *NiPreps* as a generalization of *fMRIPrep*] * Concept of *analysis-grade data* * Tooling landscape ]] ??? --- layout: false count: false .center[
## Thanks
#### Chris Markiewicz <
markiewicz@stanford.edu
> & Oscar Esteban <
phd@oscaresteban.es
> Overview of the fMRI neuroimaging pipeline & *fMRIPrep* Funding: [SNSF 185872](https://data.snf.ch/grants/grant/185872), [RF1MH121867](https://reporter.nih.gov/project-details/10260312), [CZI EOSS5-000266](https://chanzuckerberg.com/eoss/proposals/nipreps-a-community-framework-for-reproducible-neuroimaging/) ] ???