-
Notifications
You must be signed in to change notification settings - Fork 190
[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
|
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 |
Bep032 coord enum
Document the stream_id column format for linking channels to their corresponding data streams. Include specifications for: - NWB files with internal HDF5 paths to ElectricalSeries objects - NIX files referencing data arrays following NIX/Neo organization - Handling multiple data streams with comma-separated lists - Cross-file references using filename:path syntax
docs(ephys): add stream_id column documentation for channels.tsv
…er errors and is easier to maintain.
|
I took a look at how filtering is represented in iEEG vs the current microephys draft, and I think it would be beneficial to align microephys with the iEEG approach. What iEEG does today
This gives both (a) structured provenance/parameters and (b) an immediately usable per-channel summary for typical users. What microephys currently does
Why I think aligning makes sense Proposed change
If folks agree, I can open a small follow-up PR adjusting |
|
@bendichter sounds like you are combining both approaches and nothing is lost so I think you are right by aligning to iEEG with the filters. |
- Add new Filtering Information section to microelectrode-electrophysiology.md explaining global and channel-specific filter parameters - Add software_filter_types column definition to columns.yaml for specifying filter types with Levels defined in channels.json - Add low_cutoff, high_cutoff, and notch optional columns to microephysChannels for channel-specific filter cutoff frequencies (consistent with iEEG spec) - Replace hardware_filters and software_filters columns with the new software_filter_types column in microephysChannels table
…o surgical coordinates appendix
- Add new `model__probes` column to store probe model name/number
(e.g., Neuropixels 1.0, A1x32-Poly3-5mm-25s-177)
- Mark model__probes as recommended in microephysProbes rules
- Fix typos in x__electrodes description ("there in" → "therein")
- Clarify coordinate units reference in electrode position description
…in extracellular electrophysiology example
Update axis definitions in Stereotaxic enum to fix incorrect mappings: - X-axis (AP): Change positive direction from posterior to anterior - Y-axis: Change from DV to ML axis with right being positive - Z-axis: Change from ML to DV axis with ventral/inferior being positive
Add RecordingDuration, RecordingType, and EpochLength fields to the microephysSetup sidecar rules. RecordingDuration and RecordingType are recommended, while EpochLength is optional but recommended when RecordingType is "epoched".
Update microelectrode electrophysiology documentation to use the correct file suffixes `*_ecephys.json` or `*_icephys.json` instead of the generic `*_ephys.json` to match the actual naming convention for extracellular and intracellular electrophysiology metadata files.
| description: | | ||
| A link to a photo or drawing of the microelectrode probe system. | ||
| type: string | ||
| format: uri |
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.
| description: | | |
| A link to a photo or drawing of the microelectrode probe system. | |
| type: string | |
| format: uri | |
| description: | | |
| Path to the photo or image file defining the coordinate system when | |
| `MicroephysCoordinateUnits` is `"pixels"`. | |
| Should be a [BIDS URI](SPEC_ROOT/common-principles.md#bids-uri). | |
| type: string | |
| format: bids_uri |
Suggestion: Update MicroephysCoordinateSystemPhoto to use BIDS URI format
Context
The current implementation of MicroephysCoordinateSystemPhoto in src/schema/objects/metadata.yaml uses format: uri, which only supports external URLs. However, in practice, the photo defining the coordinate system (used when MicroephysCoordinateUnits is "pixels") is typically stored within the dataset itself (e.g., operative photos, histology images).
Comparison with iEEG
iEEG handles a similar use case but takes a different approach:
- iEEG doesn't have a dedicated photo field
- Instead, it uses
IntendedFor__ds_relativewhich can point to any reference image (including photos) - This field supports both BIDS URIs and dataset-relative paths
Proposed Change
Update MicroephysCoordinateSystemPhoto to use format: bids_uri:
MicroephysCoordinateSystemPhoto:
name: MicroephysCoordinateSystemPhoto
display_name: Microephys Coordinate System Photo
description: |
Path to the photo or image file defining the coordinate system when
`MicroephysCoordinateUnits` is `"pixels"`.
Should be a [BIDS URI](SPEC_ROOT/common-principles.md#bids-uri).
type: string
format: bids_uriRationale
- BIDS URIs are the modern standard - The deprecated
participant_relativeanddataset_relativeformats are being phased out in favor of BIDS URIs - Typical use case is subject-specific - Photos are almost always subject-specific (operative photos, histology), so they're stored within the subject's directory
- Consistency - Aligns with how other file references are handled across BIDS
Questions for the team
- Should we support external URIs as well? Under what circumstances? If so, we could use
anyOfto allow bothbids_urianduriformats. - Is a dedicated field (
MicroephysCoordinateSystemPhoto) preferable to reusingIntendedForlike iEEG does?
…onsistency with space entities
Rename coordinate columns in microephysElectrodes table to include __electrodes suffix for disambiguation. Updates both initial_columns and columns sections to use the new naming convention.
- Change StereoTaxic to Stereotaxic for correct scientific terminology - Replace PaxinosWatson with WaxholmSpace and WistarRatAtlas coordinate systems - Remove outdated TODO comment about adding coordinate systems to appendix - Update file naming examples to use corrected Stereotaxic spelling
…primates Add new MicroephysCoordinateSystem options for commonly used stereotaxic atlases: - PaxinosWatson: rat brain atlas - FranklinPaxinos: mouse brain atlas - SwansonRat: rat brain atlas - CHARM: macaque cortical hierarchy atlas - D99: Saleem-Logothetis macaque atlas - PaxinosMacaque: macaque stereotaxic atlas - MarmosetBrainAtlas: marmoset brain atlas These additions expand support for microelectrophysiology recordings across multiple species with widely-used reference coordinate systems.
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
bids-validatorwith 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 checkslink.From the list, select the
Detailslink of theci/circleci: build_docs artifactcheck to see the preview of the BIDS specification.Add instructions here on how to run new
bids-validatorusing schema in this PRc557d1fto1c30c6elegacy-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/checkswith 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-examplesadding sample dandisets : Draft examples for BEP032 on animal electrophysiology bids-examples#430 (@robertoostenveld )Add CI action (likely github) to run
bids-validatoron sample datasets and this modified schema (@yarikoptic)Decide on "contours" specification
typecolumn 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