Skip to content
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

Templating issue: should electrodes.tsv and coordsystem.json writing per eeg/ieeg only have certain entities? #649

Closed
adam2392 opened this issue Oct 22, 2020 · 3 comments · Fixed by #650

Comments

@adam2392
Copy link
Member

Summary

This came up in mne-tools/mne-bids#592

According to the spec: https://bids-specification.readthedocs.io/en/stable/04-modality-specific-files/04-intracranial-electroencephalography.html#electrode-description-_electrodestsv

ieeg can have subject/session/space for electrodes.tsv.

while eeg can have subject/session/acquisition/run for electrodes.tsv (and maybe space?)

https://bids-specification.readthedocs.io/en/stable/04-modality-specific-files/03-electroencephalography.html#electrodes-description-_electrodestsv

Is this correct?

Proposed Solution

My understanding is that you only need one electrodes.tsv/coordsystem.json per session directory because all the electrodes/channels are the same "within the same session" for iEEG. So you can have multiple tasks, runs, acquisitions, etc.

But I suppose this might be different for say scalp EEG based on reading the above? Either way some clarification would help immensely.

Based on the discussion for the above, I can make a subsequent PR if it is deemed appropriate.

@sappelhoff
Copy link
Member

sappelhoff commented Oct 22, 2020

IMHO, "run" does not make sense for EEG electrodes.tsv --> there is typically just one digitization of electrodes per session, just like in iEEG (although in iEEG, it could potentially even be the same for several sessions, which is seldom to never true for EEG).

The acquisition entity makes sense to add something like acq-pre and acq-post to flag the digitization of electrode coordinates (using whatever method or device) prior to data recording and after data recording --> this is sometimes done. However for my own data I only record once.

Finally, the space entity does not seem relevant for EEG --> I have never encountered a dataset or workflow where the electrodes were digitized using different methods to have them in different spaces ... well apart from studies that are exactly about that topic: comparing different digitization methods such as in this paper where @robertoostenveld is coauthor: https://doi.org/10.1016/j.jneumeth.2019.108378 ("Using a structured-light 3D scanner to improve EEG source modeling with more accurate electrode positions")

@adam2392
Copy link
Member Author

So eeg: subject/session/acq if available
and ieeg: subject/session/space if available?

And no need to include extra entities because they just then imply there are multiple coords (when in reality they're all copies of the same file)?

Seems like this should produce a warning in the bids-validator if there are "extra" entities (but prolly not error).

@sappelhoff
Copy link
Member

So eeg: subject/session/acq if available
and ieeg: subject/session/space if available?

I think

  • eeg: subject/session/acq/space
  • ieeg: subject/session/acq/space

where all except "subject" are optional, and "optional" is REQUIRED. It's like that also in the entity table, see: https://bids-specification.readthedocs.io/en/stable/99-appendices/04-entity-table.html#encephalography-eeg-ieeg-and-meg

seems like we just failed to update the "templates" in the flow text accordingly. would you be willing to make a PR for that @adam2392?

the space for eeg can stay included although I doubt that it'd be used much.

As for the validator, it currently accepts all entities for *electrodes.tsv as it does for e.g., events.tsv. That is: it does currently not distinguish very well. That's perhaps a point for future improvement cc @rwblair

see: https://github.com/bids-standard/bids-validator/blob/6c6e2ea640c152aaec913166ef7072a2e4b416ec/bids-validator/bids_validator/rules/file_level_rules.json#L163-L176

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants