From 7ec5d5e780b24d32a0f4885b80390e7089f057eb Mon Sep 17 00:00:00 2001 From: Julia Sprenger Date: Wed, 9 Nov 2022 18:11:26 +0100 Subject: [PATCH 01/20] Add first BEP032 objects --- src/schema/objects/extensions.yaml | 5 +++++ src/schema/objects/modalities.yaml | 3 +++ src/schema/objects/suffixes.yaml | 10 ++++++++++ 3 files changed, 18 insertions(+) diff --git a/src/schema/objects/extensions.yaml b/src/schema/objects/extensions.yaml index 96056e497d..21535aae96 100644 --- a/src/schema/objects/extensions.yaml +++ b/src/schema/objects/extensions.yaml @@ -189,6 +189,11 @@ niigz: display_name: Compressed NIfTI description: | A compressed Neuroimaging Informatics Technology Initiative (NIfTI) data file. +nix: + value: .nix + display_name: Neuroscience Information Exchange Format + description: | + A [Neuroscience Information Exchange](https://nixio.readthedocs.io) file. nwb: value: .nwb display_name: Neurodata Without Borders Format diff --git a/src/schema/objects/modalities.yaml b/src/schema/objects/modalities.yaml index 4809e380df..23f377371d 100644 --- a/src/schema/objects/modalities.yaml +++ b/src/schema/objects/modalities.yaml @@ -35,3 +35,6 @@ motion: nirs: display_name: Near-Infrared Spectroscopy description: Data acquired with NIRS. +ephys: + display_name: Electrophysiology + description: Data acquired using microelectrodes. diff --git a/src/schema/objects/suffixes.yaml b/src/schema/objects/suffixes.yaml index 16e410c70d..c4ec793c2c 100644 --- a/src/schema/objects/suffixes.yaml +++ b/src/schema/objects/suffixes.yaml @@ -571,6 +571,11 @@ electrodes: display_name: Electrodes description: | File that gives the location of (i)EEG electrodes. +ephys: + value: ephys + display_name: Electrophysiology + description: | + Extra- or intracellular microelectrode recording data. epi: value: epi display_name: EPI @@ -727,6 +732,11 @@ physio: display_name: Physiological recording description: | Physiological recordings such as cardiac and respiratory signals. +probe: + value: probe + display_name: A recording probe + description: | + A probe with one or more recording contacts. probseg: value: probseg display_name: Probabilistic Segmentation From 2f393ca1925e4ba5fcb999ded7a81bb21323b3e7 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Wed, 14 Feb 2024 12:12:34 -0500 Subject: [PATCH 02/20] Add ephys modality, start adding _channels but ran into a question on _acq- --- src/schema/objects/entities.yaml | 6 +++--- src/schema/rules/files/raw/channels.yaml | 10 ++++++++++ src/schema/rules/files/raw/ephys.yaml | 18 ++++++++++++++++++ 3 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 src/schema/rules/files/raw/ephys.yaml diff --git a/src/schema/objects/entities.yaml b/src/schema/objects/entities.yaml index 6facc34c0d..2745e7bc1b 100644 --- a/src/schema/objects/entities.yaml +++ b/src/schema/objects/entities.yaml @@ -331,12 +331,12 @@ split: display_name: Split description: | In the case of long data recordings that exceed a file size of 2Gb, - `.fif` files are conventionally split into multiple parts. - Each of these files has an internal pointer to the next file. + `.fif`, `.nwb`, `.nix` files are conventionally split into multiple parts. + Each of the `.fif` files has an internal pointer to the next file. This is important when renaming these split recordings to the BIDS convention. Instead of a simple renaming, files should be read in and saved under their - new names with dedicated tools like [MNE-Python](https://mne.tools/), + new names with dedicated tools like [MNE-Python](https://mne.tools/) for `.fif`, which will ensure that not only the filenames, but also the internal file pointers, will be updated. It is RECOMMENDED that `.fif` files with multiple parts use the `split-` entity to indicate each part. diff --git a/src/schema/rules/files/raw/channels.yaml b/src/schema/rules/files/raw/channels.yaml index 06c213be17..8a126871af 100644 --- a/src/schema/rules/files/raw/channels.yaml +++ b/src/schema/rules/files/raw/channels.yaml @@ -16,6 +16,16 @@ channels: acquisition: optional run: optional +# ephys has one removed +# TODO: see if to be added for consistency etc. +channels__ephys: + $ref: rules.files.raw.channels.channels + datatypes: + - meg + entities: + $ref: rules.files.raw.channels.channels.entities + acquisition: + # MEG has an additional entity available channels__meg: $ref: rules.files.raw.channels.channels diff --git a/src/schema/rules/files/raw/ephys.yaml b/src/schema/rules/files/raw/ephys.yaml new file mode 100644 index 0000000000..70457310ac --- /dev/null +++ b/src/schema/rules/files/raw/ephys.yaml @@ -0,0 +1,18 @@ +--- +ephys: + suffixes: + - ephys + extensions: + - .nwb + # possible future: serialization in .zarr format to accompany .ome.zarr + # - .nwb.zarr + - .nix + datatypes: + - ephys + entities: + subject: required + session: optional + sample: optional + task: optional + run: optional + split: optional From 648781af9b0eaa8173fc6d1e671829ea1e009c86 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Tue, 5 Mar 2024 19:56:11 -0500 Subject: [PATCH 03/20] Add _acq- to ephys, add _channels and _coords --- src/schema/rules/files/raw/channels.yaml | 18 ++++++++++++++---- src/schema/rules/files/raw/ephys.yaml | 1 + 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/schema/rules/files/raw/channels.yaml b/src/schema/rules/files/raw/channels.yaml index 8a126871af..d3415c1b7f 100644 --- a/src/schema/rules/files/raw/channels.yaml +++ b/src/schema/rules/files/raw/channels.yaml @@ -16,15 +16,14 @@ channels: acquisition: optional run: optional -# ephys has one removed -# TODO: see if to be added for consistency etc. +# ephys has an additional 'sample' entity channels__ephys: $ref: rules.files.raw.channels.channels datatypes: - - meg + - ephys entities: $ref: rules.files.raw.channels.channels.entities - acquisition: + sample: optional # MEG has an additional entity available channels__meg: @@ -67,6 +66,17 @@ coordsystem__eeg: $ref: rules.files.raw.channels.coordsystem.entities space: optional +# ephys has sample AND space entities +coordsystem__ephys: + $ref: rules.files.raw.channels.coordsystem + datatypes: + - ephys + - iephys + entities: + $ref: rules.files.raw.channels.coordsystem.entities + sample: optional + space: optional + electrodes: suffixes: - electrodes diff --git a/src/schema/rules/files/raw/ephys.yaml b/src/schema/rules/files/raw/ephys.yaml index 70457310ac..35691fbc10 100644 --- a/src/schema/rules/files/raw/ephys.yaml +++ b/src/schema/rules/files/raw/ephys.yaml @@ -14,5 +14,6 @@ ephys: session: optional sample: optional task: optional + acquisition: optional run: optional split: optional From d3c9996888788760237221f8e12e1eeddfb7d74c Mon Sep 17 00:00:00 2001 From: Horea Christian Date: Wed, 6 Mar 2024 11:35:24 -0500 Subject: [PATCH 04/20] Draft for probes TSV file --- src/schema/objects/columns.yaml | 100 ++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) diff --git a/src/schema/objects/columns.yaml b/src/schema/objects/columns.yaml index ba9f86ba31..5dbd7f6b37 100644 --- a/src/schema/objects/columns.yaml +++ b/src/schema/objects/columns.yaml @@ -42,6 +42,38 @@ age: for privacy purposes. type: number unit: year +alpha_rotation: + name: alpha_rotation + display_name: Alpha rotation + description: | + Euler angle to match probe extension dimensions (width, height, depth) to global x, y, z coordinates. + unit: + degree +associated_brain_region: + name: associated_brain_region + display_name: Associated brain region + description: | + A textual indication on the location of the probe, preferably species-independent terms as obtained e.g. from Uberon. + type: string +associated_brain_region_id: + name: associated_uberon_brain_region_id + display_name: Associated brain region identifier + description: | + An identifier of the associated brain region based on the Uberon ontology for anatomical structures in animals. E.g. “UBERON:0010415” + type: number +associated_brain_region_quality_type: + name: associated_brain_region_quality_type + display_name: Associated brain region quality type + description: | + The method used to identify the associated brain region (estimated|proof) depending on anatomical pictures proofing the location or indirect estimation of the location. + type: string +beta_rotation: + name: beta_rotation + display_name: Beta rotation + description: | + Euler angle to match probe extension dimensions (width, height, depth) to global x, y, z coordinates. + unit: + degree cardiac: name: cardiac display_name: Cardiac measurement @@ -84,6 +116,19 @@ component: - $ref: objects.enums.quat_z.value - $ref: objects.enums.quat_w.value - n/a +contact_count: + name: contact_count + display_name: Contact count + description: | + Number of miscellaneous analog contacts for auxiliary signals. + type: number +depth__probes: + name: height + display_name: Height + description: | + Physical height of the probe. + type: number + unit: mm detector__channels: name: detector display_name: Detector Name @@ -116,6 +161,12 @@ description: description: | Brief free-text description of the channel, or other information of interest. type: string +device_serial_number: + name: device_serial_number + display_name: Device serial number + description: | + The serial number of the probe (provided by the manufacturer). + type: string description__optode: name: description display_name: Description @@ -151,6 +202,13 @@ filename: Relative paths to files. type: string format: participant_relative +gamma_rotation: + name: gamma_rotation + display_name: Gamma rotation + description: | + Euler angle to match probe extension dimensions (width, height, depth) to global x, y, z coordinates. + unit: + degree group__channel: name: group display_name: Channel group @@ -192,6 +250,13 @@ handedness: - AMBIDEXTROUS - Ambidextrous - n/a +height__probes: + name: height + display_name: Height + description: | + Physical height of the probe. + type: number + unit: mm hemisphere: name: hemisphere display_name: Electrode hemisphere @@ -267,6 +332,12 @@ material: description: | Material of the electrode (for example, `Tin`, `Ag/AgCl`, `Gold`). type: string +material__probes: + name: material__probes + display_name: Material + description: | + A textual description of the base material of the probe. + type: string metabolite_parent_fraction: name: metabolite_parent_fraction display_name: Metabolite parent fraction @@ -391,6 +462,12 @@ reference__ieeg: - type: string enum: - n/a +reference_atlas: + name: reference_atlas + display_name: Reference atlas + description: | + Name of reference atlas used for associated brain region identification, preferrably an ebrains supported atlas. + type: string reference_frame: name: reference_frame display_name: Reference frame @@ -703,6 +780,12 @@ type__optodes: - $ref: objects.enums.source.value - $ref: objects.enums.detector.value - n/a +type__probes: + name: type + display_name: Type + description: | + The type of the probe. + type: string units: name: units display_name: Units @@ -785,6 +868,13 @@ whole_blood_radioactivity: Radioactivity in whole blood samples, in unit of radioactivity measurements in whole blood samples (for example, `kBq/mL`). type: number +width__probes: + name: width + display_name: Width + description: | + Physical width of the probe. + type: number + unit: mm x: name: x display_name: X position @@ -870,3 +960,13 @@ template_z: - type: string enum: - n/a +template_z: + name: template_z + display_name: Z template position + description: | + Assumed or ideal position along the z axis. + anyOf: + - type: number + - type: string + enum: + - n/a From 08c92cda6d6bbc506316cd97d50ce501169fe3d9 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Fri, 15 Mar 2024 16:25:08 -0400 Subject: [PATCH 05/20] Fix preferably typo --- src/schema/objects/columns.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/schema/objects/columns.yaml b/src/schema/objects/columns.yaml index 5dbd7f6b37..7119abcf5d 100644 --- a/src/schema/objects/columns.yaml +++ b/src/schema/objects/columns.yaml @@ -466,7 +466,7 @@ reference_atlas: name: reference_atlas display_name: Reference atlas description: | - Name of reference atlas used for associated brain region identification, preferrably an ebrains supported atlas. + Name of reference atlas used for associated brain region identification, preferably an ebrains supported atlas. type: string reference_frame: name: reference_frame From e2030ace9c7f8dd3690ab2e82510bcc0623f5462 Mon Sep 17 00:00:00 2001 From: Horea Christian Date: Wed, 17 Apr 2024 11:59:52 -0400 Subject: [PATCH 06/20] Comment out not yet defined iephys and add ephys to datatypes where it was missing --- src/schema/objects/datatypes.yaml | 4 ++++ src/schema/rules/files/raw/channels.yaml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/schema/objects/datatypes.yaml b/src/schema/objects/datatypes.yaml index c51fa41382..b3751303b7 100644 --- a/src/schema/objects/datatypes.yaml +++ b/src/schema/objects/datatypes.yaml @@ -20,6 +20,10 @@ eeg: value: eeg display_name: Electroencephalography description: Electroencephalography +ephys: + value: ephys + display_name: Electrophysiology + description: Data acquired using microelectrodes. fmap: value: fmap display_name: Field maps diff --git a/src/schema/rules/files/raw/channels.yaml b/src/schema/rules/files/raw/channels.yaml index d3415c1b7f..b2b0470252 100644 --- a/src/schema/rules/files/raw/channels.yaml +++ b/src/schema/rules/files/raw/channels.yaml @@ -71,7 +71,7 @@ coordsystem__ephys: $ref: rules.files.raw.channels.coordsystem datatypes: - ephys - - iephys + # TODO - iephys entities: $ref: rules.files.raw.channels.coordsystem.entities sample: optional From 53f108743baf91911a91e20decaa815201131c16 Mon Sep 17 00:00:00 2001 From: Horea Christian Date: Wed, 17 Apr 2024 17:38:24 -0400 Subject: [PATCH 07/20] Added probes file --- src/schema/objects/suffixes.yaml | 5 +++++ src/schema/rules/files/raw/ephys.yaml | 16 ++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/src/schema/objects/suffixes.yaml b/src/schema/objects/suffixes.yaml index c4ec793c2c..ffc0c8c97e 100644 --- a/src/schema/objects/suffixes.yaml +++ b/src/schema/objects/suffixes.yaml @@ -737,6 +737,11 @@ probe: display_name: A recording probe description: | A probe with one or more recording contacts. +probes: + value: probes + display_name: Implanted physical devices + description: | + Physical devices used for recording ephys data, whether chronically or acutely implanted. probseg: value: probseg display_name: Probabilistic Segmentation diff --git a/src/schema/rules/files/raw/ephys.yaml b/src/schema/rules/files/raw/ephys.yaml index 35691fbc10..460c99bed4 100644 --- a/src/schema/rules/files/raw/ephys.yaml +++ b/src/schema/rules/files/raw/ephys.yaml @@ -17,3 +17,19 @@ ephys: acquisition: optional run: optional split: optional + +probes: + suffixes: + - probes + extensions: + - .tsv + datatypes: + - ephys + entities: + subject: required + session: optional + sample: optional + task: optional + acquisition: optional + run: optional + split: optional From fa648fe896a0c10dff51f991c8dd2377514a3fbf Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Thu, 18 Apr 2024 13:00:49 -0400 Subject: [PATCH 08/20] Describe modality/datatype as "Microelectrode Electrophysiology" otherwise "Electrophysiology" is too broad. Thanks @dorahermes for the note --- src/schema/objects/modalities.yaml | 2 +- src/schema/objects/suffixes.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/schema/objects/modalities.yaml b/src/schema/objects/modalities.yaml index 23f377371d..701bd42b05 100644 --- a/src/schema/objects/modalities.yaml +++ b/src/schema/objects/modalities.yaml @@ -36,5 +36,5 @@ nirs: display_name: Near-Infrared Spectroscopy description: Data acquired with NIRS. ephys: - display_name: Electrophysiology + display_name: Microelectrode Electrophysiology description: Data acquired using microelectrodes. diff --git a/src/schema/objects/suffixes.yaml b/src/schema/objects/suffixes.yaml index ffc0c8c97e..bf61d2fc00 100644 --- a/src/schema/objects/suffixes.yaml +++ b/src/schema/objects/suffixes.yaml @@ -573,7 +573,7 @@ electrodes: File that gives the location of (i)EEG electrodes. ephys: value: ephys - display_name: Electrophysiology + display_name: Microelectrode Electrophysiology description: | Extra- or intracellular microelectrode recording data. epi: From eef67dff1a333425556aa5098fb3a885e2654516 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Thu, 18 Apr 2024 12:57:38 -0400 Subject: [PATCH 09/20] Remove iephys entirely since I think it was just inspired by DANDI layout not BEP032 --- src/schema/rules/files/raw/channels.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/src/schema/rules/files/raw/channels.yaml b/src/schema/rules/files/raw/channels.yaml index b2b0470252..e96c440bcf 100644 --- a/src/schema/rules/files/raw/channels.yaml +++ b/src/schema/rules/files/raw/channels.yaml @@ -71,7 +71,6 @@ coordsystem__ephys: $ref: rules.files.raw.channels.coordsystem datatypes: - ephys - # TODO - iephys entities: $ref: rules.files.raw.channels.coordsystem.entities sample: optional From 27547f9e7120ba46014a47c48e0e31535c0a9efd Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Thu, 18 Apr 2024 14:04:31 -0400 Subject: [PATCH 10/20] Initial content for ephys document and initial filename template tree --- .../microelectrode-electrophysiology.md | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 src/modality-specific-files/microelectrode-electrophysiology.md diff --git a/src/modality-specific-files/microelectrode-electrophysiology.md b/src/modality-specific-files/microelectrode-electrophysiology.md new file mode 100644 index 0000000000..1fb8522ec1 --- /dev/null +++ b/src/modality-specific-files/microelectrode-electrophysiology.md @@ -0,0 +1,49 @@ +# Microelectrode Electrophysiology + +Support for Microelectrode Electrophysiology was developed as a [BIDS Extension Proposal](../extensions.md#bids-extension-proposals) [BEP032: Animal electrophysiology (ephys)](https://bids.neuroimaging.io/bep032). Please see [Citing BIDS](../introduction.md#citing-bids) on how to appropriately credit this extension when referring to it in the context of the academic literature. + +This BEP has been initiated by members of the INCF Working Group on Standardized Data Structures, that was initiated in 2020 to develop a set of specifications and tools that would allow the standardization of a directory structure for experimental data recorded with animal models in neuroscience, and its associated metadata. +Please consider joining this working group if you would like to contribute to this effort. +You can also reach the moderators of this BEP through our [main discussion forum](https://github.com/INCF/neuroscience-data-structure/issues), where you can participate in existing discussions or raise new questions / issues. +Most core principles of the original BIDS and particulars of BIDS-iEEG specification are adopted for this modality as well, though some special considerations and additional fields were added. + +Several [example x datasets](https://bids-standard.github.io/bids-examples/#ephys) have been formatted using this specification and can be used for practical guidance when curating a new dataset. + + +## Primary data file formats + +Unprocessed (animal) `ephys` data must be stored in an [open file format](https://en.wikipedia.org/wiki/Open_format), while the native format, if different, can be stored in an optional `sourcedata/` directory. +The native file format is used in case conversion elicits the loss of crucial metadata specific to manufacturers and specific `ephys` systems. +Metadata should be included alongside the data in the `.json` and `.tsv` files. +The current list of allowed data file formats: + +| **Format** | **Extension(s)** | **Description** | +---------------------------------------------------------------------------|---------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [Neuroscience Information Exchange Format](https://nixio.readthedocs.io) | `.nix` | A generic and open framework with an hdf5 backend and a defined interface to many ephys formats via the [Neo library](https://neo.readthedocs.io). The `.nix` file has to contain a valid Neo structure, see also https://github.com/neuralensemble/python-neo. | +| [Neurodata Without Borders](http://nwb.org) | `.nwb` | BRAIN Initiative Data Standard based on an hdf5 backend ... | + + +Both of these formats can also store essential metadata of the datasets. +Some of these need to be duplicated in BIDS `.tsv` and `.json` sidecar files. +Even though the duplication requires additional effort to ensure the consistency of the data, it provides a number of advantages: +- Making the dataset easier for humans to scan as essential information is easily accessible without loading the data files +- The dataset follows the BIDS standard and can benefit from tools building on top of this standard (e.g., the validator) +- It simplifies the separation of data and basic metadata, e.g. for the purpose of publishing the dataset in a light-weight fashion with access to the data files on request (e.g. using Datalad). + +## + + +{{ MACROS___make_filename_template( + "raw", + datatypes=["ephys"], + suffixes=["ephys", "events"] +}} +``` + + From 9a20e4bd47f3dd5fb23f48df07f249569f5bf3e7 Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Fri, 19 Apr 2024 09:28:09 +0200 Subject: [PATCH 11/20] pacify pre-commit --- src/schema/objects/columns.yaml | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/src/schema/objects/columns.yaml b/src/schema/objects/columns.yaml index 61f1f62f31..6a5b7432a5 100644 --- a/src/schema/objects/columns.yaml +++ b/src/schema/objects/columns.yaml @@ -53,19 +53,22 @@ associated_brain_region: name: associated_brain_region display_name: Associated brain region description: | - A textual indication on the location of the probe, preferably species-independent terms as obtained e.g. from Uberon. + A textual indication on the location of the probe, + preferably species-independent terms as obtained, for example from Uberon. type: string associated_brain_region_id: name: associated_uberon_brain_region_id display_name: Associated brain region identifier description: | - An identifier of the associated brain region based on the Uberon ontology for anatomical structures in animals. E.g. “UBERON:0010415” + An identifier of the associated brain region based on the Uberon ontology + for anatomical structures in animals, for example “UBERON:0010415” type: number associated_brain_region_quality_type: name: associated_brain_region_quality_type display_name: Associated brain region quality type description: | - The method used to identify the associated brain region (estimated|proof) depending on anatomical pictures proofing the location or indirect estimation of the location. + The method used to identify the associated brain region (estimated|proof) + depending on anatomical pictures proofing the location or indirect estimation of the location. type: string beta_rotation: name: beta_rotation @@ -981,13 +984,3 @@ template_z: - type: string enum: - n/a -template_z: - name: template_z - display_name: Z template position - description: | - Assumed or ideal position along the z axis. - anyOf: - - type: number - - type: string - enum: - - n/a From 760927660227a852996d4dd867aaead78eda9847 Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Fri, 19 Apr 2024 09:29:50 +0200 Subject: [PATCH 12/20] add to TOC --- mkdocs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/mkdocs.yml b/mkdocs.yml index 114e05c135..3327915983 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -19,6 +19,7 @@ nav: - Microscopy: modality-specific-files/microscopy.md - Near-Infrared Spectroscopy: modality-specific-files/near-infrared-spectroscopy.md - Motion: modality-specific-files/motion.md + - Electrophysiology: modality-specific-files/microelectrode-electrophysiology.md - Derivatives: - BIDS Derivatives: derivatives/introduction.md - Common data types and metadata: derivatives/common-data-types.md From 9be41f9c3c960bda8abce50d78ba7483c9ffb441 Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Fri, 19 Apr 2024 09:51:29 +0200 Subject: [PATCH 13/20] semantic line break and fix --- .../microelectrode-electrophysiology.md | 29 +++++++++++++------ 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/src/modality-specific-files/microelectrode-electrophysiology.md b/src/modality-specific-files/microelectrode-electrophysiology.md index 1fb8522ec1..b3336d8430 100644 --- a/src/modality-specific-files/microelectrode-electrophysiology.md +++ b/src/modality-specific-files/microelectrode-electrophysiology.md @@ -1,18 +1,28 @@ # Microelectrode Electrophysiology -Support for Microelectrode Electrophysiology was developed as a [BIDS Extension Proposal](../extensions.md#bids-extension-proposals) [BEP032: Animal electrophysiology (ephys)](https://bids.neuroimaging.io/bep032). Please see [Citing BIDS](../introduction.md#citing-bids) on how to appropriately credit this extension when referring to it in the context of the academic literature. +Support for Microelectrode Electrophysiology was developed as a [BIDS Extension Proposal](../extensions.md#bids-extension-proposals) [BEP032: Animal electrophysiology (ephys)](https://bids.neuroimaging.io/bep032). + +Please see [Citing BIDS](../introduction.md#citing-bids) on how to appropriately credit this extension +when referring to it in the context of the academic literature. + +This BEP has been initiated by members of the INCF Working Group on Standardized Data Structures, +that was initiated in 2020 to develop a set of specifications and tools +that would allow the standardization of a directory structure for experimental data recorded +with animal models in neuroscience, and its associated metadata. -This BEP has been initiated by members of the INCF Working Group on Standardized Data Structures, that was initiated in 2020 to develop a set of specifications and tools that would allow the standardization of a directory structure for experimental data recorded with animal models in neuroscience, and its associated metadata. Please consider joining this working group if you would like to contribute to this effort. You can also reach the moderators of this BEP through our [main discussion forum](https://github.com/INCF/neuroscience-data-structure/issues), where you can participate in existing discussions or raise new questions / issues. -Most core principles of the original BIDS and particulars of BIDS-iEEG specification are adopted for this modality as well, though some special considerations and additional fields were added. -Several [example x datasets](https://bids-standard.github.io/bids-examples/#ephys) have been formatted using this specification and can be used for practical guidance when curating a new dataset. +Most core principles of the original BIDS and particulars of BIDS-iEEG specification are adopted +for this modality as well, though some special considerations and additional fields were added. +Several [example x datasets](https://bids-standard.github.io/bids-examples/#ephys) +have been formatted using this specification and can be used for practical guidance when curating a new dataset. ## Primary data file formats -Unprocessed (animal) `ephys` data must be stored in an [open file format](https://en.wikipedia.org/wiki/Open_format), while the native format, if different, can be stored in an optional `sourcedata/` directory. +Unprocessed (animal) `ephys` data must be stored in an [open file format](https://en.wikipedia.org/wiki/Open_format), +while the native format, if different, can be stored in an optional `sourcedata/` directory. The native file format is used in case conversion elicits the loss of crucial metadata specific to manufacturers and specific `ephys` systems. Metadata should be included alongside the data in the `.json` and `.tsv` files. The current list of allowed data file formats: @@ -26,9 +36,9 @@ The current list of allowed data file formats: Both of these formats can also store essential metadata of the datasets. Some of these need to be duplicated in BIDS `.tsv` and `.json` sidecar files. Even though the duplication requires additional effort to ensure the consistency of the data, it provides a number of advantages: -- Making the dataset easier for humans to scan as essential information is easily accessible without loading the data files -- The dataset follows the BIDS standard and can benefit from tools building on top of this standard (e.g., the validator) -- It simplifies the separation of data and basic metadata, e.g. for the purpose of publishing the dataset in a light-weight fashion with access to the data files on request (e.g. using Datalad). +- Making the dataset easier for humans to scan as essential information is easily accessible without loading the data files +- The dataset follows the BIDS standard and can benefit from tools building on top of this standard (e.g., the validator) +- It simplifies the separation of data and basic metadata, e.g. for the purpose of publishing the dataset in a light-weight fashion with access to the data files on request (e.g. using Datalad). ## @@ -43,7 +53,8 @@ and a guide for using macros can be found at "raw", datatypes=["ephys"], suffixes=["ephys", "events"] +) }} -``` + From 983975ae0766976246a2cf605666a9e0af27196d Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Fri, 19 Apr 2024 15:01:40 -0400 Subject: [PATCH 14/20] Addressed minor left over lint complains --- .../microelectrode-electrophysiology.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/modality-specific-files/microelectrode-electrophysiology.md b/src/modality-specific-files/microelectrode-electrophysiology.md index b3336d8430..cdc5541f11 100644 --- a/src/modality-specific-files/microelectrode-electrophysiology.md +++ b/src/modality-specific-files/microelectrode-electrophysiology.md @@ -27,11 +27,10 @@ The native file format is used in case conversion elicits the loss of crucial me Metadata should be included alongside the data in the `.json` and `.tsv` files. The current list of allowed data file formats: -| **Format** | **Extension(s)** | **Description** | ----------------------------------------------------------------------------|---------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| [Neuroscience Information Exchange Format](https://nixio.readthedocs.io) | `.nix` | A generic and open framework with an hdf5 backend and a defined interface to many ephys formats via the [Neo library](https://neo.readthedocs.io). The `.nix` file has to contain a valid Neo structure, see also https://github.com/neuralensemble/python-neo. | -| [Neurodata Without Borders](http://nwb.org) | `.nwb` | BRAIN Initiative Data Standard based on an hdf5 backend ... | - +| **Format** | **Extension(s)** | **Description** | +---------------------------------------------------------------------------|------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [Neuroscience Information Exchange Format](https://nixio.readthedocs.io) | `.nix` | A generic and open framework with an hdf5 backend and a defined interface to many ephys formats via the [Neo library](https://neo.readthedocs.io). The `.nix` file has to contain a valid Neo structure. | +| [Neurodata Without Borders](http://nwb.org) | `.nwb` | BRAIN Initiative Data Standard based on an hdf5 backend ... | Both of these formats can also store essential metadata of the datasets. Some of these need to be duplicated in BIDS `.tsv` and `.json` sidecar files. @@ -56,5 +55,4 @@ and a guide for using macros can be found at ) }} - From 1afdc40e7a82f5868b5bfa642177472cfebbea8d Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Fri, 19 Apr 2024 15:02:58 -0400 Subject: [PATCH 15/20] Add "Microelectrode" specialization for Electrophysiology in the context menu --- mkdocs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkdocs.yml b/mkdocs.yml index 3327915983..31bb10fe6a 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -19,7 +19,7 @@ nav: - Microscopy: modality-specific-files/microscopy.md - Near-Infrared Spectroscopy: modality-specific-files/near-infrared-spectroscopy.md - Motion: modality-specific-files/motion.md - - Electrophysiology: modality-specific-files/microelectrode-electrophysiology.md + - Microelectrode Electrophysiology: modality-specific-files/microelectrode-electrophysiology.md - Derivatives: - BIDS Derivatives: derivatives/introduction.md - Common data types and metadata: derivatives/common-data-types.md From 6b39d6494b42923639a6944a843e0ef0aa2c657b Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Fri, 19 Apr 2024 15:09:43 -0400 Subject: [PATCH 16/20] Fix up for bad latin and adjust wording a bit --- .../microelectrode-electrophysiology.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modality-specific-files/microelectrode-electrophysiology.md b/src/modality-specific-files/microelectrode-electrophysiology.md index cdc5541f11..71b018ee15 100644 --- a/src/modality-specific-files/microelectrode-electrophysiology.md +++ b/src/modality-specific-files/microelectrode-electrophysiology.md @@ -36,8 +36,8 @@ Both of these formats can also store essential metadata of the datasets. Some of these need to be duplicated in BIDS `.tsv` and `.json` sidecar files. Even though the duplication requires additional effort to ensure the consistency of the data, it provides a number of advantages: - Making the dataset easier for humans to scan as essential information is easily accessible without loading the data files -- The dataset follows the BIDS standard and can benefit from tools building on top of this standard (e.g., the validator) -- It simplifies the separation of data and basic metadata, e.g. for the purpose of publishing the dataset in a light-weight fashion with access to the data files on request (e.g. using Datalad). +- The dataset follows the BIDS standard and can benefit from tools building on top of this standard, starting with [bids-validator](https://github.com/bids-standard/bids-validator). +- It simplifies the separation of data and basic metadata, for example to publish a dataset in a light-weight fashion with access to the data files on request (as implemented by [DataLad](https://datalad.org)). ## From f08b163f0cb81e400b474d1ff75351f13f1c90de Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Fri, 19 Apr 2024 15:42:34 -0400 Subject: [PATCH 17/20] =?UTF-8?q?Replace=20fancy=20unicode=20=E2=80=9C=20w?= =?UTF-8?q?ith=20simple=20"=20.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I think this is what might have freaked out `schemacode_ci / windows-latest with Python 3 (pull_request) ` (windows only!) fails with a bunch of ``` 2024-04-19T19:13:44.2815607Z self = 2024-04-19T19:13:44.2818292Z input = b'---\nHED:\n name: HED\n display_name: HED Tag\n description: |\n Hierarchical Event Descriptor (HED) Tag.\n ...ed or ideal position along the z axis.\n anyOf:\n - type: number\n - type: string\n enum:\n - n/a\n' 2024-04-19T19:13:44.2820386Z final = True 2024-04-19T19:13:44.2820609Z 2024-04-19T19:13:44.2820821Z def decode(self, input, final=False): 2024-04-19T19:13:44.2821664Z > return codecs.charmap_decode(input,self.errors,decoding_table)[0] 2024-04-19T19:13:44.2823260Z E UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 2105: character maps to 2024-04-19T19:13:44.2824229Z 2024-04-19T19:13:44.2824768Z C:\hostedtoolcache\windows\Python\3.12.3\x64\Lib\encodings\cp1252.py:23: UnicodeDecodeError ``` --- src/schema/objects/columns.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/schema/objects/columns.yaml b/src/schema/objects/columns.yaml index 6a5b7432a5..5010d2453f 100644 --- a/src/schema/objects/columns.yaml +++ b/src/schema/objects/columns.yaml @@ -61,7 +61,7 @@ associated_brain_region_id: display_name: Associated brain region identifier description: | An identifier of the associated brain region based on the Uberon ontology - for anatomical structures in animals, for example “UBERON:0010415” + for anatomical structures in animals, for example "UBERON:0010415" type: number associated_brain_region_quality_type: name: associated_brain_region_quality_type From 73012b3162c12803085189b2d575ce20f9465dcd Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Fri, 19 Apr 2024 15:55:27 -0400 Subject: [PATCH 18/20] Use redirected to www.datalad.org and www.nwb.org website URLs and few others --- .../microelectrode-electrophysiology.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/modality-specific-files/microelectrode-electrophysiology.md b/src/modality-specific-files/microelectrode-electrophysiology.md index 71b018ee15..00b740de11 100644 --- a/src/modality-specific-files/microelectrode-electrophysiology.md +++ b/src/modality-specific-files/microelectrode-electrophysiology.md @@ -27,17 +27,17 @@ The native file format is used in case conversion elicits the loss of crucial me Metadata should be included alongside the data in the `.json` and `.tsv` files. The current list of allowed data file formats: -| **Format** | **Extension(s)** | **Description** | ----------------------------------------------------------------------------|------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| [Neuroscience Information Exchange Format](https://nixio.readthedocs.io) | `.nix` | A generic and open framework with an hdf5 backend and a defined interface to many ephys formats via the [Neo library](https://neo.readthedocs.io). The `.nix` file has to contain a valid Neo structure. | -| [Neurodata Without Borders](http://nwb.org) | `.nwb` | BRAIN Initiative Data Standard based on an hdf5 backend ... | +| **Format** | **Extension(s)** | **Description** | +--------------------------------------------------------------------------------------|------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [Neuroscience Information Exchange Format](https://nixio.readthedocs.io/en/latest/) | `.nix` | A generic and open framework with an hdf5 backend and a defined interface to many ephys formats via the [Neo library](https://neo.readthedocs.io/en/latest/). The `.nix` file has to contain a valid Neo structure. | +| [Neurodata Without Borders](https://www.nwb.org) | `.nwb` | BRAIN Initiative Data Standard based on an hdf5 backend ... | Both of these formats can also store essential metadata of the datasets. Some of these need to be duplicated in BIDS `.tsv` and `.json` sidecar files. Even though the duplication requires additional effort to ensure the consistency of the data, it provides a number of advantages: - Making the dataset easier for humans to scan as essential information is easily accessible without loading the data files - The dataset follows the BIDS standard and can benefit from tools building on top of this standard, starting with [bids-validator](https://github.com/bids-standard/bids-validator). -- It simplifies the separation of data and basic metadata, for example to publish a dataset in a light-weight fashion with access to the data files on request (as implemented by [DataLad](https://datalad.org)). +- It simplifies the separation of data and basic metadata, for example to publish a dataset in a light-weight fashion with access to the data files on request (as implemented by [DataLad](https://www.datalad.org)). ## From a46e4391e627000342adf80288dab8c55340b441 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Wed, 5 Jun 2024 13:54:57 -0400 Subject: [PATCH 19/20] BEP032: ephys -> microephys with {icephys, ecephys} modalities/suffixes (#1806) * RF: to have "microephys" (Microelectrode physiology) for modality and icephys and ecephys for suffixes and datatypes * Reflecting decision of having two separate datatypes under the Microelectrode Electrophysiology https://github.com/bids-standard/bids-specification/issues/1800#issuecomment-2112715341 Consensus reached during working group meeting on 2024-05-15: - modality = "Microelectrode Electrophysiology" - datatypes = "icephys" and "ecephys" - suffixes = "_icephys" and "_ecephys" * Adjust wording to Horea's recommendation * Various fixups and tune ups to wording from code review --- .../microelectrode-electrophysiology.md | 10 +++++----- src/schema/objects/datatypes.yaml | 14 ++++++++++---- src/schema/objects/modalities.yaml | 4 ++-- src/schema/objects/suffixes.yaml | 17 +++++++++++------ src/schema/rules/files/raw/channels.yaml | 14 ++++++++------ .../files/raw/{ephys.yaml => microephys.yaml} | 11 +++++++---- 6 files changed, 43 insertions(+), 27 deletions(-) rename src/schema/rules/files/raw/{ephys.yaml => microephys.yaml} (85%) diff --git a/src/modality-specific-files/microelectrode-electrophysiology.md b/src/modality-specific-files/microelectrode-electrophysiology.md index 00b740de11..3c8fbb3377 100644 --- a/src/modality-specific-files/microelectrode-electrophysiology.md +++ b/src/modality-specific-files/microelectrode-electrophysiology.md @@ -16,14 +16,14 @@ You can also reach the moderators of this BEP through our [main discussion forum Most core principles of the original BIDS and particulars of BIDS-iEEG specification are adopted for this modality as well, though some special considerations and additional fields were added. -Several [example x datasets](https://bids-standard.github.io/bids-examples/#ephys) +Several [example Microelectrode Electrophysiology datasets](https://bids-standard.github.io/bids-examples/#microephys) have been formatted using this specification and can be used for practical guidance when curating a new dataset. ## Primary data file formats -Unprocessed (animal) `ephys` data must be stored in an [open file format](https://en.wikipedia.org/wiki/Open_format), +Unprocessed microelectrode electrophysiology (`icephys` and `ecephys` modalities) data must be stored in an [open file format](https://en.wikipedia.org/wiki/Open_format), while the native format, if different, can be stored in an optional `sourcedata/` directory. -The native file format is used in case conversion elicits the loss of crucial metadata specific to manufacturers and specific `ephys` systems. +The native file format is used in case conversion elicits the loss of crucial metadata specific to manufacturers and specific acquisition systems. Metadata should be included alongside the data in the `.json` and `.tsv` files. The current list of allowed data file formats: @@ -50,8 +50,8 @@ and a guide for using macros can be found at --> {{ MACROS___make_filename_template( "raw", - datatypes=["ephys"], - suffixes=["ephys", "events"] + datatypes=["ecephys", "icephys"], + suffixes=["ecephys", "icephys", "events"] ) }} diff --git a/src/schema/objects/datatypes.yaml b/src/schema/objects/datatypes.yaml index b3751303b7..1e57a7892d 100644 --- a/src/schema/objects/datatypes.yaml +++ b/src/schema/objects/datatypes.yaml @@ -16,14 +16,15 @@ dwi: display_name: Diffusion-Weighted Imaging description: | Diffusion-weighted imaging (DWI). +ecephys: + value: ecephys + display_name: Extracellular Electrophysiology + description: | + Electrophysiological data from extracellular microelectrodes eeg: value: eeg display_name: Electroencephalography description: Electroencephalography -ephys: - value: ephys - display_name: Electrophysiology - description: Data acquired using microelectrodes. fmap: value: fmap display_name: Field maps @@ -34,6 +35,11 @@ func: display_name: Task-Based Magnetic Resonance Imaging description: | Task (including resting state) imaging data +icephys: + value: icephys + display_name: Intracellular Electrophysiology + description: | + Electrophysiological data acquired from intracellular or patch microelectrodes ieeg: value: ieeg display_name: Intracranial electroencephalography diff --git a/src/schema/objects/modalities.yaml b/src/schema/objects/modalities.yaml index 701bd42b05..73018dce44 100644 --- a/src/schema/objects/modalities.yaml +++ b/src/schema/objects/modalities.yaml @@ -35,6 +35,6 @@ motion: nirs: display_name: Near-Infrared Spectroscopy description: Data acquired with NIRS. -ephys: +microephys: display_name: Microelectrode Electrophysiology - description: Data acquired using microelectrodes. + description: Electrophysiological data acquired using microelectodes. diff --git a/src/schema/objects/suffixes.yaml b/src/schema/objects/suffixes.yaml index 53448792a8..f4f0c3f7af 100644 --- a/src/schema/objects/suffixes.yaml +++ b/src/schema/objects/suffixes.yaml @@ -573,6 +573,11 @@ dwi: display_name: Diffusion-weighted image description: | Diffusion-weighted imaging contrast (specialized T2 weighting). +ecephys: + value: ecephys + display_name: Extracellular Electrophysiology + description: | + Extracellular electrophysiological data. eeg: value: eeg display_name: Electroencephalography @@ -583,11 +588,6 @@ electrodes: display_name: Electrodes description: | File that gives the location of (i)EEG electrodes. -ephys: - value: ephys - display_name: Microelectrode Electrophysiology - description: | - Extra- or intracellular microelectrode recording data. epi: value: epi display_name: EPI @@ -617,6 +617,11 @@ hipCT: display_name: HiP-CT description: | Hierarchical Phase-Contrast Tomography imaging data +icephys: + value: icephys + display_name: Inracellular Electrophysiology + description: | + Intracellular electrophysiological data. ieeg: value: ieeg display_name: Intracranial Electroencephalography @@ -758,7 +763,7 @@ probes: value: probes display_name: Implanted physical devices description: | - Physical devices used for recording ephys data, whether chronically or acutely implanted. + Physical devices used for recording microelectrode electrophysiology data, whether chronically or acutely implanted. probseg: value: probseg display_name: Probabilistic Segmentation diff --git a/src/schema/rules/files/raw/channels.yaml b/src/schema/rules/files/raw/channels.yaml index e96c440bcf..ea1b164483 100644 --- a/src/schema/rules/files/raw/channels.yaml +++ b/src/schema/rules/files/raw/channels.yaml @@ -16,11 +16,12 @@ channels: acquisition: optional run: optional -# ephys has an additional 'sample' entity -channels__ephys: +# microephys has an additional 'sample' entity +channels__microephys: $ref: rules.files.raw.channels.channels datatypes: - - ephys + - icephys + - ecephys entities: $ref: rules.files.raw.channels.channels.entities sample: optional @@ -66,11 +67,12 @@ coordsystem__eeg: $ref: rules.files.raw.channels.coordsystem.entities space: optional -# ephys has sample AND space entities -coordsystem__ephys: +# microephys has sample AND space entities +coordsystem__microephys: $ref: rules.files.raw.channels.coordsystem datatypes: - - ephys + - ecephys + - icephys entities: $ref: rules.files.raw.channels.coordsystem.entities sample: optional diff --git a/src/schema/rules/files/raw/ephys.yaml b/src/schema/rules/files/raw/microephys.yaml similarity index 85% rename from src/schema/rules/files/raw/ephys.yaml rename to src/schema/rules/files/raw/microephys.yaml index 460c99bed4..4a5aaaf5bc 100644 --- a/src/schema/rules/files/raw/ephys.yaml +++ b/src/schema/rules/files/raw/microephys.yaml @@ -1,14 +1,16 @@ --- -ephys: +microephys: suffixes: - - ephys + - ecephys + - icephys extensions: - .nwb # possible future: serialization in .zarr format to accompany .ome.zarr # - .nwb.zarr - .nix datatypes: - - ephys + - ecephys + - icephys entities: subject: required session: optional @@ -24,7 +26,8 @@ probes: extensions: - .tsv datatypes: - - ephys + - ecephys + - icephys entities: subject: required session: optional From 05e9611ba0b7fc415d3a9eb0cac99aa3ad997893 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Wed, 16 Oct 2024 10:35:31 -0400 Subject: [PATCH 20/20] Clarify wording and do mention `microephys` as shorthand for Microelectrode Electrophysiology --- src/modality-specific-files/microelectrode-electrophysiology.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modality-specific-files/microelectrode-electrophysiology.md b/src/modality-specific-files/microelectrode-electrophysiology.md index 3c8fbb3377..ac16034b18 100644 --- a/src/modality-specific-files/microelectrode-electrophysiology.md +++ b/src/modality-specific-files/microelectrode-electrophysiology.md @@ -21,7 +21,7 @@ have been formatted using this specification and can be used for practical guida ## Primary data file formats -Unprocessed microelectrode electrophysiology (`icephys` and `ecephys` modalities) data must be stored in an [open file format](https://en.wikipedia.org/wiki/Open_format), +Unprocessed microelectrode electrophysiology (`microephys`) modality data (of `icephys` or `ecephys` datatypes) must be stored in an [open file format](https://en.wikipedia.org/wiki/Open_format), while the native format, if different, can be stored in an optional `sourcedata/` directory. The native file format is used in case conversion elicits the loss of crucial metadata specific to manufacturers and specific acquisition systems. Metadata should be included alongside the data in the `.json` and `.tsv` files.