The Brain Imaging Data Structure (BIDS) is a community-driven specification for organizing neuroscience data and metadata with the aim to make datasets more transparent, reusable, and reproducible. Intracranial electroencephalography (iEEG) data offer a unique combination of high spatial and temporal resolution measurements of the living human brain. To improve internal (re)use and external sharing of these unique data, we present a specification for storing and sharing iEEG data: iEEG-BIDS.
Human intracranial electroencephalography1,2 (iEEG) data are recorded at specialized medical centers with electrodes placed on or implanted in the human brain3,4. Electrodes can be placed during epilepsy monitoring, tumor surgery, or for deep brain stimulation (DBS). During these times, patients can voluntarily participate in scientific experiments5,6,7,8,9. Due to the specialized clinical setting in which iEEG data are recorded, iEEG is relatively rare compared to EEG or MRI, and researchers sometimes have to wait several years before completing a study. This makes it important to have a consistent way of archiving and documenting iEEG data within a lab. In addition, because of its unique spatiotemporal properties5,6,7,8,9 and the high cost of acquisition, it is important that these unique data, contributed by rare patients, are made maximally useful and reusable to the scientific community.
Currently, iEEG datasets are stored in many different structures, with each lab adopting their own methods for data and metadata organization, which imposes a substantial barrier to collaboration, reproducibility, and scientific progress. In addition, there are many electrophysiology file formats, which do not generally include all information needed to understand, analyze, and reproduce scientific results. This includes the electrode position, referencing method prior to digitization, simultaneously recorded physiology data, the timing of task events, details on the presented stimuli, or anatomical imaging data from the same subjects. There is a clear need for a community standard to better describe all aspects of iEEG data and its experimental context.
BIDS comprises a standardized specification for folder and file naming, the choice of data formats, and the representation of metadata. It is a modality-agnostic specification, relying on community-driven processes to extend the original specification (written for MRI) to new modalities. For example, the MEG community has extended BIDS for this type of data2, and the EEG community has recently finished preparing their extension10.
This paper announces the extension of the BIDS specification to raw, unprocessed human iEEG data, spanning stereo EEG (sEEG), electrocorticography (ECoG), and deep brain stimulation (DBS). It describes the global BIDS structure and some highlights of the current iEEG-BIDS specification. Adoption of iEEG-BIDS will minimize the burden of data curation, facilitate multimodal data integration, and make iEEG data more valuable to future researchers working in the specific lab and to the wider scientific community.
iEEG-BIDS Data Structure
Channels vs. Electrodes
Terms for electrodes (a physical object), and channels (a part of an acquisition system) can potentially overlap, and several definitions were discussed and added as a part of the iEEG-BIDS and EEG-BIDS specifications. Input from members of these communities (as well as those from others such as MEG) resulted in the following definitions for “electrode” and “channel”:
Channel: a single analog-digital converter in the recording system that regularly samples the value of a transducer, which results in a signal being represented as a time series in the data. This can be connected to two electrodes (to measure the potential difference between them), a magnetic field or magnetic gradient sensor, temperature sensor, accelerometer, etc.
Electrode: a single point of contact between the acquisition system and the recording site (e.g., scalp, neural tissue,…). Multiple electrodes can be organized as caps (for EEG), arrays, grids, leads, strips, probes, shafts, etc.
As the original BIDS specification dealt primarily with data from an MRI machine, it was also necessary to create standards around the units to be used for electrophysiology data. This was done in partnership with the EEG-BIDS and MEG-BIDS communities. Physical units of any data in a BIDS structure are presented according to their SI unit symbol and possibly prefix symbol (e.g., mV, µV, with the µ as unicode U + 00B5), now specified in the BIDS specification (https://bids-specification.readthedocs.io/en/latest/99-appendices/05-units.html).
Electrode Locations in iEEG-BIDS
A necessary component to interpret iEEG data are the electrode locations on the cortical surface or embedded in brain tissue. Electrode locations are generally obtained by integrating data from a CT, post-operative MRI, X-ray, or operative photo. Electrodes are then identified and sorted according to medical records, such as a sketch made by the neurological or neurosurgical team. There are several semi-automated software packages that allow researchers to do this. The iEEG-BIDS specification requires that any electrode locations are paired with explicit coordinate systems and, where applicable, the path to an image that can be used to visualize the electrodes on a brain. These may be volume files (e.g., .nii.gz), cortical surfaces, or 2-D images of the patient’s brain. To accommodate localization of iEEG electrodes, iEEG-BIDS added several new options for localization metadata in “_electrodes.tsv” and “_coordsystem.json” files. Electrodes can be localized in multiple spaces by specifying multiple JSON files, and the IntendedFor field makes it straightforward to pair electrode position data with its corresponding image. Finally, iEEG-BIDS explicitly allows for electrode positions to be given in 2-dimensional space in the event that anatomical data are only provided in the form of either operative photos or cortical surface photos.
Data Formats for iEEG
A challenge in extending the BIDS format to iEEG data was handling the diversity of data formats. Contrary to the MRI community, there is no single accepted format used across iEEG groups. In choosing the data formats considered to be compliant with iEEG-BIDS, the community attempted to cover as many possible iEEG data use-cases with as few unique formats as possible, and an informal survey was sent to the electrophysiology communities to help determine which formats were most suitable as “first class citizens” in the iEEG-BIDS specification. A description of this process and the results was originally published in a blog post for the Berkeley Institute for Data Science (https://bids.berkeley.edu/news/bids-megeegieeg-data-format-survey).
After reviewing community feedback and discussing with the MEG-BIDS and EEG communities10, the iEEG-BIDS community decided to support two classes of data formats: compliant formats, and unofficially-supported formats (see the blog post).
There are two compliant data formats for the iEEG-BIDS extensions: European Data Format (https://en.wikipedia.org/wiki/European_Data_Format, .edf files, and BrainVision Core Data Format (.vhdr, .vmrk, and eeg) (https://www.brainproducts.com/productdetails.php?id=21&tab=5). They have been chosen because they jointly cover the majority of use-cases in iEEG while also providing a solution for most major technical challenges in iEEG data. EDF is a prolific format in the iEEG community and offers variable sampling rates per channel. BrainVision is supported by EEG-BIDS, and makes up for some technical shortcomings of EDF (such as being able to store data to a higher level of numerical precision of up to 32 bits). Compliant formats in iEEG-BIDS will continue to be supported in the future, and will have the majority of community effort and development in creating tooling.
Unofficially supported formats
There are three “unofficially-supported” formats. Their use is discouraged, though allowed for reasons stated below. These unofficially-supported formats are: Neurodata Without Borders (.nwb) due to its shared goals in facilitating sharable and reproducible neurophysiology datasets, EEGLab (.set) due to its prevalent use in the iEEG community, and Multiscale Electrophysiology Format version 3 (MEF3) due to its suitability and future potential for clinical iEEG recordings and device-related applications (such as HIPAA-compliant multi-layer encryption of sensitive data). Unofficially-supported formats will pass the validator, but are not guaranteed to become supported in the future, and unofficial support may be dropped.
There is no hard rule about the number of compliant data formats allowed, though the number will be kept as low as possible. Unofficially supported formats may be dropped (if they offer redundant functionality or if their usage drops significantly), or promoted to compliant format status (if they fill a specific niche and meet the guidelines for compliant format status). This process will be carried out by the iEEG-BIDS community in future extension proposals.
Community Software, Datasets, and Adoption
BIDS is a community project with two primary products: a specification for organizing neuroscience data, and a collection of software and tooling that facilitates the use of BIDS data structures. Creating the iEEG-BIDS specification involved the development of several new community tools. Below we list those that required the most new development for iEEG-BIDS.
The BIDS validator
Online iEEG datasets organized according to iEEG-BIDS
As a part of creating the iEEG-BIDS specification, five datasets were converted to BIDS format and added to the BIDS-examples github repository (github.com/bids-standard/bids-examples). These examples are meant to demonstrate how the BIDS specification maps onto different scientific use-cases. The neural data of each dataset is removed in order to make it easier to download, though instructions are provided for accessing the full datasets. The datasets available include: an auditory filtered speech experiment, a motor-movement dataset, a visual stimulus dataset, seizure sEEG recordings from a focal epilepsy of the left temporo-occipital junction, and a multimodal dataset with fMRI and ECoG per subject.
The BIDS starter kit
The BIDS starter kit is a collection of community-driven guides, tutorials, helper scripts, and wiki resources to help researchers get started with the BIDS data structure (github.com/bids-standard/bids-starter-kit). These resources cover the two main languages supported by iEEG-BIDS (Matlab and Python). A tutorial that describes how to create a BIDS-compatible iEEG dataset has been provided on the starter-kit wiki (http://github.com/bids-standard/bids-starter-kit/wiki/Creating-a-BIDS-compatible-iEEG-dataset) and Matlab and Python scripts are also available to produce iEEG sidecar .json and .tsv files.
pybv and pyedf
While many neuroscience toolboxes exist for the Matlab language, there are relatively fewer for Python. To improve Python support for the primary data formats supported by iEEG-BIDS, two new python packages were created for writing BrainVision (pybv, github.com/bids-standard/pybv) and European Data Format (github.com/bids-standard/pyedf) files. These will be maintained by the BIDS community.
MNE-BIDS and MNE-Python
The MNE-Python package is an open-source tool for electrophysiology analysis, visualization, and data representation in Python, and has recently been extended to include functionality for iEEG. Alongside the creation of the iEEG-BIDS specification, the community worked alongside those in the EEG and MEG communities to create a new package for moving between MNE-Python and the BIDS specifications in electrophysiology: MNE-BIDS (github.com/mne-tools/mne-bids). MNE-BIDS facilitates converting electrophysiology workflows in MNE-Python into the BIDS dataset framework11.
FieldTrip is an open toolbox for electrophysiology analytics in the Matlab language12,13. It supports importing data from a large number of iEEG formats and can export data to BIDS recommended formats. Furthermore, FieldTrip includes the data2bids.m function to help users to organize their iEEG and MRI data and to provide proper metadata annotation (www.fieldtriptoolbox.org/example/bids).
iELVis (github.com/iELVis/iELVis) is an open source Matlab package for localizing iEEG electrodes and visualizing their data overlaid on neuroimaging14. It can read and write iEEG electrode coordinates and associated neuroimaging files using BIDS-iEEG conventions. See the BIDS-iEEG compatibility page for more information (http://ielvis.pbworks.com/w/page/130759893/BIDS-iEEG%20Compatibility).
Brainstorm is an open-source Matlab application for the analysis of multimodal neurophysiology data15. It provides user interfaces for positioning electrode contacts in post-implantation CT or T1 scans as well as reviewing/annotating long data records such as clinical iEEG signals (neuroimage.usc.edu/brainstorm/Tutorials/Epileptogenicity). It supports most file formats commonly used in iEEG and can convert them into BrainVision or EDF files. Studies in Brainstorm’s database can be imported and exported automatically as BIDS-formatted datasets.
Open Neuro is a repository for public neuroimaging data, currently supporting MRI and MEG (OpenNeuro.org). It heavily capitalizes on the BIDS standard - each dataset is validated prior to upload using the bids-validator. OpenNeuro now supports, validates, and accepts iEEG-BIDS data. This allows researchers that adopted BIDS in their labs to easily archive and share their iEEG datasets online.
The BIDS specification is an ongoing process with a growing community. It uses the BIDS Extension Proposals (BEP) process to discuss and integrate improvements in the BIDS specification. Several outstanding questions will require further community input and discussion, such as formally describing coordinate systems, merging metadata across modalities, and handling derivatives of raw iEEG data. In particular, further discussion is warranted to adapt iEEG-BIDS for non-human subjects and clinical iEEG recordings. As projects such as BIDS make datasets easier to discover and use, it is particularly important to protect the privacy of subjects. BIDS does not directly address privacy concerns - it only provides a structure for how the data should be stored. It is possible for data to be stored with BIDS in a manner that does not divulge subject identity (for example, by removing identifiable images and stripping any patient information from the data file), but this is up to the researcher. Future extensions to the BIDS specification, and documentation from the BIDS community, could help guide researchers in ensuring the privacy of the individuals that have provided their data in a BIDS dataset.
This process will be further improved as the BIDS community continues to grow. Data sharing, reproducibility, and quality control are priority areas of large research consortia, such as the US Brain Research through Advancing Innovative Neurotechnologies (BRAIN) initiative as well as the Human Brain Project (HBP). Within these efforts it has become clear that community-wide accepted data standards are essential16. Within the HBP, iEEG-BIDS has been adopted in the Medical Informatics Platform (where it is intended to be deployed in several hospitals for conducting multicenter studies) (http://humanbrainproject.eu/en/medicine/) as well as the Neuroinformatics Platform (where it is supported in the HBP data sharing platform as well as the HBP interactive atlas viewers) (https://www.humanbrainproject.eu/en/explore-the-brain/neuroinformatics-platform/). These institutional stakeholders will be critical in spreading the adoption of BIDS, and encouraging more voices to guide the evolution of the specification moving forward.
iEEG-BIDS specifies a structured way of storing iEEG data and metadata. BIDS is a community-driven project, and the iEEG-BIDS specification was created after many months of open discussion with the broader iEEG community. One of the core benefits of adopting community standards such as iEEG-BIDS is that it provides a common point that can be the basis for future collaborations. It facilitates reproducibility and cross-modal integration across datasets, experiments, and recording sites.
Gorgolewski, K. J. et al. The brain imaging data structure, a format for organizing and describing outputs of neuroimaging experiments. Sci. Data 3, 160044 (2016).
Niso, G. et al. MEG-BIDS, the brain imaging data structure extended to magnetoencephalography. Sci. Data 5, 180110 (2018).
Bancaud, J. & Talairach, J. La stéréo-électroencéphalographie dans l’épilepsie: informations neurophysiopathologiques apportées par l’investigation fonctionnelle stéreotaxique. (Masson, 1965).
Penfield, W. & Perot, P. The Brain’s Record of Auditory and Visual Experience, a Final Summary and Discussion. Brain 86, 595–696 (1963).
Crone, N. E., Korzeniewska, A. & Franaszczuk, P. J. Cortical γ responses: searching high and low. Int. J. Psychophysiol. Off. J. Int. Organ. Psychophysiol 79, 9–15 (2011).
Jerbi, K. et al. Task-related gamma-band dynamics from an intracerebral perspective: review and implications for surface EEG and MEG. Hum. Brain Mapp. 30, 1758–1771 (2009).
Johnson, E. L. & Knight, R. T. Intracranial recordings and human memory. Curr. Opin. Neurobiol. 31, 18–25 (2015).
Miller, K. J., Zanos, S., Fetz, E. E., den Nijs, M. & Ojemann, J. G. Decoupling the cortical power spectrum reveals real-time representation of individual finger movements in humans. J. Neurosci. Off. J. Soc. Neurosci. 29, 3132–7 (2009).
Ritaccio, A. et al. Proceedings of the Fifth International Workshop on Advances in Electrocorticography. Epilepsy Behav. EB 41, 183–192 (2014).
Pernet, C. R. et al. BIDS-EEG: an extension to the Brain Imaging Data Structure (BIDS) Specification for electroencephalography. Preprint at, https://psyarxiv.com/63a4y/ (2019)
Gramfort, A. et al. MEG and EEG data analysis with MNE-Python. Front. Neurosci. 7, 267 (2013).
Oostenveld, R., Fries, P., Maris, E. & Schoffelen, J.-M. FieldTrip: Open Source Software for Advanced Analysis of MEG, EEG, and Invasive Electrophysiological Data. Intell Neurosci 2011, 1:1–1:9 (2011).
Stolk, A. et al. Integrated analysis of anatomical and electrophysiological human intracranial data. Nat. Protoc. 13, 1699 (2018).
Groppe, D. M. et al. iELVis: An open source MATLAB toolbox for localizing and visualizing human intracranial electrode data. J. Neurosci. Methods 281, 40–48 (2017).
Tadel, F., Baillet, S., Mosher, J. C., Pantazis, D. & Leahy, R. M. Brainstorm: A user-friendly application for MEG/EEG analysis. Computational Intelligence and Neuroscience. 2011, https://doi.org/10.1155/2011/879716 (2011).
Ferguson, A. R., Nielson, J. L., Cragin, M. H., Bandrowski, A. E. & Martone, M. E. Big data from small data: data-sharing in the “long tail” of neuroscience. Nature Neuroscience. 17, 1442–1447, https://doi.org/10.1038/nn.3838 (2014).
Wang, L., Mruczek, R. E. B., Arcaro, M. J. & Kastner, S. Probabilistic Maps of Visual Topography in Human Cortex. Cereb. Cortex N. Y. N 1991 25, 3911–3931 (2015).
We are grateful to Cyril Pernet and the EEG-BIDS team for sharing their article draft of the EEG-BIDS specification and to Elizabeth Dupre and Patrick Park for their help with the bids-starter-kit. This work was supported by: The National Institute of Neurological Disorders and Stroke (NINDS) under award number R37NS21135. The Gordon and Betty Moore Foundation through grant GBMF3834 and by the Alfred P. Sloan Foundation through grant 2013-10-27 to the University of California, Berkeley to CH. The Netherlands Organisation for Scientific Research (NWO, 016.VENI.178.048) to DH. The European Research Council under the European Union’s Seventh Framework Programme (FP/2007-2013)/ERC Grant Agreement no. 616268 F-TRACT to OD. The European Union’s Horizon 2020 Framework Programme for Research and Innovation under Specific Grant Agreement No. 785907 (Human Brain Project SGA2), 720270 (Human Brain Project SGA1) to OD and LZ. ERC grant 320708, ‘iCONNECT’ to NFR. Marie Sklodowska-Curie Global Fellowship (658868) to AS. National Institute of Mental Health Award R24-MH114705-01 to KG, The Van Wagenen Foundation to KJM, The NIH, NIMH, BRAIN Initiative grant #: R01MH111417 to NP, NFR, and JW, ERC Grant Agreement no. 616268 F-TRACT to FT. NSF ERC EEC-1028725 to JO. The Sloan Research Fellowship (FG-2015-66057), the Whitehall Foundation (2017-12-73) to BV. The National Science Foundation under grant BCS-1736028 to BV.
Gorgolewski, K. is a part-time Kaggle Research Consultant for Google. Wandell, B. is a co-founder of Flywheel.io, a commercial venture that supports the BIDS standard.
Publisher’s note: Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
About this article
Cite this article
Holdgraf, C., Appelhoff, S., Bickel, S. et al. iEEG-BIDS, extending the Brain Imaging Data Structure specification to human intracranial electrophysiology. Sci Data 6, 102 (2019). https://doi.org/10.1038/s41597-019-0105-7
This article is cited by
Intracranial electrophysiological recordings from the human brain during memory tasks with pupillometry
Scientific Data (2022)
Scientific Data (2022)
Scientific Data (2022)
Scientific Data (2022)