-
Notifications
You must be signed in to change notification settings - Fork 188
[ENH] microelectrode electrophysiology specification (BEP032) #1705
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
base: master
Are you sure you want to change the base?
Conversation
src/schema/objects/columns.yaml
Outdated
for privacy purposes. | ||
type: number | ||
unit: year | ||
alpha_rotation: |
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'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 comment
The 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 comment
The 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 comment
The 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 comment
The 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 comment
The 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.
- yaw: clockwise when looking down
- pitch: In the direction of the electrode face
- roll: clockwise when looking down at the probe
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.
X,y,z in BIDS refers to location in brain, not on probe.
Also relevant if you'd like to comment. → https://docs.google.com/document/d/1oG-C8T-dWPqfVzL2W8HO3elWK8NIh2cOCPssRGv23n0/edit?disco=AAABIzHGpUU |
Also I forgot to link to this when I wrote it → https://docs.google.com/document/d/1oG-C8T-dWPqfVzL2W8HO3elWK8NIh2cOCPssRGv23n0/edit?disco=AAABIGPAMOw |
Point of the probe that is described by the probe coordinates and | ||
on which the yaw, pitch, and roll rotations are applied. |
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.
Point of the probe that is described by the probe coordinates and | |
on which the yaw, pitch, and roll rotations are applied. | |
Point of the skull that acts as the origin of the surgical coordinate system. If AP, DV, and ML are present and this field is omitted, it as assumed to be "bregma." |
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. |
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.
`.fif`, `.nwb`, `.nix` files are conventionally split into multiple parts. | |
Files with a lot of data may be split into multiple parts. | |
Some file types, such as `.fif`, have internal pointers to the next file |
This looks good to me too! I had just a small question about how should the probes directory at root be correctly recognized by the schema/validator? Would you suggest adding it to |
@effigies so you suggest to establish yet another folder with structured data but which will not be formalized by BIDS in terms of schema/structure under it? or should we strive to come up with some consistent with BIDS overall and/or like e.g. BEP044 approaches to formalize under stimuli/ - https://bids.neuroimaging.io/extensions/beps/bep_044.html and consider making it
|
@ree-gupta Apologies for the delay. I had unsubscribed so that I would see mentions but not other activity on this PR, so I did not see your response. Please @ me in the future, as I will be doing so again after today.
Yes, that or phenotype are the most direct parallels.
The probes are a separate standard with their own contents and file-naming conventions. The intended progression appears to be:
Given that they already have a BIDS-incompatible naming convention (there are hyphens in the names), it does not seem particularly appealing to me to put an effort to come up with a mapping. Any tool that wants to find the probe definitions is going to need to resolve a URI in any case, so querying using BIDS entities doesn't seem like it adds much utility. We can probably check that the file name follows probe interface conventions as a schema check, if not a normal filename rule. That said, if making the directory more BIDSy feels like a good use of people's time, I'm not here to stop you. |
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.
some recommendations
|
||
This table stores information about the recorded signals, *not* the electrodes. The distinction is particularly important in cases where multiple signals are recorded from a single electrode (such as Neuropixel probes). For more information about the distinction between electrodes and channels, see [the corresponding section in iEEG](./intracranial-electroencephalography.md#terminology-electrodes-vs-channels). | ||
|
||
Columns in the `*_channel.tsv` file are: |
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.
Columns in the `*_channel.tsv` file are: | |
Columns in the `*_channels.tsv` file are: |
This file contains the following information: | ||
|
||
- `channel_id` | ||
- `electrode_id` (in the case of neuronal signals) | ||
- Amplifier information | ||
- … |
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 think we better avoid listing of names in the text to not make it outdated and just describe semantically:
This file contains the following information: | |
- `channel_id` | |
- `electrode_id` (in the case of neuronal signals) | |
- Amplifier information | |
- … | |
It should contain information about reference electrodes, amplifier, filtering, time alignment and other metadata pertinent to the data for each channel. |
|
||
The Microelectrode Electrophysiology modality encompasses recordings made with micrometer-scale electrodes, | ||
distinguishing it from related BIDS modalities (EEG, MEG, iEEG) that use larger electrodes. | ||
This modality is primarily used in animal research. |
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.
- **`icephys`** (Intracellular Electrophysiology): Electrodes penetrate cell membranes to directly measure | ||
intracellular potentials (mV) and cellular dynamics. |
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.
- **`icephys`** (Intracellular Electrophysiology): Electrodes penetrate cell membranes to directly measure | |
intracellular potentials (mV) and cellular dynamics. | |
- **`icephys`** (Intracellular Electrophysiology): Electrodes penetrate or attach to cell membranes to directly measure | |
intracellular potentials (mV) and cellular dynamics. |
|
||
- **`icephys`** (Intracellular Electrophysiology): Electrodes penetrate cell membranes to directly measure | ||
intracellular potentials (mV) and cellular dynamics. | ||
Examples: whole-cell patch clamp, sharp electrode recordings. |
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.
Examples: whole-cell patch clamp, sharp electrode recordings. | |
Examples: cell-attached patch clamp, whole-cell patch clamp, sharp electrode recordings. |
**Intracellular electrophysiology example:** | ||
|
||
```tsv | ||
name type units sampling_frequency recording_mode gain ground status |
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.
in addition to recording_mode
we need to describe how clamping is done following e.g. types described in OpenMINDS at https://github.com/openMetadataInitiative/openMINDS_instances/tree/main/instances/latest/terminologies/patchClampVariation which we can name patch_variation
and describe permitted values. (might need extra value for jaxtracellulular patching... loose patch recording according to google search by @apdavison)
I would also vote to define all the values allowed explicitly so could be validated.
### Recommended Channel Type Values | ||
|
||
For the `type` column we recommend to use the following terms (adapted from [iEEG](intracranial-electroencephalography.md#channels-description-_channelstsv)) | ||
|
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.
TODO: make a macro from the schema! Tireless @ree-gupta promised to do that in a separate PR and adopt here to avoid hardcoding
Replaces #1352 submitted from a fork outside of bids-specification.
Add specification for microelectrode electrohpysiology datasets based on the BEP032 proposal. old google doc
Note
We meet regularly and everyone is welcome
Next meeting: insert date on URL to join
Communication channel: https://framalistes.org/sympa/info/neuroscience-data-structure
Tip
HTML preview of this BEP
bids-validator
with a custom schema. (attn @TheChymera)DONEs
TODOs
Please ensure your name is credited on our Contributors appendix.
To add your name, please edit our Contributors wiki and add your name with the type of contribution.
For assistance, please tag @bids-standard/maintainers.
After opening the PR, our continuous integration services will automatically check your contribution for formatting errors and render a preview of the BIDS specification with your changes.
To see the checks and preview, scroll down and click on the
show all checks
link.From the list, select the
Details
link of theci/circleci: build_docs artifact
check to see the preview of the BIDS specification.Add instructions here on how to run new
bids-validator
using schema in this PRc557d1f
to1c30c6e
legacy-validator#1798 is the first one trying it on whitelisted set of packages, and I think we should create a helper action for that : https://github.com/bids-standard/bids-validator/issues/1931bids-validator changes needed
Populate schema with specifications from the google doc ...
schema/rules/checks
with checks specific to this BEP032 (from experiences with data conversion eg by @CodyCBakerPhD on @mvmdmlab data)<extension>
and get a table of extensions (nwb and nix) and check if schema encodes that only one is allowedFurther markdown description: @Peyman-N is working on a PR
Define enums of coord spaces to be added -- some image based, some ad-hoc
Add and reference here PR on
bids-examples
adding sample dandisets : Draft examples for BEP032 on animal electrophysiology bids-examples#430 (@robertoostenveld )Add CI action (likely github) to run
bids-validator
on sample datasets and this modified schema (@yarikoptic)Decide on "contours" specification
type
column for electrodes[ie]cephys/
sectionShare/use examples of real datasets
Issues this PR would likely to address
Issues to see being addressed while working on this BEP (likely to move above) or not (moved below):
Other issues which relate but not in scope here and provided for reference/backreference
Spreadsheet with correspondence to ProbeInterface: https://docs.google.com/spreadsheets/d/1O0bZzD-n4MjR68r1GlcH3d2JLXBLAU1PfsDceD3IPeo/edit?usp=sharing