Work with 'BIDS' (Brain Imaging Data Structure) Projects

Tools for working with 'BIDS' (Brain Imaging Data Structure) formatted neuroimaging datasets. The package provides functionality for reading and querying 'BIDS'-compliant projects, creating mock 'BIDS' datasets for testing, and extracting preprocessed data from 'fMRIPrep' derivatives. It supports searching and filtering 'BIDS' files by various entities such as subject, session, task, and run to streamline neuroimaging data workflows. See Gorgolewski et al. (2016) for the 'BIDS' specification.


bidser

R-CMD-check Codecov testcoverage Lifecycle:experimental CRANstatus

BIDS in R – (it’s a start!)

The goal of bidser is to make working with the BIDS neuroimaging format convenient in R. Current support is strongest for MRI datasets, with explicit query helpers, metadata inheritance, derivative pipeline discovery, and compatibility-oriented support for fmriprep workflows.

Installation

Install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("bbuchsbaum/bidser")

Example

See https://bbuchsbaum.github.io/bidser/articles/quickstart.html

fMRIPrep confounds

read_confounds() selects nuisance regressors from fMRIPrep confound tables. Rather than hand-listing version-specific column names, use the high-level, version-robust helpers:

# Named, version-robust sets (resolve to whatever columns your dataset has)
read_confounds(proj, cvars = confound_set("motion24"))
read_confounds(proj, cvars = confound_set("36p"))

# PCA + raw denoising strategies (recommended modern default)
read_confounds(proj, cvars = confound_strategy("pcabasic80"))

# Discover what is available
list_confound_sets()
list_confound_strategies()

Code that previously reached into the unexported bidser:::DEFAULT_CVARS2 should switch to the stable public handle confound_set("legacy_default"), which returns the identical 26-name set. See ?read_confounds, ?confound_set, and the confounds-and-variables vignette for details.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.