You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/dcm2niix/README.md
+17-15Lines changed: 17 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,7 @@
3
3
This example aims at showing the capture of provenance for a [`dcm2niix`](https://github.com/rordenlab/dcm2niix) usecase: converting DICOM data to Nifti files within a BIDS dataset.
4
4
5
5
Source data for this example can be found here: https://github.com/psychoinformatics-de/hirni-demo. This is a datalad dataset containing anatomical and functional MRI acquisitions. The contents of this dataset can be downloaded using:
> [!NOTE] Note that the dataset must be added inside the `sourcedata/` directory.
13
14
14
-
## Experiment #1
15
+
## Purpose
16
+
17
+
The aim of the example is to describe the provenance records inside several files. Here we use sidecars and modality agnostic files inside the `prov/` directory, as follows:
15
18
16
-
The aim of the experiment is to describe the provenance records inside several files. Here we use sidecars and modality agnostic files inside the `prov/` directory, as follows:
17
19
```
18
20
.
19
21
├── prov
@@ -28,38 +30,38 @@ The aim of the experiment is to describe the provenance records inside several f
*`sub-02_ses-20130717141500_T1w.prov.jsonld` and `sub-02_ses-20140425155335_task-oneback_run-1_bold.prov.jsonld` are sidecars defining provenance for the corresponding `.nii` files.
33
+
*`sub-02_ses-20130717141500_T1w.prov.jsonld` and `sub-02_ses-20140425155335_task-oneback_run-1_bold.prov.jsonld` are "sidecars" defining provenance for the corresponding `.nii` files.
32
34
*`environments.prov.jsonld` mutualises the declaration of software environments objects for lower level prov files
33
35
*`software.prov.jsonld` mutualises the declaration of software pieces objects for lower level prov files
34
36
35
-
The python script `code/exp1_merge_prov.py` aims at merging all these provenance records into one RFD graph.
37
+
The python script `code/merge_prov.py` aims at merging all these provenance records into one JSON-LD graph.
36
38
37
39
```shell
38
-
pip install -r code/requirements.txt
39
-
mkdir prov/experiment_1/
40
-
python code/exp1_merge_prov.py
40
+
pip install bids-prov==0.1.0
41
+
mkdir prov/merged/
42
+
python code/merge_prov.py
41
43
```
42
44
43
-
From that, we generate the RDF graph `prov/experiment_1/merged_provenance.ttl`. Then we were able to plot the graph as a png file. We used this command:
45
+
From that, we generate the graph `prov/merged/dcm2niix.prov.jsonld`. Then we were able to plot the graph as a png file. We used this command:
In this example, we rely on the fact that nodes defined in the `prov/*.prov.jsonld` files have `bids::prov/` as base IRIs. Here are the involved nodes:
54
-
*`bids::prov/dcm2niix`
55
-
*`bids::prov/fedora`
56
+
*`bids::prov/dcm2niix-xce5m9z3`
57
+
*`bids::prov/fedora-b7hmkmqd`
56
58
57
59
### Limitations
58
60
59
-
The `bids::prov/fedora` node defined in `prov/environments.prov.jsonld`(see grey node in the above graph plot) is not recognized as a `prov:Entity` as the current context (commit [ce0eb77](https://github.com/bids-standard/BEP028_BIDSprov/commit/ce0eb774abd9527e594bd69212a87d5047864678)) does not define the `Environments` term.
61
+
The `bids::prov/fedora-b7hmkmqd` node defined in `prov/environments.prov.jsonld` is defined as an `Entity` as the current context (commit [ce0eb77](https://github.com/bids-standard/BEP028_BIDSprov/commit/ce0eb774abd9527e594bd69212a87d5047864678)) does not define the `Environments` term.
60
62
61
63
Listing all the DICOM files used by the dcm2niix conversion steps would lower readability of the JSON-LD provenance files. Therefore we only listed the following directories as `Entities`:
0 commit comments