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

[MISC] Move section on sessions.tsv file: longitudinal files -> modality agnostic files #805

Merged
merged 13 commits into from
Aug 2, 2021
14 changes: 14 additions & 0 deletions src/02-common-principles.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,20 @@ correspond to a unique identifier of that subject, such as `01`.
The same holds for the `session` entity with its `ses-` key and its `<label>`
value.

Session labels MUST consist only of alphanumeric characters `[a-zA-Z0-9]`
and SHOULD be consistent across subjects.
If numbers are used in session labels we RECOMMEND using zero padding
Remi-Gau marked this conversation as resolved.
Show resolved Hide resolved
(for example `ses-01`, `ses-11` instead of `ses-1`, `ses-11`). This makes
results of alphabetical sorting more intuitive. Acquisition time of session can
be defined in the [sessions file](03-modality-agnostic-files.md#sessions-file).
Remi-Gau marked this conversation as resolved.
Show resolved Hide resolved

The extra session layer (at least one `/ses-<label>` subfolder) SHOULD
Remi-Gau marked this conversation as resolved.
Show resolved Hide resolved
be added for all subjects if at least one subject in the dataset has more than
one session.
If a `/ses-<label>` subfolder is included as part of the directory hierarchy,
then the same [`ses-<label>`](./99-appendices/09-entities.md#ses)
key/value pair MUST also be included as part of the file names themselves.

A chain of entities, followed by a suffix, connected by underscores (`_`)
produces a human readable file name, such as `sub-01_task-rest_eeg.edf`.
It is evident from the file name alone that the file contains resting state
Expand Down
40 changes: 35 additions & 5 deletions src/03-modality-agnostic-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,9 @@ to date of birth.
Template:

```Text
phenotype/<measurement_tool_name>.tsv
phenotype/<measurement_tool_name>.json
phenotype/
<measurement_tool_name>.tsv
<measurement_tool_name>.json
```

Optional: Yes
Expand Down Expand Up @@ -329,9 +330,10 @@ questionnaire).
Template:

```Text
sub-<label>/[ses-<label>/]
sub-<label>[_ses-<label>]_scans.tsv
sub-<label>[_ses-<label>]_scans.json
sub-<label>/
[ses-<label>/]
sub-<label>[_ses-<label>]_scans.tsv
sub-<label>[_ses-<label>]_scans.json
```

Optional: Yes
Expand Down Expand Up @@ -379,6 +381,34 @@ meg/sub-control01_task-rest_split-01_meg.nii.gz 1877-06-15T12:15:27
meg/sub-control01_task-rest_split-02_meg.nii.gz 1877-06-15T12:15:27
```

## Sessions file

Template:

```Text
sub-<label>/
ses-<label>/
sub-<label>_sessions.tsv
Remi-Gau marked this conversation as resolved.
Show resolved Hide resolved
```

Optional: Yes

In case of multiple sessions there is an option of adding additional
`sessions.tsv` files describing variables changing between sessions.
In such case one file per participant SHOULD be added.
These files MUST include a `session_id` column and describe each session by one and only one row.
Column names in `sessions.tsv` files MUST be different from group level participant key column names in the
[`participants.tsv` file](./03-modality-agnostic-files.md#participants-file).

`_sessions.tsv` example:

```Text
session_id acq_time systolic_blood_pressure
ses-predrug 2009-06-15T13:45:30 120
ses-postdrug 2009-06-16T13:45:30 100
ses-followup 2009-06-17T13:45:30 110
Remi-Gau marked this conversation as resolved.
Show resolved Hide resolved
```

## Code

Template: `code/*`
Expand Down
41 changes: 0 additions & 41 deletions src/06-longitudinal-and-multi-site-studies.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,6 @@

Multiple sessions (visits) are encoded by adding an extra layer of directories
and file names in the form of `ses-<label>`.
Remi-Gau marked this conversation as resolved.
Show resolved Hide resolved
Session labels MUST consist only of alphanumeric characters `[a-zA-Z0-9]`
and SHOULD be consistent across subjects.
If numbers are used in session labels we RECOMMEND using zero padding
(for example `ses-01`, `ses-11` instead of `ses-1`, `ses-11`). This makes
results of alphabetical sorting more intuitive. Acquisition time of session can
be defined in the [sessions file](#sessions-file).
effigies marked this conversation as resolved.
Show resolved Hide resolved

The extra session layer (at least one `/ses-<label>` subfolder) SHOULD
be added for all subjects if at least one subject in the dataset has more than
one session.
If a `/ses-<label>` subfolder is included as part of the directory hierarchy,
then the same [`ses-<label>`](./99-appendices/09-entities.md#ses)
key/value pair MUST also be
included as part of the file names themselves.

```Text
sub-control01/
Expand Down Expand Up @@ -61,33 +47,6 @@ README
CHANGES
```

## Sessions file

Template:

```Text
sub-<label>/
sub-<label>_sessions.tsv
```

Optional: Yes

In case of multiple sessions there is an option of adding additional
`sessions.tsv` files describing variables changing between sessions.
In such case one file per participant SHOULD be added.
These files MUST include a `session_id` column and describe each session by one and only one row.
Column names in `sessions.tsv` files MUST be different from group level participant key column names in the
[`participants.tsv` file](./03-modality-agnostic-files.md#participants-file).

`_sessions.tsv` example:

```Text
session_id acq_time systolic_blood_pressure
ses-predrug 2009-06-15T13:45:30 120
ses-postdrug 2009-06-16T13:45:30 100
ses-followup 2009-06-17T13:45:30 110
```

## Multi-site or multi-center studies

This version of the BIDS specification does not explicitly cover studies with
Expand Down