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

Add descriptions.tsv to the schema #1707

Merged
merged 9 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
13 changes: 13 additions & 0 deletions src/schema/objects/columns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,13 @@ derived_from:
for example a slice of tissue (`sample-02`) derived from a block of tissue (`sample-01`).
type: string
pattern: ^sample-[0-9a-zA-Z]+$
desc_id:
name: desc_id
display_name: Description Label
description: |
A `desc-<label>` entity present in the derivatives dataset.
type: string
pattern: ^desc-[0-9a-zA-Z]+$
description:
name: description
display_name: Description
Expand All @@ -122,6 +129,12 @@ description__optode:
description: |
Free-form text description of the optode, or other information of interest.
type: string
description__descriptions:
tsalo marked this conversation as resolved.
Show resolved Hide resolved
name: description
display_name: Description
description: |
Free-form text description of the desc entity's label (defined in `desc_id`).
type: string
dimension:
name: dimension
display_name: Dimension
Expand Down
5 changes: 5 additions & 0 deletions src/schema/objects/files.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,8 @@ stimuli:
A directory to store any stimulus files used during an experiment.
See the [relevant section](SPEC_ROOT/modality-specific-files/task-events.md#stimuli-directory)
for more information.
descriptions:
display_name: Descriptions Definitions
file_type: regular
description: |
A TSV file describing labels found for the `desc` entity in a Derivatives dataset.
tsalo marked this conversation as resolved.
Show resolved Hide resolved
7 changes: 7 additions & 0 deletions src/schema/rules/files/deriv/tables.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
descriptions:
level: optional
stem: descriptions
extensions:
- .tsv
- .json
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,12 @@ SegmentationLookup:
color: optional
mapping: optional
index_columns: [index]

Descriptions:
selectors:
- path == "descriptions.tsv"
columns:
desc_id: required
description__descriptions: required
index_columns: [desc_id]
additional_columns: allowed