Skip to content

Commit

Permalink
change BIDS URI reserved keyword: bids:local:/... -> bids::/...
Browse files Browse the repository at this point in the history
  • Loading branch information
sappelhoff committed Aug 9, 2021
1 parent 742db02 commit 3acd887
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 30 deletions.
18 changes: 9 additions & 9 deletions src/02-common-principles.md
Original file line number Diff line number Diff line change
Expand Up @@ -414,9 +414,9 @@ under the `DatasetLinks` field, which is an [object][] of [URIs][], as shown in
the examples below.
In brief, `dataset_description.DatasetLinks` contains mappings from strings to URIs
that point to dataset locations.
The `<dataset-name>`: `local` is a reserved value that may only be
used to refer to the root of the current dataset; `local` MUST NOT be a key in the
`DatasetLinks` object.
The `<dataset-name>`: `""` (that is, an empty string) is a reserved value that may only be
used to refer to the root of the current dataset; an empty string (`""`) MUST NOT be a key
in the `DatasetLinks` object.

In the case where a derivatives dataset is nested under a raw dataset and both have a `dataset_description.json` file,
the BIDS URIs within the nested derivatives dataset MUST be resolved with respect to `/derivatives/dataset_description.json`,
Expand All @@ -442,22 +442,22 @@ directory within a dataset:
}
```

Alternatively, we can also make use of the reserved `<dataset-name>`: `local`,
Alternatively, we can also make use of the reserved `<dataset-name>`: `""` (an empty string),
which always points to the root of the current dataset, to point to the same file
using the following syntax:
`bids:local:/derivatives/derivative1/sub-01/anat/sub-01_desc-preproc_T1w.nii.gz`
`bids::/derivatives/derivative1/sub-01/anat/sub-01_desc-preproc_T1w.nii.gz`

Thus, for this specific case there are two ways to refer to the same file:

1. `bids:deriv1:/sub-01/anat/sub-01_desc-preproc_T1w.nii.gz`,
with `deriv1` being specified within `dataset_description.DatasetLinks`,
as shown in the example above.

1. `bids:local:/derivatives/derivative1/sub-01/anat/sub-01_desc-preproc_T1w.nii.gz`,
with `local` NOT being part of `dataset_description.DatasetLinks`, because it
is a reserved value that always points to the root of the current dataset.
1. `bids::/derivatives/derivative1/sub-01/anat/sub-01_desc-preproc_T1w.nii.gz`,
with `""` (an empty string) NOT being a key in `dataset_description.DatasetLinks`,
because it is a reserved value that always points to the root of the current dataset.

If *all* BIDS URIs in a dataset *only* use `local` as a `<dataset-name>`,
If *all* BIDS URIs in a dataset *only* use an empty string (`""`) as a `<dataset-name>`,
the `DatasetLinks` metadata MAY not be specified.

### Refer to a remote dataset
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -964,8 +964,8 @@ For example:
```JSON
{
"IntendedFor": [
"bids:local:/sub-01/ses-pre/func/sub-01_ses-pre_task-motor_run-1_bold.nii.gz",
"bids:local:/sub-01/ses-pre/func/sub-01_ses-pre_task-motor_run-2_bold.nii.gz"
"bids::/sub-01/ses-pre/func/sub-01_ses-pre_task-motor_run-1_bold.nii.gz",
"bids::/sub-01/ses-pre/func/sub-01_ses-pre_task-motor_run-2_bold.nii.gz"
]
}
```
Expand Down Expand Up @@ -1053,7 +1053,7 @@ For example:
```JSON
{
"Units": "rad/s",
"IntendedFor": "bids:local:/sub-01/func/sub-01_task-motor_bold.nii.gz",
"IntendedFor": "bids::/sub-01/func/sub-01_task-motor_bold.nii.gz",
"B0FieldIdentifier": "b0map_fmap0"
}
```
Expand Down Expand Up @@ -1094,7 +1094,7 @@ For example:
{
"PhaseEncodingDirection": "j-",
"TotalReadoutTime": 0.095,
"IntendedFor": "bids:local:/sub-01/func/sub-01_task-motor_bold.nii.gz",
"IntendedFor": "bids::/sub-01/func/sub-01_task-motor_bold.nii.gz",
"B0FieldIdentifier": "pepolar_fmap0"
}
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ Example:

```JSON
{
"IntendedFor":"bids:local:/sub-01/ses-01/anat/sub-01_T1w.nii",
"IntendedFor":"bids::/sub-01/ses-01/anat/sub-01_T1w.nii",
"EEGCoordinateSystem":"Other",
"EEGCoordinateUnits":"mm",
"EEGCoordinateSystemDescription":"RAS orientation: Origin halfway between LPA and RPA, positive x-axis towards RPA, positive y-axis orthogonal to x-axis through Nasion, z-axis orthogonal to xy-plane, pointing in superior direction.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -382,11 +382,11 @@ General fields:
"specified in `iEEGCoordinateSystem`. "
"For example, **T1**: `'sub-<label>/ses-<label>/anat/"
"sub-01_T1w.nii.gz'` "
"**Surface**: `'bids:local:/derivatives/surfaces/sub-<label>/ses-<label>/anat/"
"**Surface**: `'bids::/derivatives/surfaces/sub-<label>/ses-<label>/anat/"
"sub-01_desc-T1w_hemi-R_pial.surf.gii'` "
"**Operative photo**: `'bids:local:/sub-<label>/ses-<label>/ieeg/"
"**Operative photo**: `'bids::/sub-<label>/ses-<label>/ieeg/"
"sub-0001_ses-01_acq-photo1_photo.jpg'` "
"**Talairach**: `'bids:local:/derivatives/surfaces/sub-Talairach/ses-01/anat/"
"**Talairach**: `'bids::/derivatives/surfaces/sub-Talairach/ses-01/anat/"
"sub-Talairach_hemi-R_pial.surf.gii'`",
)
}
Expand Down Expand Up @@ -436,7 +436,7 @@ Example:

```json
{
"IntendedFor": "bids:local:/sub-01/ses-01/anat/sub-01_T1w.nii.gz",
"IntendedFor": "bids::/sub-01/ses-01/anat/sub-01_T1w.nii.gz",
"iEEGCoordinateSystem": "ACPC",
"iEEGCoordinateUnits": "mm",
"iEEGCoordinateSystemDescription": "Coordinate system with the origin at anterior commissure (AC), negative y-axis going through the posterior commissure (PC), z-axis going to a mid-hemisperic point which lies superior to the AC-PC line, x-axis going to the right",
Expand Down
12 changes: 6 additions & 6 deletions src/05-derivatives/02-common-data-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ sub-01/func/sub-01_task-rest_desc-preproc_bold.json

```JSON
{
"RawSources": ["bids:local:/sub-01/func/sub-01_task-rest_bold.nii.gz"]
"RawSources": ["bids::/sub-01/func/sub-01_task-rest_bold.nii.gz"]
}
```

Expand All @@ -44,8 +44,8 @@ the same subject's `T1w`, then both files MAY be included in `RawSources`.
```JSON
{
"RawSources": [
"bids:local:/sub-01/func/sub-01_task-rest_bold.nii.gz",
"bids:local:/sub-01/anat/sub-01_T1w.nii.gz"
"bids::/sub-01/func/sub-01_task-rest_bold.nii.gz",
"bids::/sub-01/anat/sub-01_T1w.nii.gz"
]
}
```
Expand All @@ -56,10 +56,10 @@ occurs in the derivatives, `Sources` and `RawSources` can both be specified.
```JSON
{
"Sources": [
"bids:local:/sub-01/anat/sub-01_desc-preproc_T1w.nii.gz"
"bids::/sub-01/anat/sub-01_desc-preproc_T1w.nii.gz"
],
"RawSources": [
"bids:local:/sub-01/func/sub-01_task-rest_bold.nii.gz"
"bids::/sub-01/func/sub-01_task-rest_bold.nii.gz"
]
}
```
Expand Down Expand Up @@ -105,7 +105,7 @@ sub-01/func/sub-01_task-rest_space-individual_bold.json

```JSON
{
"SpatialReference": "bids:local:/sub-01/anat/sub-01_desc-combined_T1w.nii.gz"
"SpatialReference": "bids::/sub-01/anat/sub-01_desc-combined_T1w.nii.gz"
}
```

Expand Down
10 changes: 5 additions & 5 deletions src/99-appendices/11-qmri.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,11 +262,11 @@ sub-01_T1map.json:
<<Parameter injected by the software/pipeline>>
"BasedOn":["bids:local:/sub-01/anat/sub-01_flip-1_VFA.nii.gz",
"bids:local:/sub-01/anat/sub-01_flip-2_VFA.nii.gz",
"bids:local:/sub-01/anat/sub-01_flip-3_VFA.nii.gz",
"bids:local:/sub-01/anat/sub-01_flip-4_VFA.nii.gz",
"bids:local:/sub-01/fmap/sub-01_TB1map.nii.gz"],
"BasedOn":["bids::/sub-01/anat/sub-01_flip-1_VFA.nii.gz",
"bids::/sub-01/anat/sub-01_flip-2_VFA.nii.gz",
"bids::/sub-01/anat/sub-01_flip-3_VFA.nii.gz",
"bids::/sub-01/anat/sub-01_flip-4_VFA.nii.gz",
"bids::/sub-01/fmap/sub-01_TB1map.nii.gz"],
"EstimationPaper":"Deoni et. al.MRM, 2015",
"EstimationAlgorithm":"Linear",
"Units": "second",
Expand Down
2 changes: 1 addition & 1 deletion src/schema/metadata/DatasetLinks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: DatasetLinks
description: |
Used to map a given `<dataset-name>` from a [BIDS URI][] of the form
`bids:<dataset-name>:/absolute/path/within/dataset` to a local or remote location.
The `<dataset-name>`: `local` is a reserved keyword that MUST NOT be a key in `DatasetLinks`
The `<dataset-name>`: `""` (an empty string) is a reserved keyword that MUST NOT be a key in `DatasetLinks`
type: object
additionalProperties:
type: string
Expand Down

0 comments on commit 3acd887

Please sign in to comment.