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: bep028spec.md
+72-48Lines changed: 72 additions & 48 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,8 @@ Provenance comes up in many different contexts in BIDS. This specification focus
37
37
1. The raw conversion from DICOM images or other instrument native formats to BIDS layout, details of stimulus presentation and cognitive paradigms, and clinical and neuropsychiatric assessments, each come with their own details of provenance.
38
38
2. In BIDS derivatives, the consideration of outputs requires knowledge of which inputs from the BIDS dataset were used together with what software was run in what environment and with what parameters.
39
39
40
-
TODO: those above should be covered with their own example
40
+
> [!CAUTION]
41
+
> TODO: those above should be covered with their own example
41
42
42
43
But provenance comes up in other contexts as well, which might be addressed at a later stage:
43
44
@@ -127,15 +128,15 @@ A skeleton for a BIDS-Prov JSON-LD file looks like this:
127
128
<tr>
128
129
<td><code>Records</code>
129
130
</td>
130
-
<td>REQUIRED. A list of provenance records (Activity, Entity, Agent, Environement), describing the provenance (see the <ahref="#2-provenance-records">Provenance records</a> section below).
131
+
<td>REQUIRED. A list of provenance records (Activity, Entity, Agent, Environement), describing the provenance (see the <ahref="#2-provenance-records">2. Provenance records</a> section below).
131
132
</td>
132
133
</tr>
133
134
</table>
134
135
135
136
BIDS-Prov allows this skeleton to be splitted into several *JSON* files. This is described in sections [3.1.3 Suffixes](#3-1-3-suffixes)
136
137
and [3.2 Provenance description levels](#3-2-provenance-description-levels).
137
138
138
-
Using tools provided by BIDS-Prov ([5 Tools](#5-tools)), these JSON contents can be merged back to a structured JSON-LD as described above.
139
+
Using tools provided by BIDS-Prov ([5. Tools](#5-tools)), these JSON contents can be merged back to a structured JSON-LD as described above.
139
140
140
141
> [!NOTE]
141
142
> Since the JSON-LD documents are graph objects, they can be aggregated using RDF tools without the need to apply the inheritance principle.
@@ -158,6 +159,11 @@ Activities represent the transformations that have been applied to the data. Eac
158
159
### 2.1 Activity
159
160
Each Activity record is a JSON Object with the following fields:
160
161
162
+
> [!CAUTION]
163
+
> TODO: AssociatedWith and Used can also entirely describe the Agent (resp. Entity)
164
+
> TODO: AssociatedWith and Used can be lists
165
+
> TODO: Can an Activity represent a group of command lines ? If so, Command can be a list
166
+
161
167
<table>
162
168
<tr>
163
169
<td><strong>Key name</strong>
@@ -198,7 +204,7 @@ Each Activity record is a JSON Object with the following fields:
198
204
<tr>
199
205
<td><code>Type</code>
200
206
</td>
201
-
<td>OPTIONAL. URI. A term from a controlled vocabulary that more specifically describes the activity.
207
+
<td>OPTIONAL. URI. A term from a controlled vocabulary that more specifically describes the Activity.
202
208
</td>
203
209
</tr>
204
210
<tr>
@@ -235,6 +241,10 @@ Here is an example of an Activity record:
235
241
### 2.2 Entity
236
242
Each Entity record is a JSON Object with the following fields:
237
243
244
+
> [!CAUTION]
245
+
> TODO: GeneratedBy can also entirely describe the Activity
246
+
> TODO: GeneratedBy can be a list
247
+
238
248
<table>
239
249
<tr>
240
250
<td><strong>Key name</strong>
@@ -269,7 +279,7 @@ Each Entity record is a JSON Object with the following fields:
269
279
<tr>
270
280
<td><code>Type</code>
271
281
</td>
272
-
<td>OPTIONAL. URI. A term from a controlled vocabulary that more specifically describes the entity.
282
+
<td>OPTIONAL. URI. A term from a controlled vocabulary that more specifically describes the Entity.
273
283
</td>
274
284
</tr>
275
285
<tr>
@@ -297,6 +307,10 @@ Here is an example of an Entity record:
297
307
### 2.3 Agent (Optional)
298
308
Agent records are OPTIONAL. If included, each Agent record is a JSON Object with the following fields:
299
309
310
+
> [!CAUTION]
311
+
> TODO: do we need a Type field for Agent?
312
+
> TODO: shall we use `Software`, `Agent`, `SoftwareAgent` ?
313
+
300
314
<table>
301
315
<tr>
302
316
<td><strong>Key name</strong>
@@ -343,6 +357,10 @@ Here is an example of an Agent record:
343
357
### 2.4 Environment (Optional)
344
358
Environment records are OPTIONAL. If included, each Environment record is a JSON Object with the following fields:
345
359
360
+
> [!CAUTION]
361
+
> TODO: do we need a Type field for Environment?
362
+
> TODO: Environment not currently defined in the BIDS-Prov context
363
+
346
364
<table>
347
365
<tr>
348
366
<td><strong>Key name</strong>
@@ -545,7 +563,8 @@ If the `SidecarGenearatedBy` field is not defined, BIDS-Prov assumes that the si
545
563
546
564
No other field is allowed to describe provenance inside sidecar JSONs.
547
565
548
-
TODO: where are the @context and BIDSProvVersion ?
566
+
> [!CAUTION]
567
+
> TODO: where are the @context and BIDSProvVersion ?
549
568
550
569
#### 3.2.2 Subdirectories level provenance
551
570
@@ -581,7 +600,8 @@ Here is an example dataset tree:
581
600
└─ dataset_description.json
582
601
```
583
602
584
-
TODO: where are the @context and BIDSProvVersion ?
603
+
> [!CAUTION]
604
+
> TODO: where are the @context and BIDSProvVersion ?
Now if we want `Entity 2` defined in `preproc.json` to also have a "wasGeneratedBy" field referencing "Activity 1" from `init.json`, we can simply write the following
777
801
778
802
```JSON
779
-
"prov:Entity": [
803
+
"Entity": [
780
804
{
781
-
"@id": "niiri:bids_data1",
782
-
"label": "Bids dataset 1",
783
-
"wasGeneratedBy": "niiri:init"
805
+
"Id": "niiri:bids_data1",
806
+
"Label": "Bids dataset 1",
807
+
"GeneratedBy": "niiri:init"
784
808
}
785
809
]
786
810
```
787
811
788
-
Needless to say, both `init.json` and `preproc.json` must have the reference the same context file (in a "@context" field at the very top)
812
+
Needless to say, both `init.json` and `preproc.json` must have the reference the same context file (in a `"@context"` field at the very top)
789
813
790
814
#### I want to track provenance for subject-level analysis, should I declare a prov file per subject ?
791
815
@@ -794,16 +818,16 @@ You can create a single prov file for every subject. Yet another option is to us
794
818
Files for different subjects usually share common prefixes and extensions.
@@ -812,41 +836,41 @@ Files for different subjects usually share common prefixes and extensions.
812
836
813
837
An example of this can be [fMRIPrep](https://fmriprep.org/en/stable/index.html), which can be launched as a docker container.
814
838
815
-
The most simplistic way you can think of is to have this container "black-boxed" in your workflow. You basically record the calling of this container (`command` section) and the output (see the outputs section from fMRIPrep)
839
+
The most simplistic way you can think of is to have this container "black-boxed" in your workflow. You basically record the calling of this container (`Command` section) and the output (see the outputs section from fMRIPrep)
0 commit comments