-
Notifications
You must be signed in to change notification settings - Fork 148
[ENH] BEP042 - EMG examples #480
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
The pointer to PR1998 schema is in place now. The dev CI only failing because of the |
7586e6a
to
b4af21a
Compare
@neuromechanist @drammock I believe the remaining errors are problems in the examples, not shortcomings in the schema/validator. |
Thanks much @effigies,
Remaining is the |
Sorry, I thought I'd pushed my changes to the schema. I've merged with @drammock's recent changes and pushed. |
Remaining issues:
|
Down to one. |
I agree that it seems valid. I cannot reproduce this failure locally: $ cd ../validator/
$ git log --oneline -1
79248e84 (HEAD -> feat/add-keys-to-assoc-coordsys, origin/feat/add-keys-to-assoc-coordsys) changelog
$ cd ../examples/
$ git log --oneline -1
14abe5f8 (HEAD -> emg_examples, neuromechanist/emg_examples) fixes to channels.tsv and electrodes.tsv in some datasets? (#3)
$ cd ../spec/
$ git log --oneline -1
a55ff9ef (HEAD -> emg, origin/emg) schema: Check for coordsystem or coordsystems
$ uv run bst export > src/schema.json
$ DATASET=emg_CustomBipolarFace /opt/bids/validator/local-run --schema file:///opt/bids/spec/src/schema.json /opt/bids/examples/$DATASET
[WARNING] SIDECAR_KEY_RECOMMENDED A data file's JSON sidecar is missing a key listed as recommended.
StimulusPresentation
/sub-01/emg/sub-01_task-jumping_events.tsv - Field description: Object containing key-value pairs related to the software used to present
the stimuli during the experiment.
EpochLength
/sub-01/emg/sub-01_task-jumping_recording-highDensity_emg.edf - Field description: Duration of individual epochs in seconds (for example, `1`)
in case of epoched data.
If recording was continuous or discontinuous, leave out the field.
/sub-01/emg/sub-01_task-jumping_recording-bipolar_emg.edf - Field description: Duration of individual epochs in seconds (for example, `1`)
in case of epoched data.
If recording was continuous or discontinuous, leave out the field.
Please visit https://neurostars.org/search?q=SIDECAR_KEY_RECOMMENDED for existing conversations about this issue.
Summary: Available Tasks: Available Modalities:
18 Files, 132 kB jumping emg
1 - Subjects 1 - Sessions
If you have any questions, please post on https://neurostars.org/tags/bids. |
Pushed bids-standard/bids-specification@b1fea70, which resolved that issue. LMK if you disagree with the logic and think it needs a different solution. The only other one I can think of is requiring I also want to draw your attention to https://github.com/bids-standard/bids-validator/pull/268/files#r2365617071:
Does this limitation seem acceptable in the short term? |
That solution looks good to me.
Is the limitation that you can't collate coordsystem.json files at different directory levels? Or is it that multiple coordsystem.json files with the same space entity can't be collated? The latter seems fine; @neuromechanist do you agree? |
The first. Or at least, we don't currently look past the first directory that has responsive files. In the case of sidecars, we get all responsive files, because we need to aggregate their contents. Associations have been just "find the first file". I suppose an interesting question here is: Should |
I believe that most of the So, I think we might need, at least for one example if not most, to move the
Indeed, this is interesting, as this is not formally a sidecar, but hopefully should be treated as a sidecar. IMO, |
I can imagine a case where there's a file at the root that specifies the grid coordinate system, and for a few subjects there's also a subject-specific file that overrides the anchor electrode details (for example if subject anatomy dictated slightly different placement across subjects). Supporting that would be ideal, but in such cases it would be possible (and not that hard) to just put everything in a subject specific file for all subjects. I'm content if the 80/20 rule says that we don't allow the "override" case for now. |
This commit adds comprehensive EMG-BIDS example datasets demonstrating various EMG recording scenarios including custom bipolar placements, high-density grids, multi-body part recordings, and independent recording modules. Co-authored-by: Daniel McCloy <[email protected]> Co-authored-by: Chris Markiewicz <[email protected]>
44511e7
to
f460732
Compare
@neuromechanist BIDS examples should not include full data files, but should be truncated to zero bytes. If header data is needed for some validation rules, then one dataset could have file headers. If you have real data to use for examples, the best thing would be to host it elsewhere, and have a script for updating the example as any changes are made. The dataset_listing.tsv allows links to the real data to be shared. (I do see that we have not consistently enforced this, and as a result this repository is now 162MB on a fresh clone.) |
That is probably my fault, I filled some files with 1kb random data to make the validator warning go away. @neuromechanist can you fix? I'm away from the office this week. |
Well, I changed the original 1kB files to be a little more (around 100kB on average), to have actual EDF file headers and half a second worth of "simulated" data respecting the channel count and sampling frequency. This has a benefit of the examples being standalone and work properly with tools, rather than linking to adhoc cloud storage. Happy to move them outside. LMK. |
Okay, let's leave them as-is for now. But please note that these files having contents should generally not be depended on except when necessary to test whether a validator or query tool correctly implements the BIDS spec; tools that use BIDS datasets should maintain their own test data. We may, in the future, decide to pare down this repository, and it would be ideal not to break anybody's workflow if we did. |
The emg-example dataset contains the examples discussed during the biweekly meetings of the BEP042 team @bids-standard/bep042. Each subject is one of the examples from the metadata document.
Here are some key metadata discussed which might be different from other modalities:
channels.tsv
optionally includes placement and group columns borrowed from Motion and iEEG, respectively.channels.tsv
also optionally includes signal_electrode column, indicating which electrode(s) was used (in conjunction with the reference) to make the channel.channels.tsv
andelectrodes.tsv
to adequately describe the channel or electrode placement.electrodes.tsv
or the placement column inchannels.tsv
.We appreciate your input and feedback on the examples. You can comment about specific examples here, on the original issue bids-standard/bids-specification#1371, or if needed the PR bids-standard/bids-specification#1998