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

[SCHEMA] Specify column requirement levels for several tabular files #1061

Merged
merged 9 commits into from
Apr 13, 2022
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ and a guide for using macros can be found at
{{ MACROS___make_columns_table(
{
"name__channels": "REQUIRED",
"type__channels": "REQUIRED",
"type__meg_channels": "REQUIRED",
"units": "REQUIRED",
}
) }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ and a guide for using macros can be found at
{{ MACROS___make_columns_table(
{
"name__channels": "REQUIRED",
"type__channels": "REQUIRED",
"type__eeg_channels": "REQUIRED",
"units": "REQUIRED",
}
) }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ and a guide for using macros can be found at
"name__channels": ("REQUIRED", "When a corresponding electrode is specified in `_electrodes.tsv`, "
"the name of that electrode MAY be specified here and the reference electrode "
"name MAY be provided in the `reference` column."),
"type__channels": "REQUIRED",
"type__ieeg_channels": "REQUIRED",
"units": "REQUIRED",
"low_cutoff": "REQUIRED",
"high_cutoff": "REQUIRED",
Expand Down
53 changes: 52 additions & 1 deletion src/schema/objects/columns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,31 @@ trigger:
continuous measurement of the scanner trigger signal
type: number
# type column in channels.tsv files
type__channels:
type__eeg_channels:
effigies marked this conversation as resolved.
Show resolved Hide resolved
name: type
description: |
Type of channel; MUST use the channel types listed below.
Note that the type MUST be in upper-case.
type: string
enum:
- AUDIO
- EEG
- EOG
- ECG
- EMG
- EYEGAZE
- GSR
- HEOG
- MISC
- PPG
- PUPIL
- REF
- RESP
- SYSCLOCK
- TEMP
- TRIG
- VEOG
type__meg_channels:
name: type
description: |
Type of channel; MUST use the channel types listed below.
Expand Down Expand Up @@ -501,6 +525,33 @@ type__channels:
- HLU
- FITERR
- OTHER
type__ieg_channels:
name: type
description: |
Type of channel; MUST use the channel types listed below.
Note that the type MUST be in upper-case.
type: string
enum:
- EEG
- ECOG
- SEEG
- DBS
- VEOG
- HEOG
- EOG
- ECG
- EMG
- TRIG
- AUDIO
- PD
- EYEGAZE
- PUPIL
- MISC
- SYSCLOCK
- ADC
- DAC
- REF
- OTHER
# type column for electrodes.tsv files
type__electrodes:
name: type
Expand Down
36 changes: 36 additions & 0 deletions src/schema/rules/tabular_data/eeg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
EEGChannels:
selectors:
- datatype == "eeg"
- suffix == "channels"
- extension == ".tsv"
initial_columns: [name__channels, type__eeg_channels, units]
columns:
name__channels: REQUIRED
type__eeg_channels: REQUIRED
units: REQUIRED
description: OPTIONAL
sampling_frequency: OPTIONAL
reference: OPTIONAL
low_cutoff: OPTIONAL
high_cutoff: OPTIONAL
notch: OPTIONAL
status: OPTIONAL
status_descriptions: OPTIONAL
additional_columns: allowed_if_defined

EEGElectrodes:
selectors:
- datatype == "eeg"
- suffix == "electrodes"
- extension == ".tsv"
initial_columns: [name__electrodes, x, y, z]
columns:
name__electrodes: REQUIRED
x: REQUIRED
y: REQUIRED
z: REQUIRED
type__electrodes: RECOMMENDED
material: RECOMMENDED
impedance: RECOMMENDED
additional_columns: allowed_if_defined
42 changes: 42 additions & 0 deletions src/schema/rules/tabular_data/ieeg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
iEEGChannels:
selectors:
- datatype == "ieeg"
- suffix == "channels"
- extension == ".tsv"
initial_columns: [name__channels, type__ieeg_channels, units]
columns:
name__channels: REQUIRED
type__ieeg_channels: REQUIRED
units: REQUIRED
low_cutoff: REQUIRED
high_cutoff: REQUIRED
reference: OPTIONAL
group: OPTIONAL
sampling_frequency: OPTIONAL
description: OPTIONAL
notch: OPTIONAL
status: OPTIONAL
status_descriptions: OPTIONAL
additional_columns: allowed_if_defined

iEEGElectrodes:
selectors:
- datatype == "ieeg"
- suffix == "electrodes"
- extension == ".tsv"
initial_columns: [name__electrodes, x, y, z]
columns:
name__electrodes: REQUIRED
x: REQUIRED
y: REQUIRED
z: REQUIRED
size: REQUIRED
material: RECOMMENDED
manufacturer: RECOMMENDED
group: RECOMMENDED
hemisphere: RECOMMENDED
type__electrodes: OPTIONAL
impedance: OPTIONAL
dimension: OPTIONAL
additional_columns: allowed_if_defined
20 changes: 20 additions & 0 deletions src/schema/rules/tabular_data/meg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
MEGChannels:
selectors:
- datatype == "eeg"
- suffix == "channels"
- extension == ".tsv"
initial_columns: [name__channels, type__meg_channels, units]
columns:
name__channels: REQUIRED
type__meg_channels: REQUIRED
units: REQUIRED
description: OPTIONAL
sampling_frequency: OPTIONAL
low_cutoff: OPTIONAL
high_cutoff: OPTIONAL
notch: OPTIONAL
software_filters: OPTIONAL
status: OPTIONAL
status_descriptions: OPTIONAL
additional_columns: allowed_if_defined
8 changes: 8 additions & 0 deletions src/schema/rules/tabular_data/perf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
ASLContext:
selectors:
- datatype == "perf"
- suffix == "aslcontext"
columns:
volume_type: REQUIRED
additional_columns: not_allowed
9 changes: 9 additions & 0 deletions src/schema/rules/tabular_data/physio.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
PhysioColumns:
selectors:
- suffix == "physio"
columns:
cardiac: OPTIONAL
respiratory: OPTIONAL
trigger: OPTIONAL
additional_columns: allowed
15 changes: 15 additions & 0 deletions src/schema/rules/tabular_data/task.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
TaskEvents:
selectors:
- entities contains "task"
- suffix == "events"
columns:
onset: REQUIRED
duration: REQUIRED
sample: OPTIONAL
trial_type: OPTIONAL
response_time: OPTIONAL
value: OPTIONAL
HED: OPTIONAL
stim_file: OPTIONAL
additional_columns: allowed