Skip to content

Commit 63d2bf8

Browse files
committed
Conventions for forming IRIs
1 parent 7597be4 commit 63d2bf8

File tree

1 file changed

+63
-1
lines changed

1 file changed

+63
-1
lines changed

bep028spec.md

Lines changed: 63 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,6 +671,67 @@ Here is an example of a `GeneratedByProv` field containing the IRI of an `Entity
671671
> [!CAUTION]
672672
> TODO: where are the @context and BIDSProvVersion ?
673673
674+
### 3.3 Consistency of IRIs
675+
676+
BIDS-Prov recommands the following conventions in order to have consistant, human readable, and explicit IRIs[^3] as `Id` for provenance records objects. These principles also allow to identify where a record is described.
677+
678+
IRIs identifying `Activity`, `Agent`, and `Environment` provenance records inside files stored in a directory `<directory>` relatively to a BIDS dataset `<dataset>` SHOULD have the following form, where `<label>` is a human readable label for the record and `<uid>` is a unique group of chars:
679+
680+
```
681+
bids:<dataset>:<directory>#<name>-<uid>
682+
```
683+
684+
Here are a few naming examples:
685+
* `bids:ds001734:prov#conversion-xfMMbHK1`: an `Activity` described at dataset level inside the `ds001734` dataset;
686+
* `bids::sub-001/prov#dcm2niix-70ug8pl5"`: an `Agent` described at subject level inside the current dataset ;
687+
* `bids::prov#fedora-uldfv058"`: an `Environment` described at dataset level inside the current dataset.
688+
689+
IRI identifying `Entity` provenance records for a file `<file>` relatively to a BIDS dataset `<dataset>` SHOULD have the following form:
690+
691+
```
692+
bids:<dataset>:<file>
693+
```
694+
695+
derivatives/fmriprep/sub-001/func/sub-001_task-MGT_run-01_bold_space-MNI152NLin2009cAsym_preproc.nii.gz
696+
697+
Here are a few naming examples:
698+
* `bids:ds001734:sub-002/anat/sub-02_T1w.nii`: an `Entity` describing a T1w file for subject `sub-002` in the `ds001734` dataset ;
699+
* `bids:derivatives: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 `derivatives` dataset.
700+
701+
Here is another example that considers the following dataset:
702+
703+
```
704+
└─ dataset/
705+
├─ sub-001/
706+
│ └─ prov/
707+
│ └─ sub-001_prov-dcm2niix_act.json
708+
├─ ...
709+
└─ prov/
710+
├─ prov-dcm2niix_base.json
711+
└─ prov-dcm2niix_soft.json
712+
```
713+
714+
IRIs of provenance records defined in `prov/prov-dcm2niix_soft.json` should start with `bids:dataset:prov#` or `bids::prov#`.
715+
```JSON
716+
{
717+
"bids:dataset:prov#dcm2niix-70ug8pl5": {
718+
"Label": "dcm2niix",
719+
"Version": "v1.1.3"
720+
}
721+
}
722+
```
723+
724+
This `Agent` can be refered to in the `sub-001/prov/sub-001_prov-dcm2niix_act.json` file:
725+
```JSON
726+
{
727+
"bids:dataset:sub-001/prov#conversion-00f3a18f": {
728+
"Label": "Conversion",
729+
"Command": "dcm2niix",
730+
"AssociatedWith": "bids:dataset:prov#dcm2niix-70ug8pl5"
731+
}
732+
}
733+
```
734+
674735
## 4. Examples
675736

676737
A list of examples for BIDS-Prov are available in https://github.com/bids-standard/BEP028_BIDSprov/tree/master/examples
@@ -935,4 +996,5 @@ Contexts are created at the BIDS organization level, and only if necessary exten
935996
## Notes
936997

937998
[^1]: https://www.w3.org/TR/json-ld11/#basic-concepts
938-
[^2]: http://www.w3.org/TR/prov-o/
999+
[^2]: http://www.w3.org/TR/prov-o/
1000+
[^3]: https://www.w3.org/TR/json-ld11/#iris

0 commit comments

Comments
 (0)