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

[ENH] Define channel column for events and Delimiter field for column descriptions #1483

Merged
merged 7 commits into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/common-principles.md
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,7 @@ and a guide for using macros can be found at
),
"Levels": "RECOMMENDED",
"Units": "RECOMMENDED",
"Delimiter": "OPTIONAL",
"TermURL": "RECOMMENDED",
"HED": "OPTIONAL",
}
Expand Down
9 changes: 9 additions & 0 deletions src/schema/objects/columns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,15 @@ cardiac:
description: |
continuous pulse measurement
type: number
channel:
name: channel
display_name: Channel
description: |
Channel(s) associated with an event.
If multiple channels are specified, separate with commas (`,`) or a
VisLab marked this conversation as resolved.
Show resolved Hide resolved
delimiter specified in the `"Delimiter"` field describing the `channel`
column.
effigies marked this conversation as resolved.
Show resolved Hide resolved
sappelhoff marked this conversation as resolved.
Show resolved Hide resolved
type: string
color:
name: color
display_name: Color label
Expand Down
7 changes: 7 additions & 0 deletions src/schema/objects/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,13 @@ DelayTime:
This field is mutually exclusive with `"VolumeTiming"`.
type: number
unit: s
Delimiter:
name: Delimiter
display_name: Delimiter
description: |
If rows in a column may be interpreted as a lists of values, the character that
Copy link
Member

@VisLab VisLab Nov 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be better as:
"If a column entry may be interpreted as..."

Also, does the Delimiter only apply to "channel" column or to any column as the above implies.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delimiter will from now on apply to any column.

separates one value from the next.
type: string
Density:
name: Density
display_name: Density
Expand Down
5 changes: 5 additions & 0 deletions src/schema/rules/tabular_data/task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ TaskEvents:
response_time: optional
HED: optional
stim_file: optional
channel:
level: optional
description_addendum: |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't completely understand why this is in the task.yaml file. Is task.yaml where it determines if tabular data applies to a particular modality?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

task.yaml is an arbitrary name. It could have been called events.yaml, but the rule schema.rules.tabular_data.task.TaskEvents defines what are valid columns in an _events.tsv file. The filename construction (and hence what modalities apply) are defined in the filename rules:

events:
suffixes:
- events
extensions:
- .tsv
- .json
datatypes:
- beh
- eeg
- ieeg
- meg
- nirs
entities:
subject: required
session: optional
task: required
acquisition: optional
run: optional

events:
suffixes:
- events
extensions:
- .tsv
- .json
datatypes:
- beh
- eeg
- ieeg
- meg
- nirs
entities:
subject: required
session: optional
task: required
acquisition: optional
run: optional

Note that this column only applies to data types where
channels are specified, such as EEG, iEEG, MEG or NIRS.
sappelhoff marked this conversation as resolved.
Show resolved Hide resolved
additional_columns: allowed
initial_columns:
- onset
Expand Down