-
Notifications
You must be signed in to change notification settings - Fork 190
ENH: Add templates.tsv and cohorts.tsv for template/cohort entity metadata #2287
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -76,6 +76,79 @@ as described in the [Derived atlases](#derived-atlases) section, below. | |
| For uses of the `atlas-` entity without the `tpl-` entity, | ||
| see [Imaging derivatives - Derivatives from atlases](imaging.md#derivatives-from-atlases). | ||
|
|
||
| ### templates.tsv | ||
|
|
||
| Template: | ||
|
|
||
| ```Text | ||
| <pipeline_name>/ | ||
| templates.tsv | ||
| templates.json | ||
| ``` | ||
|
|
||
| Optional: Yes | ||
|
|
||
| To keep a record of templates in the dataset, a `templates.tsv` file MAY be used. | ||
| The `templates.tsv` file consists of one row for each unique `tpl-<label>` | ||
| entity used in the dataset and a set of REQUIRED and OPTIONAL columns: | ||
|
|
||
| <!-- This block generates a columns table. | ||
| The definitions of these fields can be found in | ||
| src/schema/rules/tabular_data/*.yaml | ||
| and a guide for using macros can be found at | ||
| https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md | ||
| --> | ||
| {{ MACROS___make_columns_table("derivatives.common_derivatives.Templates") }} | ||
|
|
||
| This file MUST be located at the root of the derivative dataset. | ||
|
|
||
| `templates.tsv` example: | ||
|
|
||
| ```tsv | ||
| template_id description | ||
| tpl-MNI152NLin2009cAsym MNI152 nonlinear 2009c asymmetric template | ||
| tpl-MNIPediatricAsym MNI pediatric asymmetric template | ||
| ``` | ||
|
|
||
| ### cohorts.tsv | ||
|
|
||
| Template: | ||
|
|
||
| ```Text | ||
| <pipeline_name>/ | ||
| tpl-<label>/ | ||
| tpl-<label>_cohorts.tsv | ||
| tpl-<label>_cohorts.json | ||
| ``` | ||
|
|
||
| Optional: Yes | ||
|
|
||
| For templates with multiple cohorts, a `cohorts.tsv` file MAY be used to describe each cohort. | ||
| The `cohorts.tsv` file consists of one row for each unique `cohort-<label>` | ||
| entity used within the template and a set of REQUIRED and OPTIONAL columns: | ||
|
|
||
| <!-- This block generates a columns table. | ||
| The definitions of these fields can be found in | ||
| src/schema/rules/tabular_data/*.yaml | ||
| and a guide for using macros can be found at | ||
| https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md | ||
| --> | ||
| {{ MACROS___make_columns_table("derivatives.common_derivatives.Cohorts") }} | ||
|
|
||
| This file MUST be located within the `tpl-<label>/` directory for which it describes cohorts. | ||
|
|
||
| `tpl-MNIPediatricAsym_cohorts.tsv` example: | ||
|
|
||
| ```tsv | ||
| cohort_id description | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is great 👍 |
||
| cohort-1 Ages 0-2 months | ||
| cohort-2 Ages 3-5 months | ||
| cohort-3 Ages 6-11 months | ||
| cohort-4 Ages 1-2 years | ||
| cohort-5 Ages 3-6 years | ||
| cohort-6 Ages 7-18 years | ||
| ``` | ||
|
|
||
| ### Example: Single-cohort template | ||
|
|
||
| For the pipeline that generated [`MNI152NLin2009cAsym`](../appendices/coordinate-systems.md#standard-template-identifiers), | ||
|
|
@@ -87,6 +160,7 @@ A guide for using macros can be found at | |
| --> | ||
| {{ MACROS___make_filetree_example({ | ||
| "mni152nlin2009casym-pipeline": { | ||
| "templates.tsv": "", | ||
| "tpl-MNI152NLin2009cAsym": { | ||
| "tpl-MNI152NLin2009cAsym_res-1_T1w.nii.gz": "", | ||
| "tpl-MNI152NLin2009cAsym_res-1_T1w.json": "", | ||
|
|
@@ -117,7 +191,9 @@ A guide for using macros can be found at | |
| --> | ||
| {{ MACROS___make_filetree_example({ | ||
| "mnipediatricasym-pipeline": { | ||
| "templates.tsv": "", | ||
| "tpl-MNIPediatricAsym": { | ||
| "tpl-MNIPediatricAsym_cohorts.tsv": "", | ||
| "cohort-1": { | ||
| "tpl-MNIPediatricAsym_cohort-1_T1w.nii.gz": "", | ||
| "tpl-MNIPediatricAsym_cohort-1_T2w.nii.gz": "", | ||
|
|
@@ -152,6 +228,7 @@ A guide for using macros can be found at | |
| --> | ||
| {{ MACROS___make_filetree_example({ | ||
| "mni152nlin2009casym-pipeline": { | ||
| "templates.tsv": "", | ||
| "sub-001": { | ||
| "anat": { | ||
| "sub-001_from-T1w_to-MNI152NLin2009cAsym_mode-image_xfm.h5": "", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -566,6 +566,15 @@ colFA: | |
| image color is determined by the principal eigenvector of the diffusion tensor, | ||
| where red encodes the magnitude of the left-right component of that orientation, | ||
| with green and blue similarly encoding the anterior-posterior and inferior-superior components respectively. | ||
| cohorts: | ||
| value: cohorts | ||
| display_name: Cohort Entity Definitions | ||
| description: | | ||
| A TSV file describing labels found for the `cohort` entity within a template. | ||
|
|
||
| This file MUST be located within a `tpl-<label>/` directory. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This would need an explicit check to validate. Any TSV or JSON file can show up at the root without, even if it doesn't make much sense to do it. |
||
|
|
||
| The `cohorts.tsv` file provides metadata to identify and describe cohorts in the template. | ||
| coordsystem: | ||
| value: coordsystem | ||
| display_name: Coordinate System File | ||
|
|
@@ -870,6 +879,15 @@ stim: | |
| display_name: Continuous recording | ||
| description: | | ||
| Continuous measures, such as parameters of a film or audio stimulus. | ||
| templates: | ||
| value: templates | ||
| display_name: Template Entity Definitions | ||
| description: | | ||
| A TSV file describing labels found for the `tpl` entity in a Derivatives dataset. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a weird way of talking about it. I would say |
||
|
|
||
| This file MAY be located at the root of the derivative dataset. | ||
|
|
||
| The `templates.tsv` file provides metadata to identify and describe templates in the dataset. | ||
| svs: | ||
| value: svs | ||
| display_name: Single-voxel spectroscopy | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -12,6 +12,38 @@ SegmentationLookup: | |||||||||||||||||||
| index_columns: [index] | ||||||||||||||||||||
| additional_columns: allowed | ||||||||||||||||||||
|
|
||||||||||||||||||||
| Templates: | ||||||||||||||||||||
| selectors: | ||||||||||||||||||||
| - suffix == "templates" | ||||||||||||||||||||
| - extension == ".tsv" | ||||||||||||||||||||
| initial_columns: | ||||||||||||||||||||
| - template_id | ||||||||||||||||||||
| - description__entities | ||||||||||||||||||||
|
Comment on lines
+20
to
+21
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||
| columns: | ||||||||||||||||||||
| template_id: required | ||||||||||||||||||||
| description__entities: | ||||||||||||||||||||
| level: required | ||||||||||||||||||||
| description_addendum: | | ||||||||||||||||||||
| The corresponding label column is `template_id`. | ||||||||||||||||||||
|
Comment on lines
+24
to
+27
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can make
Suggested change
This also requires adding |
||||||||||||||||||||
| index_columns: [template_id] | ||||||||||||||||||||
| additional_columns: allowed_if_defined | ||||||||||||||||||||
|
|
||||||||||||||||||||
| Cohorts: | ||||||||||||||||||||
| selectors: | ||||||||||||||||||||
| - suffix == "cohorts" | ||||||||||||||||||||
| - extension == ".tsv" | ||||||||||||||||||||
| initial_columns: | ||||||||||||||||||||
| - cohort_id | ||||||||||||||||||||
| - description__entities | ||||||||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Again, I think this is overly prescriptive with column ordering.
Suggested change
|
||||||||||||||||||||
| columns: | ||||||||||||||||||||
| cohort_id: required | ||||||||||||||||||||
| description__entities: | ||||||||||||||||||||
| level: required | ||||||||||||||||||||
| description_addendum: | | ||||||||||||||||||||
| The corresponding label column is `cohort_id`. | ||||||||||||||||||||
| index_columns: [cohort_id] | ||||||||||||||||||||
| additional_columns: allowed_if_defined | ||||||||||||||||||||
|
|
||||||||||||||||||||
| Descriptions: | ||||||||||||||||||||
| selectors: | ||||||||||||||||||||
| - suffix == "descriptions" | ||||||||||||||||||||
|
|
||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would strongly suggest RRID here as a second column before "long_name"
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 for RRID, as always columns are optional but we know that when we put things in example they are more adopted than when we do not - might also consider DOI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now
descriptionis REQUIRED by the table definition, so either that needs to stay in addition tolong_nameor it needs to be demoted from REQUIRED.long_namewould need to be defined inobjects.columnsand added to the table definition.