-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ENH] microelectrode electrophysiology specification (BEP032) #1705
base: master
Are you sure you want to change the base?
Changes from 20 commits
7ec5d5e
2f393ca
648781a
d3c9996
08c92cd
e2030ac
53f1087
fa648fe
eef67df
27547f9
a6ae5e2
9a20e4b
7609276
9be41f9
983975a
1afdc40
6b39d64
f08b163
73012b3
a46e439
05e9611
7ddeb75
2b9e757
6b11f54
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# 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 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 microelectrode electrophysiology (`icephys` and `ecephys` modalities) data must be stored in an [open file format](https://en.wikipedia.org/wiki/Open_format), | ||
yarikoptic marked this conversation as resolved.
Show resolved
Hide resolved
|
||
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. | ||
The current list of allowed data file formats: | ||
|
||
| **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 ... | | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is the of the ellipse that you are looking for someone to fill in the details? |
||
|
||
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://www.datalad.org)). | ||
|
||
## | ||
|
||
<!-- | ||
This block generates a filename templates. | ||
The inputs for this macro can be found in the directory | ||
src/schema/rules/files/raw | ||
and a guide for using macros can be found at | ||
https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md | ||
--> | ||
{{ MACROS___make_filename_template( | ||
"raw", | ||
datatypes=["ecephys", "icephys"], | ||
suffixes=["ecephys", "icephys", "events"] | ||
) | ||
}} | ||
|
||
<!-- Link Definitions --> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,6 +42,41 @@ age: | |
for privacy purposes. | ||
type: number | ||
unit: year | ||
alpha_rotation: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd really recommend renaming the rotation axes to yaw, roll, and pitch (that would be the analogous angle order). There was no consensus either way on the google docs discussion. Someone said both are confusing, which I guess might be expected, but alpha, beta, gamma, are just more confusing... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree -- very adhoc. Let's discuss in google doc There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you chime in? I think the other guy commenting might be amenable to accepting this as well. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree that both are confusing, but at least alpha, beta and gamma are SO confusing that everyone realizes that additional specification is needed to define them properly. With roll, yaw and pitch it seems at first that all is clear, until you have a number of different people go through different use cases. See the more challenging examples that I posted on the google doc under https://docs.google.com/document/d/1oG-C8T-dWPqfVzL2W8HO3elWK8NIh2cOCPssRGv23n0/edit?disco=AAAA4fkI4eY There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @robertoostenveld sorry, I only now saw the update, reply there. I don't think confusion on purpose is good in this case, because the documentation is very eclectic so we might be sending people down rabbit holes. Wiki, where people will invariably go first, does a particularly poor job explaining both euler and TB angles for the casual non-mathematics-versed user. The only thing that wiki has going for it here are the aircraft animations on the TB page. Yaw, Pitch, Roll, will be intuited correctly as long as we specify the starting postion. That we can do (1) as (I think, it's pretty vague) is currently proposed, aligning the implant with the world coordinate system (meaning most implants will be at yaw 0 pitch -90 roll 0) or (2) relative to the implantation stereotax normal (meaning most implants will be at 0 0 0). For comparison, Euler commonly has the normal pointing up so most implants will be.... 0 -180 0 🤔 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. in the last BEP032 meeting we discussed further and wanted to follow this approach now (based on the Allen Inst. standard and IBL standard): Assumption: x,y,z is posterior, ventral, right (unit needs to be specified). Translational origin (0,0,0) needs to be defined (typically Bregma for rodents). Rotational origin (0,0,0) is the probe facing up with the tip facing forward. Rotations are all clockwise in degrees and around the tip. For multi-shank probes, the “tip” of the probe is defined as the end of the left shank if you are looking at the electrodes.
The depth (unit needs to be specified) is a translation in the direction that the tip is pointing. We need to add a “probe_model”, which references probeinterface_library NOTE: We need to change the electrode x,y,z. |
||
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, 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, 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. | ||
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 +119,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 | ||
|
@@ -131,6 +179,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 | ||
|
@@ -172,6 +226,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 | ||
|
@@ -213,6 +274,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 | ||
|
@@ -288,6 +356,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 | ||
|
@@ -412,6 +486,12 @@ reference__ieeg: | |
- type: string | ||
enum: | ||
- n/a | ||
reference_atlas: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The “reference atlas” if you visually verify the area is basically the atlas you looked at before you nod and said “eh, good enough”. This seems at once an overly detailed (does this really matter? the coordinates are commonly given with sub-mm precision) and underdetermined (what coordinates did you look at in the atlas?). I think it's best just to drop this. |
||
name: reference_atlas | ||
display_name: Reference atlas | ||
description: | | ||
Name of reference atlas used for associated brain region identification, preferably an ebrains supported atlas. | ||
type: string | ||
reference_frame: | ||
name: reference_frame | ||
display_name: Reference frame | ||
|
@@ -724,6 +804,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 | ||
|
@@ -806,6 +892,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 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
microephys: | ||
suffixes: | ||
- ecephys | ||
- icephys | ||
extensions: | ||
- .nwb | ||
# possible future: serialization in .zarr format to accompany .ome.zarr | ||
# - .nwb.zarr | ||
- .nix | ||
datatypes: | ||
- ecephys | ||
- icephys | ||
entities: | ||
subject: required | ||
session: optional | ||
sample: optional | ||
task: optional | ||
acquisition: optional | ||
run: optional | ||
split: optional | ||
|
||
probes: | ||
suffixes: | ||
- probes | ||
extensions: | ||
- .tsv | ||
datatypes: | ||
- ecephys | ||
- icephys | ||
entities: | ||
subject: required | ||
session: optional | ||
sample: optional | ||
task: optional | ||
acquisition: optional | ||
run: optional | ||
split: optional |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found "official" https://github.com/bids-standard/bids-specification/blob/HEAD/CONTRIBUTING.md#soft-rules
and below there the advise seems to still keep sentence end ending the line, e.g.
@Peyman-N could you please as a first step do such reformatting so to ease adding suggestions and minimize number of commits