Skip to content

Commit

Permalink
Add ephys channel count rules to schema (#1319)
Browse files Browse the repository at this point in the history
* schema: add EEG channel count rules

* Update src/schema/rules/checks/eeg.yaml

Co-authored-by: Chris Markiewicz <[email protected]>

* add issues

* add missing quotation mark

* fix again

---------

Co-authored-by: Chris Markiewicz <[email protected]>
  • Loading branch information
sappelhoff and effigies authored Jul 18, 2024
1 parent 6beec13 commit daf2ec8
Showing 1 changed file with 79 additions and 0 deletions.
79 changes: 79 additions & 0 deletions src/schema/rules/checks/eeg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
---
EEGChannelCountReq:
issue:
code: EEG_CHANNEL_COUNT_MISMATCH
message: |
The EEGChannelCount metadata does not match the number of channels
with type EEG in the associated channels.tsv file.
level: warning
selectors:
- suffix == "eeg"
- type(sidecar.EEGChannelCount) != "null"
- associations.channels.type
checks:
- sidecar.EEGChannelCount == count(associations.channels.type, "EEG")
ECGChannelCountReq:
issue:
code: ECG_CHANNEL_COUNT_MISMATCH
message: |
The ECGChannelCount metadata does not match the number of channels
with type ECG in the associated channels.tsv file.
level: warning
selectors:
- suffix == "eeg"
- type(sidecar.ECGChannelCount) != "null"
- associations.channels.type
checks:
- sidecar.ECGChannelCount == count(associations.channels.type, "ECG")
EMGChannelCountReq:
issue:
code: EMG_CHANNEL_COUNT_MISMATCH
message: |
The EMGChannelCount metadata does not match the number of channels
with type EMG in the associated channels.tsv file.
level: warning
selectors:
- suffix == "eeg"
- type(sidecar.EMGChannelCount) != "null"
- associations.channels.type
checks:
- sidecar.EMGChannelCount == count(associations.channels.type, "EMG")
EOGChannelCountReq:
issue:
code: EOG_CHANNEL_COUNT_MISMATCH
message: |
The EOGChannelCount metadata does not match the number of channels
with type EOG in the associated channels.tsv file.
level: warning
selectors:
- suffix == "eeg"
- type(sidecar.EOGChannelCount) != "null"
- associations.channels.type
checks:
- sidecar.EOGChannelCount == count(associations.channels.type, "EOG")
MiscChannelCountReq:
issue:
code: MISC_CHANNEL_COUNT_MISMATCH
message: |
The MiscChannelCount metadata does not match the number of channels
with type MISC in the associated channels.tsv file.
level: warning
selectors:
- suffix == "eeg"
- type(sidecar.MiscChannelCount) != "null"
- associations.channels.type
checks:
- sidecar.MiscChannelCount == count(associations.channels.type, "MISC")
TriggerChannelCountReq:
issue:
code: TRIGGER_CHANNEL_COUNT_MISMATCH
message: |
The TriggerChannelCount metadata does not match the number of channels
with type TRIG in the associated channels.tsv file.
level: warning
selectors:
- suffix == "eeg"
- type(sidecar.TriggerChannelCount) != "null"
- associations.channels.type
checks:
- sidecar.TriggerChannelCount == count(associations.channels.type, "TRIG")

0 comments on commit daf2ec8

Please sign in to comment.