Getting started with BIDS
BIDS, the Brain Imaging Data Structure, is a community driven standard to organize neuroimaging data and metadata to make it easier to analyze, archive and share. BIDS is not a data format on itself, but rather a standardized directory structure with standardized file names and agreements on the strategy on sharing metadata to make the dataset more FAIR.
To read more about BIDS, please see the website or look up the details in the specification.
Reading data from a BIDS dataset
FieldTrip has direct support for all data file formats that are used in BIDS. This includes:
- structural and functional MRI
- NIfTI format (
.nii
and.nii.gz
)
- NIfTI format (
- MEG
- EEG
- BrainVision
- European Data Format (
.edf
) - EEGLAB
- Biosemi (
.bdf
)
- intracranial EEG
- BrainVision
- European Data Format (
.edf
) - Neurodata Without Borders (
.nwb
) - Multiscale Electrophysiology File Format
Furthermore, there are a number of BIDS extension proposals (so called BEPs) that are likely to be part of the BIDS specification in the near future. Some of these are:
- PET, see http://bids.neuroimaging.io/bep009
- NIfTI format (
.nii
and.nii.gz
)
- NIfTI format (
- NIRS, see http://bids.neuroimaging.io/bep030
- motion capture, see http://bids.neuroimaging.io/bep029
- tab-separated files (
.tsv
)
- tab-separated files (
When you read raw data that is represented in the BIDS organization, the corresponding sidecar files are also read. In the case of MEG, EEG and iEEG that means that the corresponding json file and the _channels.tsv
file are read. Channel names in the original (binary) file format will be overruled with those in the channels file. Also the _events.tsv
file will be read, events that are in the original (binary) file will be replaced by those from the events file.
If you want to avoid reading the channels and/or events from the BIDS sidecar files, you can specify in the low-level functions the readbids
or cfg.readbids
option as ‘no’.
Writing data to a BIDS dataset
Using the data2bids function you can organize your data according to BIDS. It supports three methods:
- decorate: use this if the data is already in the right file format, with the right filename and in the right directory
- copy: use this if the data is already in the right file format, but not with the right filename and not in the right directory
- convert: use this if the data is in a file format that is not supported by BIDS, or with raw or minimally preprocessed data in MATLAB memory
There are various examples that show how to convert different types of data:
- BIDS - the brain imaging data structure
- Converting an example audio dataset for sharing in BIDS
- Converting an example behavioral dataset for sharing in BIDS
- Converting an example EEG dataset for sharing in BIDS
- Converting an example EMG dataset for sharing in BIDS
- Converting an example eyetracker dataset for sharing in BIDS
- Converting an example MEG dataset for sharing in BIDS
- Converting an example motion tracking dataset for sharing in BIDS
- Converting the combined MEG/fMRI MOUS dataset for sharing in BIDS
- Converting an example NIRS dataset for sharing in BIDS
- Combining simultaneous recordings in BIDS
- Converting an example video dataset for sharing in BIDS
See also
- Getting started with BIDS
- BIDS - the brain imaging data structure
- Converting an example audio dataset for sharing in BIDS
- Converting an example behavioral dataset for sharing in BIDS
- How should I specify the coordinate systems in a BIDS dataset?
- Converting an example EEG dataset for sharing in BIDS
- Converting an example EMG dataset for sharing in BIDS
- Converting an example eyetracker dataset for sharing in BIDS
- Convert the EEG language dataset for sharing in BIDS
- Converting an example MEG dataset for sharing in BIDS
- Converting an example motion tracking dataset for sharing in BIDS
- Converting the combined MEG/fMRI MOUS dataset for sharing in BIDS
- Converting an example NIRS dataset for sharing in BIDS
- Combining simultaneous recordings in BIDS
- Convert the EEG sedation dataset for sharing in BIDS
- Converting an example video dataset for sharing in BIDS
- Getting started with Cerca OPM data