Skip to content

Commit c9eda27

Browse files
committed
prov BIDS entity description
1 parent df3c74f commit c9eda27

File tree

2 files changed

+74
-6
lines changed

2 files changed

+74
-6
lines changed

src/modality-agnostic-files/provenance.md

Lines changed: 73 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ context of the academic literature.
2222

2323
## Overview
2424

25-
### Goals
26-
2725
This part of the BIDS specification is aimed at describing the provenance of a BIDS dataset.
2826

2927
This description is retrospective, it describes a set of steps that were executed in order to obtain the dataset (this is different from prospective descriptions of workflows that could for instance list all sets of steps that can be run on this dataset).
@@ -36,7 +34,7 @@ Provenance information SHOULD be included in a BIDS dataset when possible.
3634

3735
If provenance information is included, it MUST be described using the conventions detailed by this specification.
3836

39-
Provenance information reflect the provenance of a full dataset and/or of specific files at any level of the BIDS hierarchy.
37+
Provenance information reflects the provenance of a full dataset and/or of specific files at any level of the BIDS hierarchy.
4038

4139
Provenance information SHOULD not include human subject identifying data.
4240

@@ -90,7 +88,7 @@ prov/
9088
```
9189

9290
!!! note
93-
The `prov` BIDS entity allow to group related provenance files, using an arbitrary value for `<label>`. A subdirectory MAY be used to organise provenance files, using an arbitrary value for `<subdir>`.
91+
The `prov` BIDS entity allows to group related provenance files, using an arbitrary value for `<label>`. A subdirectory MAY be used to organise provenance files, using an arbitrary value for `<subdir>`.
9492

9593
The following suffixes specify the contents of provenance files.
9694

@@ -545,6 +543,77 @@ Here are the contents of the `sub-001/anat/sub-001_T1w.json` file:
545543

546544
The metadata field `GeneratedBy` indicates that the `sub-001/anat/sub-001_T1w.nii.gz` file was generated by the previously described activity.
547545

546+
### Provenance of a BIDS derivative dataset
547+
548+
Consider the following BIDS derivative dataset:
549+
550+
<!-- This block generates a file tree.
551+
A guide for using macros can be found at
552+
https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md
553+
-->
554+
{{ MACROS___make_filetree_example(
555+
{
556+
"sourcedata": {
557+
"dicoms": {
558+
"...": "",
559+
},
560+
},
561+
"sub-001": {
562+
"anat": {
563+
"sub-001_T1w.nii.gz": "",
564+
"sub-001_T1w.json": ""
565+
},
566+
},
567+
"prov": {
568+
"prov-dcm2niix_act.json": "",
569+
"prov-dcm2niix_soft.json": ""
570+
}
571+
}
572+
) }}
573+
574+
Here are the contents of the `prov/prov-dcm2niix_soft.json` file:
575+
576+
```JSON
577+
{
578+
"Software": [
579+
{
580+
"Id": "bids::prov#dcm2niix-70ug8pl5",
581+
"Label": "dcm2niix",
582+
"Version": "v1.1.3"
583+
}
584+
]
585+
}
586+
```
587+
588+
A software package is described using a provenance record inside the `Software` array. As mentioned in the [Consistency and uniqueness of identifiers](#consistency-and-uniqueness-of-identifiers) section, its identifier SHOULD start with `bids:<dataset>:prov#` (here, `bids::` refers to the current dataset).
589+
590+
Here are the contents of the `prov/prov-dcm2niix_act.json` file:
591+
592+
```JSON
593+
{
594+
"Activities": [
595+
{
596+
"Id": "bids::prov#conversion-00f3a18f",
597+
"Label": "Conversion",
598+
"Command": "dcm2niix -o . -f sub-%i/anat/sub-%i_T1w sourcedata/dicoms",
599+
"AssociatedWith": "bids::prov#dcm2niix-70ug8pl5"
600+
}
601+
]
602+
}
603+
```
604+
605+
An activity is described using a provenance record inside the `Activities` array. Note that the identifier of the previously described software package is used here to describe that the software package was associated with this activity.
606+
607+
Here are the contents of the `sub-001/anat/sub-001_T1w.json` file:
608+
609+
```JSON
610+
{
611+
"GeneratedBy": "bids::prov#conversion-00f3a18f"
612+
}
613+
```
614+
615+
The metadata field `GeneratedBy` indicates that the `sub-001/anat/sub-001_T1w.nii.gz` file was generated by the previously described activity.
616+
548617
### Provenance of a BIDS study dataset
549618

550619
Consider the following BIDS study dataset:

src/schema/objects/entities.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,7 @@ prov:
249249
name: prov
250250
display_name: Provenance group
251251
description: |
252-
A grouping of provenance records.
253-
Defining multiple provenance records groups is appropriate when several processings have been performed on data.
252+
The `prov-<label>` entity allows to group related provenance files, using an arbitrary value for `<label>`.
254253
type: string
255254
format: label
256255
reconstruction:

0 commit comments

Comments
 (0)