Skip to content

Commit 32f80c7

Browse files
committed
Using identifier instead of
1 parent f557eaa commit 32f80c7

File tree

1 file changed

+31
-33
lines changed

1 file changed

+31
-33
lines changed

src/modality-agnostic-files/provenance.md

Lines changed: 31 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ For the most part, this metadata consists of **provenance records** of 4 types:
5151
- **Software**: software packages activities are associated with.
5252
- **Environments**: software environments in which activities were performed.
5353

54-
!!! example
54+
!!! example "Relations between provenance records"
5555

56-
The following graph presents examples of links between provenance records.
56+
The following graph presents examples of relations between provenance records.
5757

5858
```mermaid
5959
flowchart BT
@@ -106,7 +106,7 @@ and a guide for using macros can be found at
106106
)
107107
}}
108108

109-
!!! example
109+
!!! example "Example of provenance file organization"
110110
```
111111
prov/
112112
├─ preprocspm/
@@ -149,8 +149,7 @@ and a guide for using macros can be found at
149149
-->
150150
{{ MACROS___make_subobject_table("metadata.Activities.items") }}
151151

152-
!!! example
153-
Provenance metadata in a `prov/[<subdir>/]prov-<label>_act.json` file:
152+
!!! example "Example of provenance record in a `prov/[<subdir>/]prov-<label>_act.json` file"
154153
```JSON
155154
{
156155
"Activities": [
@@ -213,8 +212,7 @@ and a guide for using macros can be found at
213212
-->
214213
{{ MACROS___make_subobject_table("metadata.Entities.items") }}
215214

216-
!!! example
217-
Provenance metadata in a `prov/[<subdir>/]prov-<label>_ent.json` file:
215+
!!! example "Example of provenance record in a `prov/[<subdir>/]prov-<label>_ent.json` file"
218216
```JSON
219217
{
220218
"Entities": [
@@ -260,8 +258,7 @@ and a guide for using macros can be found at
260258
-->
261259
{{ MACROS___make_subobject_table("metadata.Software.items") }}
262260

263-
!!! example
264-
Provenance metadata in a `prov/[<subdir>/]prov-<label>_soft.json` file:
261+
!!! example "Example of provenance record in a `prov/[<subdir>/]prov-<label>_soft.json` file"
265262
```JSON
266263
{
267264
"Software": [
@@ -304,8 +301,7 @@ and a guide for using macros can be found at
304301
-->
305302
{{ MACROS___make_subobject_table("metadata.Environments.items") }}
306303

307-
!!! example
308-
Provenance metadata in a `prov/[<subdir>/]prov-<label>_ent.json` file:
304+
!!! example "Example of provenance record in a `prov/[<subdir>/]prov-<label>_env.json` file"
309305
```JSON
310306
{
311307
"Environments": [
@@ -345,8 +341,7 @@ and a guide for using macros can be found at
345341

346342
`SidecarGeneratedBy` MUST explicitly include all activities that modified the sidecar JSON, even if some are already listed in `GeneratedBy`.
347343

348-
!!! example
349-
Provenance metadata in a sidecar JSON file:
344+
!!! example "Example of provenance metadata in a sidecar JSON file"
350345
```JSON
351346
{
352347
"GeneratedBy": "bids::prov#conversion-00f3a18f",
@@ -393,8 +388,7 @@ This section details a way to describe the provenance of a dataset using provena
393388

394389
Related `Activities` MUST be described inside the dataset (see the [`Activities`](#activities) section).
395390

396-
!!! example
397-
`GeneratedBy` contents in a `dataset_description.json`:
391+
!!! example "Example of `GeneratedBy` contents in a `dataset_description.json`"
398392
```JSON
399393
{
400394
"GeneratedBy": "bids::prov#preprocessing-xMpFqB5q"
@@ -425,8 +419,7 @@ and a guide for using macros can be found at
425419
}
426420
) }}
427421

428-
!!! example
429-
`GeneratedBy` contents in a `dataset_description.json`:
422+
!!! example "Example of `GeneratedBy` contents in a `dataset_description.json`"
430423
```JSON
431424
{
432425
"GeneratedBy": [
@@ -442,36 +435,41 @@ and a guide for using macros can be found at
442435
}
443436
```
444437

445-
## Consistency and uniqueness of Ids
438+
## Consistency and uniqueness of identifiers
446439

447-
The following rules and conventions are provided in order to have consistent, human readable, and explicit [IRIs](https://www.w3.org/TR/json-ld11/#iris) as `Id` for provenance records.
440+
The following rules and conventions are provided in order to have consistent, human readable, and explicit [IRIs](https://www.w3.org/TR/json-ld11/#iris) as identifiers for provenance records.
448441

449-
### `Id` for entities
442+
!!! note
443+
The `Id` field contains the identifier of a provenance records.
444+
445+
### Identifiers for entities
450446

451-
An `Id` identifying an entity corresponding to a file of a BIDS dataset MUST be a [BIDS URI](../common-principles.md#bids-uri).
447+
The identifier of an entity describing a BIDS file inside a BIDS dataset MUST be a [BIDS URI](../common-principles.md#bids-uri).
452448

453449
!!! note
454450
The use of BIDS URIs may require to define the `DatasetLinks` object in [`dataset_description.json`](dataset-description.md#dataset_descriptionjson).
455451

456-
!!! example "Examples of `Id` for entities"
457-
- `bids:ds001734:sub-002/anat/sub-02_T1w.nii`: the `Id` of an entity describing a T1w file for subject `sub-002` in the `ds001734` dataset;
458-
- `bids::sub-014/func/sub-014_task-MGT_run-01_events.tsv`: the `Id` of an entity describing an events file for subject `sub-014` in the current dataset;
459-
- `bids:fmriprep:sub-001/func/sub-001_task-MGT_run-01_bold_space-MNI152NLin2009cAsym_preproc.nii.gz`: the `Id` of an entity describing a bold file for subject `sub-001` in the `fmriprep` dataset.
452+
!!! example "Examples of identifiers for entities"
453+
- `bids:ds001734:sub-002/anat/sub-02_T1w.nii` - an entity describing a T1w file for subject `sub-002` in the `ds001734` dataset;
454+
- `bids::sub-014/func/sub-014_task-MGT_run-01_events.tsv` - an entity describing an events file for subject `sub-014` in the current dataset;
455+
- `bids:fmriprep:sub-001/func/sub-001_task-MGT_run-01_bold_space-MNI152NLin2009cAsym_preproc.nii.gz` - an entity describing a bold file for subject `sub-001` in the `fmriprep` dataset.
456+
457+
For other cases listed in the [Entities](#entities) section, the identifier of an entity described in a BIDS dataset `<dataset>` SHOULD have the following form, where `<label>` is a human readable name for coherently identifying the record and `<uid>` is a unique group of chars.
460458

461-
### `Id` for other provenance records
459+
### Identifiers for other provenance records
462460

463-
An `Id` identifying activity, software, or environment provenance records described in a BIDS dataset `<dataset>` SHOULD have the following form, where `<label>` is a human readable name for coherently identifying the record and `<uid>` is a unique group of chars.
461+
The identifier of an activity, software, or environment described in a BIDS dataset `<dataset>` SHOULD have the following form, where `<label>` is a human readable name for coherently identifying the record and `<uid>` is a unique group of chars.
464462

465463
```text
466464
bids:<dataset>:prov#<label>-<uid>
467465
```
468466

469-
The uniqueness of this `Id` MUST be used to distinguish any `Activity`, `Software`, or `Environment` that are different in any of their attributes.
467+
The uniqueness of this identifier MUST be used to distinguish any activity, software, or environment that are different in any of their attributes.
470468

471-
!!! example "Examples of `Id` for activities, environments and software"
472-
- `bids:ds001734:prov#conversion-xfMMbHK1`: a conversion activity described inside the `ds001734` dataset;
473-
- `bids::prov#fedora-uldfv058`: a Fedora based environment described inside the current dataset.
474-
- `bids:preprocessing:prov#fmriprep-r4kzzMt8`: the fMRIPrep software described inside the `preprocessing` dataset.
469+
!!! example "Examples of identifiers for activities, environments and software"
470+
- `bids:ds001734:prov#conversion-xfMMbHK1` - a conversion activity described inside the `ds001734` dataset;
471+
- `bids::prov#fedora-uldfv058` - a Fedora based environment described inside the current dataset.
472+
- `bids:preprocessing:prov#fmriprep-r4kzzMt8` - the fMRIPrep software described inside the `preprocessing` dataset.
475473

476474
## Minimal example
477475

@@ -501,7 +499,7 @@ A guide for using macros can be found at
501499
}
502500
) }}
503501

504-
The following provenance record is defined in `prov/prov-dcm2niix_soft.json`. As mentioned in the [Consistency and uniqueness of Ids](#consistency-and-uniqueness-of-ids) section, its `Id` SHOULD start with `bids:<dataset>:prov#` (here, `bids::` refers to the current dataset).
502+
The following provenance record is defined in `prov/prov-dcm2niix_soft.json`. As mentioned in the [Consistency and uniqueness of Ids](#consistency-and-uniqueness-of-ids) section, its identifier SHOULD start with `bids:<dataset>:prov#` (here, `bids::` refers to the current dataset).
505503

506504
```JSON
507505
{

0 commit comments

Comments
 (0)