Skip to content

Commit 01a15f4

Browse files
committed
feat(schema): Validate the iEEG data files have associated electrodes.tsv
1 parent 9377b20 commit 01a15f4

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

src/schema/meta/context.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,15 @@ properties:
269269
type: array
270270
items:
271271
type: string
272+
electrodes:
273+
description: 'Electrodes file'
274+
type: object
275+
required: [path]
276+
additionalProperties: false
277+
properties:
278+
path:
279+
description: 'Path to associated electrodes file'
280+
type: string
272281
coordsystem:
273282
description: 'Coordinate system file'
274283
type: object

src/schema/rules/checks/ieeg.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
iEEGElectrodesRequired:
3+
issue:
4+
code: IEEG_ELECTRODES_REQUIRED
5+
message: |
6+
iEEG data files must have an associated electrodes.tsv.
7+
A single electrodes file may apply to multiple data files
8+
via the inheritance principle.
9+
level: error
10+
selectors:
11+
- suffix == "ieeg"
12+
- extension != ".json"
13+
checks:
14+
- associations.electrodes.path != ""

0 commit comments

Comments
 (0)