-
Notifications
You must be signed in to change notification settings - Fork 200
[ENH] BEP036 - Phenotypic Data Guidelines #2123
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 31 commits
3cedc86
11fbb47
0ef9fdf
0a640e6
a19512b
5718888
8f54e94
94cb476
142c460
8b78359
60f712a
e62b5cc
ac097aa
32fedd0
aacda9b
fd5ff2d
dd65b5e
f4205e8
0eba71d
d3631a8
f4939ad
abd5c2b
ec2c53d
7639001
8b38859
d1141a0
6c6ee8b
9f8afec
8fa89bc
ff86669
ede68ef
e8ab5dd
3490e9d
d02e0bf
f8d6333
bd083c0
ec2703b
00d8f25
41f0f70
cdfc0d2
6cbb4ee
fe3ddab
40f6751
2fd12d7
a0cab8b
c0bd78a
97917f0
80683f6
76932fe
32f994e
3a602ca
f8d492e
7f1eb09
5c55eb9
c0951f3
69183c7
d3f1d0d
a9e2d4b
b60eac1
b95feec
d8b34f3
b908a19
c156df4
d2a67f6
b19356f
4be4556
db34902
a7abb76
9dc6637
37df2e4
878bc4a
0708e30
4b3fdef
46f2777
69c8cde
882734a
abf16ca
2ec8859
b050199
512c8d4
1c9fef6
ecda3ad
4669da3
aefcb5d
d45ce4c
273b88e
5dce352
12e7db1
86f8ecb
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 |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "githubPullRequests.ignoredPullRequestBranches": [ | ||
| "master" | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,332 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Tabular phenotypic data guidelines | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| This appendix is a collection of guidelines and examples | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| for creating well-organized aggregated tabular phenotypic data. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
ericearl marked this conversation as resolved.
Outdated
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ## Guidelines | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| These guidelines all apply when the | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| [`AdditionalValidation` key](../modality-agnostic-files/dataset-description.md#additional-validation) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| contains `"Phenotype"` in the `dataset_description.json`. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| They are intended to improve the organization and clarity of | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tabular phenotypic data like the participants file, sessions file, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| and phenotypic and assessment data. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
ericearl marked this conversation as resolved.
Outdated
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### 1. Aggregate data across sessions | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
effigies marked this conversation as resolved.
Outdated
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Aggregation refers to the contents of the TSV file. It is REQUIRED | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| to collect all participant data into one TSV per tabular phenotypic file. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
ericearl marked this conversation as resolved.
Outdated
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### 2. Always pair tabular data with data dictionaries | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Tabular phenotypic data MUST be prepared as one pair of a tabular file | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| in tab-separated value (TSV) format and a corresponding data dictionary | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| in JavaScript Object Notation (JSON) format. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
ericearl marked this conversation as resolved.
Outdated
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### 3. Add `MeasurementToolMetadata` to each tabular phenotypic measurement tool | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Whenever possible, it is RECOMMENDED to add `MeasurementToolMetadata` to | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Member
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. Not an issue for this bep: In this and in the main phenotype article its implied that every tsv in the phenotype directory is a "Measurement Tool", but never explicitly stated that this is the only kind of tsv. Gave me pause when reviewing this, but it may be obvious to everyone else.
Collaborator
Author
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. Yeah, the only permitted files in the phenotype folder are the measurement tool's TSVs and JSONs. Do you have an idea of where a sentence in the spec might help clear this up for other folks with the same experience you had there? |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| each `phenotype/<measurement_tool_name>.json` data dictionary. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Member
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
According to the file-naming template just above (L26), this should now use |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| This improves reusability and provides clarity about the measurement tool. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
ericearl marked this conversation as resolved.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### 4. Ensure minimal annotation for phenotypic and assessment data | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| In phenotypic and assessment data each measurement tool SHOULD have an independent | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| aggregated data TSV file in which the user collects all subjects, sessions, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| and/or runs of data as one entry per row (with a row defined by | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| the smallest unit of acquisition). In other words: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1. Each row MUST start with `participant_id`. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1. Each TSV file MUST contain a `session_id` column when | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| multiple [sessions](../glossary.md#session-entities)[^1] are present | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Contributor
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. not familiar with the |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| in the data set regardless of whether those sessions are in | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| the `phenotype/` data, `sub-<label>/` data, or a combination of the two. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1. If more than one of the same measurement tool is acquired within | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| the same `session_id`, a `run_id` column MUST be added. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1. To encode the acquisition time for a measurement tool’s `session_id`, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| add the `session_id` to the sessions file and | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| include the OPTIONAL `acq_time` column. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Contributor
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
Or just regular list? I wouldn't nest one top-level enumeration in another.
ericearl marked this conversation as resolved.
Outdated
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #### To summarize this guideline as a table | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Contributor
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. I'd say this does not have to be a sub-heading. How about just having the table here with no further context? Or if context is needed, just plaintext. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <!-- 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("modality_agnostic.Phenotypes") }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Furthermore, if you have to add a `session_id` column to the | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tabular phenotypic data, you then MUST also introduce a session directory to the | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| imaging data, even if only one imaging session has been created. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| This rule can be considered as "**if anyone uses sessions, everyone uses sessions**." | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| And vice versa, if imaging data has session directories, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| all imaging data and tabular phenotypic data MUST have sessions. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| This produces a file in which same-participant entries can take up as many rows | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| as needed according to the smallest unit of acquisition. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| The combination of values in the `participant_id`, `session_id`, and `run_id` (if present) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| columns MUST be unique for the entire tabular file. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Contributor
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. I think this is sufficiently clear from the table - we could add a point on |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### 5. Store longitudinal age in the participants file | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Contributor
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. How about we turn this into a general section on what is "demographic" information (and thus goes into
Contributor
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. Similar to point 7 essentially
Collaborator
Author
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. I don't know how to squeeze it in explicitly without an 11th guideline. Do you have any suggestions you can make directly in a commit or a PR comment suggestion? |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| It is RECOMMENDED to use the `age` column to record participant age | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| at every session in longitudinal or multi-session data sets. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| This reduces data duplication across tabular data files. The `Units` of `age` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| do not have to be years so long as the units of the age | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| are written in `participants.json`. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Consider participant privacy or study objectives when selecting | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| the `Units` of `age` or the accuracy of `age` data. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### 6. Use the sessions file at the root-level | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| If there is more than one session for any one participant, then | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| it is REQUIRED to provide a sessions file at the dataset root. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| The sessions file MUST list all sessions for all subjects across | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| imaging and tabular phenotypic data. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| If a sessions file is provided, then it MUST begin with a `participant_id` column | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| followed immediately by a `session_id` column. The data dictionary JSON file’s | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| `session_id` field MUST include `Levels` with the description of each `session_id`. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### 7. Use either root-level sessions file or participant-level sessions files | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| When a sessions file is in use, you MUST NOT provide additional sessions files | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| at the participant-level which would otherwise use the inheritance principle. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
ericearl marked this conversation as resolved.
Outdated
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### 8. Record acquisition time of sessions with `acq_time` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Whenever possible, it is RECOMMENDED to also collect acquisition time for | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tabular phenotypic data and store the time of acquisition[^2] of each row | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| inside a column named `acq_time` in the sessions file. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| This is consistent with how acquisition time is recorded for MRI data | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| and other time-sensitive measurements (for example systolic blood pressure). | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Contributor
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. I agree with this, but I find it a bit confusingly worded.
Essentially what we're saying is: please record the |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### 9. Respect participant privacy when recording acquisition times | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| When needed to preserve participant privacy, you SHOULD record | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| relative acquisition times with respect to the earliest session. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Relative session acquisition times MAY be listed as durations from | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| the earliest session (baseline) in days, months, or years | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| using the `acq_time` column. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ## Summary | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| This appendix described guidelines for best tabular phenotypic data. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| A short summary table here describes when to use which files. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| | File | Single session data | Multiple session data | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| | :----------------------------- | :------------------ | :-------------------- | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| | Participants | RECOMMENDED | RECOMMENDED | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| | Phenotypic and assessment data | RECOMMENDED | RECOMMENDED | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| | Sessions | OPTIONAL | REQUIRED | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ## Examples | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| What follows are a few common use case examples for tabular phenotypic files. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### 1 participant session with both non-tabular and tabular phenotypic data | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| File tree | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ```Text | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| phenotype/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <measurement_tool_name>.json | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <measurement_tool_name>.tsv | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sub-01/anat/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sub-01_T1w.json | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sub-01_T1w.nii.gz | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Contents of `phenotype/<measurement_tool_name>.tsv` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ```tsv | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| participant_id measurement_1 measurement_2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sub-01 value1 value2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### 1 participant with 2 sessions, where 1 session is only tabular phenotype and the other is only imaging | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| With only one imaging and one phenotypic session each in this example you might want | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| to merge both imaging and phenotypic data under one session. But it is more correct to | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| have separate sessions for the imaging and phenotypic data, especially if | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| the sessions were collected days, weeks, or months apart. You can denote both sessions | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| and their acquisition time in the `sessions.tsv` file and have `session_id` `Levels` noted | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| in the `sessions.json` sidecar. Below are a CORRECT and an INCORRECT example | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| of prepared data following these guidelines. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #### CORRECT | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| File tree | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ```Text | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| phenotype/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <measurement_tool_name>.json | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <measurement_tool_name>.tsv | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sub-01/ses-MRI/anat/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sub-01_ses-MRI_T1w.json | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sub-01_ses-MRI_T1w.nii.gz | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Contents of `phenotype/<measurement_tool_name>.tsv` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ```tsv | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| participant_id session_id measurement_1 measurement_2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sub-01 ses-pheno value1 value2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #### INCORRECT | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| File tree | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ```Text | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| phenotype/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <measurement_tool_name>.json | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <measurement_tool_name>.tsv | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sub-01/anat/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sub-01_T1w.json | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sub-01_T1w.nii.gz | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Contents of `phenotype/<measurement_tool_name>.tsv` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ```tsv | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| participant_id measurement_1 measurement_2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sub-01 value1 value2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| A session directory **MUST** be present in the participant directory and | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| the `session_id` column **MUST** be present in `<measurement_tool_name>.tsv` as well. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Sessions must be used consistently for the combination of tabular and | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| non-tabular phenotypic data. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### 2 participants with a mix of tabular phenotypic data and imaging sessions | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| File tree | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ```Text | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| phenotype/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <measurement_tool_name>.json | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <measurement_tool_name>.tsv | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sub-01/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ses-MRI1/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| anat/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sub-01_ses-MRI1_T1w.json | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sub-01_ses-MRI1_T1w.nii.gz | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ses-MRI2/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| anat/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sub-01_ses-MRI2_T1w.json | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sub-01_ses-MRI2_T1w.nii.gz | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sub-02/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ses-MRI1/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| anat/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sub-02_ses-MRI1_T1w.json | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sub-02_ses-MRI1_T1w.nii.gz | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Contents of `phenotype/<measurement_tool_name>.tsv` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ```tsv | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| participant_id session_id measurement_1 measurement_2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sub-01 ses-pheno1 value1 value2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sub-02 ses-pheno1 value3 value4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sub-02 ses-pheno2 value5 value6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### 3 participants with 3 different kinds of sessions among them | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| The `ses-baseline` session collects an MRI and tabular phenotypic data. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| File tree | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ```Text | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| participants.json | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| participants.tsv | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sessions.json | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sessions.tsv | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| phenotype/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| demographics.json | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| demographics.tsv | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ... | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sub-01/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ses-baseline/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ses-followupMRI/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sub-02/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ses-baseline/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sub-03/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ses-baseline/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ses-followupMRI/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Contents of `sessions.tsv`. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ```tsv | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| participant_id session_id acq_time | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sub-01 ses-baseline 2001-01-01T12:05:00 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sub-01 ses-followupMRI 2001-07-01T13:33:00 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sub-01 ses-interview 2002-01-01T11:21:00 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sub-02 ses-baseline 2001-04-01T11:01:00 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sub-02 ses-interview 2002-04-01T14:08:00 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sub-03 ses-baseline 2001-09-01T11:45:00 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sub-03 ses-followupMRI 2002-03-01T12:17:00 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Contents of `sessions.json`. Note how the `session_id` `Levels` are clearly described. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ```json | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "participant_id": { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "Description": "BIDS participant identifier" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "session_id": { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "Description": "BIDS session identifier", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "Levels": { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "ses-baseline": "Baseline visit for MRI and assessments", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "ses-followupMRI": "6-months after baseline MRI follow-up", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "ses-interview": "1-year after baseline in-person follow-up" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "acq_time": { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "Description": "When the data acquisition started" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Contents of `participants.tsv`. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ```tsv | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| participant_id sex | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sub-01 M | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sub-02 F | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sub-03 F | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Contents of `phenotype/demographics.tsv`. Measures or features that can change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| from session to session belong here especially. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ```tsv | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| participant_id session_id age gender race household_income | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sub-01 ses-baseline 10 3 4 5 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sub-01 ses-followupMRI 10 3 4 5 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sub-01 ses-interview 11 4 4 6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sub-02 ses-baseline 9 1 3 3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sub-02 ses-interview 10 1 7 3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sub-03 ses-baseline 11 2 10 4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sub-03 ses-followupMRI 12 5 10 4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| For more complete examples, see the `pheno00*` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| [bids-examples on GitHub](https://github.com/bids-standard/bids-examples/). | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| [^1]: A session is any logical grouping of imaging and behavioral data consistent | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| across participants. Session can (but doesn't have to) be synonymous to a visit | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| in a longitudinal study. In situations where different data types are obtained over | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| several visits (for example fMRI on one day followed by DWI the day after) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| those can still be grouped in one session. Refer to the | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| [definition of session](../glossary.md#session-entities) for more details. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| [^2]: Datetime format and the anonymization procedure are | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| described in [Units](../common-principles.md#units). | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
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 think this is added by accident in surchs@0eba71d @ericearl
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.
Agreed. I will try to get it out of there.