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] Generalize rules that labels must be used consistently #1328

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ MUST be used to distinguish both images.
In such a case, two files could have the following names:
`sub-01_acq-singleband_dwi.nii.gz` and `sub-01_acq-multiband_dwi.nii.gz`.
The user is free to choose any other label than `singleband` and
`multiband`, as long as they are consistent across subjects and sessions.
`multiband`.

### REQUIRED gradient orientation information

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ rather than `_events.tsv`.
Each task has a unique label that MUST only consist of letters and/or numbers
(other characters, including spaces and underscores, are not allowed) with the
[`task-<label>`](../appendices/entities.md#task) entity.
Those labels MUST be consistent across subjects and sessions.

The OPTIONAL [`acq-<label>`](../appendices/entities.md#acq) entity corresponds to a custom label to
distinguish different conditions present during multiple runs of the same task.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ Volumes MUST be stored in chronological order (the order they were acquired in).

The OPTIONAL [`task-<label>`](../appendices/entities.md#task) is used to
indicate a task subjects were asked to perform in the scanner.
Those labels MUST be consistent across subjects and sessions.
For task based PET, a corresponding [`task events`](./05-task-events.md) file MUST be provided
(please note that this file is not necessary for resting scans).

Expand All @@ -91,8 +90,6 @@ but REQUIRED to distinguish between tracers if multiple are used.
The label used is arbitrary and each file requires a separate JSON sidecar
with details of the tracer used (see below).
Examples are `trc-18FFDG` for fludeoxyglucose or `trc-11CPIB` for Pittsburgh compound B.
Other labels are permitted, as long as they are consistent across subjects and sessions
and consist only of the legal label characters.

If more than one run of the same task and acquisition (tracer) are acquired during
the same session, the [`run-<index>`](../appendices/entities.md#run) entity MUST be used:
Expand Down
6 changes: 3 additions & 3 deletions src/04-modality-specific-files/10-microscopy.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ Consistent with other data types in BIDS, the session entity is optional.

The [`sample-<label>`](../appendices/entities.md#sample) entity is REQUIRED for
Microscopy data and is used to distinguish between different samples from the same subject.
The label MUST be unique per subject and is RECOMMENDED to be unique throughout the dataset.
Contrary to other labels, the `sample-<label>` MUST be unique per subject
and is RECOMMENDED to be unique throughout the dataset.

For example: Three brain slices (`sample-01` to `sample-03`) extracted from subject `sub-01`,
imaged by scanning electron microscopy (SEM) in PNG format
Expand Down Expand Up @@ -133,8 +134,7 @@ MAY be used to distinguish a different set of parameters used for acquiring the
For example, two images of the same sample acquired by bright-field microscopy (BF) in PNG format at
different magnification of 40x and 60x.
In such case two files could have the following names: `sub-01_sample-01_acq-40x_BF.png` and
`sub-01_sample-01_acq-60x_BF.png`, however the user is free to choose any other label as long as
they are consistent across subjects and sessions.
`sub-01_sample-01_acq-60x_BF.png`.

The [`stain-<label>`](../appendices/entities.md#stain) entity MAY be used to distinguish
image files from the same sample using different stains or antibodies for contrast enhancement.
Expand Down
3 changes: 3 additions & 0 deletions src/schema/objects/common_principles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ label:
for example, it is `rest` in `task-rest` following `task-<label>` specification.
Note that labels MUST not collide when casing is ignored
(see [Case collision intolerance](SPEC_ROOT/02-common-principles.md#case-collision-intolerance)).
For a given data type, labels MUST be consistent across subjects and sessions.
For example, an `acq` entity label `hires` used on the `anat` data of a given subject
MUST mean the same thing as `acq-hires` in `anat` files of any other subject.
Remi-Gau marked this conversation as resolved.
Show resolved Hide resolved
modality:
name: Modality
display_name: Modality
Expand Down
6 changes: 1 addition & 5 deletions src/schema/objects/entities.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ acquisition:
For example, this should be used when a study includes two T1w images -
one full brain low resolution and one restricted field of view but high resolution.
In such case two files could have the following names:
`sub-01_acq-highres_T1w.nii.gz` and `sub-01_acq-lowres_T1w.nii.gz`;
however, the user is free to choose any other label than `highres` and `lowres` as long
as they are consistent across subjects and sessions.
`sub-01_acq-highres_T1w.nii.gz` and `sub-01_acq-lowres_T1w.nii.gz`.

In case different sequences are used to record the same modality
(for example, `RARE` and `FLASH` for T1w)
Expand Down Expand Up @@ -381,8 +379,6 @@ task:
a given task may have different sets of stimuli (for example, randomized order) and participant responses
across subjects, sessions, and runs.

The `task-<label>` MUST be consistent across subjects and sessions.

Files with the `task-<label>` entity SHOULD have an associated
[events file](SPEC_ROOT/04-modality-specific-files/05-task-events.md#task-events),
as well as certain metadata fields in the associated JSON file.
Expand Down