load_participants_tsv#
- brainsets.utils.bids_utils.load_participants_tsv(bids_root)[source]#
Load participants.tsv data from a BIDS root directory.
The participants.tsv file is a tab-delimited file containing information about all subjects in the dataset, such as participant_id, age, sex, and other metadata. This file is part of the BIDS standard, and is typically found at the root of the BIDS dataset.
For more information on participants.tsv, see: https://bids-specification.readthedocs.io/en/stable/modality-agnostic-files/data-summary-files.html#participants-file
- Parameters:
bids_root (
Path|str) – BIDS root directory (e.g., ‘/path/to/bids/root’)- Returns:
- Participant information indexed by participant_id,
or None if participants.tsv is missing the ‘participant_id’ column.
- Return type:
pd.DataFrame
- Raises:
FileNotFoundError – If participants.tsv file is not found in the BIDS root directory.