|
4 | 4 |
|
5 | 5 | **Extension moderators/leads: ** Satra Ghosh <[[email protected]](mailto:[email protected])> and Camille Maumet <[[email protected]](mailto:[email protected])> |
6 | 6 |
|
7 | | -**Contributors:** Stefan Appelhoff, Chris Markiewicz, Yaroslav O. Halchenko, Cyril R. Pernet, Jean-Baptiste Poline, Rémi Adon, Michael Dayan, Sarah Saneei, Eric Earl, Tibor Auer, Ghislain Vaillant, Matthieu Joulot, Omar El Rifai, Ryan J. Cali, Thomas Betton, Cyril Regan, Hermann Courteille, Arnaud Delorme, Boris Clénet.* |
| 7 | +**Contributors:** Stefan Appelhoff, Chris Markiewicz, Yaroslav O. Halchenko, Cyril R. Pernet, Jean-Baptiste Poline, Rémi Adon, Michael Dayan, Sarah Saneei, Eric Earl, Tibor Auer, Ghislain Vaillant, Matthieu Joulot, Omar El Rifai, Ryan J. Cali, Thomas Betton, Cyril Regan, Hermann Courteille, Arnaud Delorme, Boris Clénet. |
8 | 8 |
|
9 | 9 | We meet every two weeks by videoconference on Mondays at 7-8am PDT / 10am-11am EDT / 3-4pm BST. The group is always open to new contributors interested in neuroimaging data sharing. To join the call or to ask any question, please email us at [[email protected]](mailto:[email protected]). |
10 | 10 |
|
@@ -55,9 +55,82 @@ BIDS-Prov metadata is written in JSON or JSON-LD. |
55 | 55 |
|
56 | 56 | [JSON-LD](https://www.w3.org/TR/json-ld11/) is a specific type of JSON that allows encoding graph-like structures with the Resource Description Framework[^1]. |
57 | 57 |
|
58 | | -TODO: written in a single file (JSON-LD) or several JSON files that can be aggregated into one JSON-LD |
| 58 | +A skeleton for a BIDS-Prov JSON-LD file looks like this: |
| 59 | +``` |
| 60 | +{ |
| 61 | + "@context": "https://purl.org/nidash/bidsprov/context.json", |
| 62 | + "BIDSProvVersion": "0.0.1", |
| 63 | + "records": { |
| 64 | + "Agent": [ |
| 65 | + { |
| 66 | + <...Agent 1...> |
| 67 | + }, |
| 68 | + { |
| 69 | + <...Agent 2...> |
| 70 | + } |
| 71 | + ], |
| 72 | + "Activity": [ |
| 73 | + { |
| 74 | + <...Activity 1...> |
| 75 | + }, |
| 76 | + { |
| 77 | + <...Activity 2...> |
| 78 | + } |
| 79 | + ], |
| 80 | + "Entity": [ |
| 81 | + { |
| 82 | + <...Entity 1...> |
| 83 | + }, |
| 84 | + { |
| 85 | + <...Entity 2...> |
| 86 | + } |
| 87 | + ], |
| 88 | + "Environment": [ |
| 89 | + { |
| 90 | + <...Environment 1...> |
| 91 | + }, |
| 92 | + { |
| 93 | + <...Environment 2...> |
| 94 | + } |
| 95 | + ] |
| 96 | + } |
| 97 | +} |
| 98 | +``` |
| 99 | + |
| 100 | +<table> |
| 101 | + <tr> |
| 102 | + <td><strong>Key name</strong> |
| 103 | + </td> |
| 104 | + <td><strong>Description</strong> |
| 105 | + </td> |
| 106 | + </tr> |
| 107 | + <tr> |
| 108 | + <td><code>@context</code> |
| 109 | + </td> |
| 110 | + <td>REQUIRED. A URL to the BIDS-Prov json context. Value must be <code>"https://purl.org/nidash/bidsprov/context.json"</code> |
| 111 | + </td> |
| 112 | + </tr> |
| 113 | + <tr> |
| 114 | + <td><code>BIDSProvVersion</code> |
| 115 | + </td> |
| 116 | + <td>REQUIRED. A string identifying the version of the specification adhered to. |
| 117 | + </td> |
| 118 | + </tr> |
| 119 | + <tr> |
| 120 | + <td><code>records</code> |
| 121 | + </td> |
| 122 | + <td>REQUIRED. A list of provenance records (Activity, Entity, Agent, Environement), describing the provenance (see "Provenance records" sections below). |
| 123 | + </td> |
| 124 | + </tr> |
| 125 | +</table> |
| 126 | + |
| 127 | +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) |
| 128 | +and [3.2 Provenance description levels](#3-2-provenance-description-levels). |
| 129 | +Using tools provided by BIDS-Prov ([5 Tools](#5-tools)), these JSON contents can be merged back to a JSON-LD graph as described above. |
59 | 130 |
|
60 | | -TODO: BIDS-Prov tools |
| 131 | +Note: since the JSON-LD documents are graph objects, they can be aggregated using RDF tools without the need to apply the inheritance principle. |
| 132 | + |
| 133 | +A complete schema for the model file to facilitate specification and validation is available from [https://github.com/bids-standard/BEP028_BIDSprov](https://github.com/bids-standard/BEP028_BIDSprov). In the event of disagreements between the schema and the specification, the specification is authoritative. |
61 | 134 |
|
62 | 135 | ## 2. Provenance records {#2-provenance-records} |
63 | 136 |
|
@@ -342,47 +415,47 @@ In the following example, two separated processings (`conversion` and `smoothing |
342 | 415 | └─ ... |
343 | 416 | ``` |
344 | 417 |
|
345 | | -#### 3.1.3 Suffixes {#3-1-3-Suffixes} |
| 418 | +#### 3.1.3 Suffixes {#3-1-3-suffixes} |
346 | 419 |
|
347 | 420 | The following BIDS suffixes (cf. [Definitions](https://bids-specification.readthedocs.io/en/stable/common-principles.html#definitions)) specify the contents of a provenance file. |
348 | 421 |
|
349 | 422 | <table> |
350 | 423 | <tr> |
351 | 424 | <td><strong>Suffix</strong> |
352 | 425 | </td> |
353 | | - <td><strong>Description</strong> |
| 426 | + <td><strong>File contents</strong> |
354 | 427 | </td> |
355 | 428 | <td><strong>File extension</strong> |
356 | 429 | </td> |
357 | 430 | </tr> |
358 | 431 | <tr> |
359 | 432 | <td><code>act</code> |
360 | 433 | </td> |
361 | | - <td>Activities for the group of provenance records. |
| 434 | + <td>Activity records for the group of provenance |
362 | 435 | </td> |
363 | 436 | <td><code>.json</code> |
364 | 437 | </td> |
365 | 438 | </tr> |
366 | 439 | <tr> |
367 | 440 | <td><code>ent</code> |
368 | 441 | </td> |
369 | | - <td>Agents for the group of provenance records. |
| 442 | + <td>Agent records for the group of provenance |
370 | 443 | </td> |
371 | 444 | <td><code>.json</code> |
372 | 445 | </td> |
373 | 446 | </tr> |
374 | 447 | <tr> |
375 | 448 | <td><code>env</code> |
376 | 449 | </td> |
377 | | - <td>Entities for the group of provenance records. |
| 450 | + <td>Entity records for the group of provenance |
378 | 451 | </td> |
379 | 452 | <td><code>.json</code> |
380 | 453 | </td> |
381 | 454 | </tr> |
382 | 455 | <tr> |
383 | 456 | <td><code>base</code> |
384 | 457 | </td> |
385 | | - <td>Common parameters for the group of provenance records (version and context for BIDS-Prov). |
| 458 | + <td>Common parameters for the group of provenance (<code>BIDSProvVersion</code> and <code>@context</code>). |
386 | 459 | <td><code>.json</code> |
387 | 460 | </td> |
388 | 461 | </td> |
@@ -461,6 +534,8 @@ If the `SidecarGenearatedBy` field is not defined, BIDS-Prov assumes that the si |
461 | 534 |
|
462 | 535 | No other field is allowed to describe provenance inside sidecar JSONs. |
463 | 536 |
|
| 537 | +TODO: where are the @context and BIDSProvVersion ? |
| 538 | + |
464 | 539 | #### 3.2.2 Subdirectories level provenance {#3-2-2-subdirectories-level-provenance} |
465 | 540 |
|
466 | 541 | BIDS-Prov files can be stored in a `prov/` directory in any subdirectory of the dataset (or BIDS-Derivatives directories). |
@@ -495,6 +570,8 @@ Here is an example dataset tree: |
495 | 570 | └─ dataset_description.json |
496 | 571 | ``` |
497 | 572 |
|
| 573 | +TODO: where are the @context and BIDSProvVersion ? |
| 574 | + |
498 | 575 | #### 3.2.3 Dataset level provenance - `prov/` directory {#3-2-3-dataset-level-provenance-prov-directory} |
499 | 576 |
|
500 | 577 | BIDS-Prov files can be stored in a `prov/` directory immediately below the BIDS dataset (or BIDS-Derivatives dataset) root. At the dataset level, provenance can be about any BIDS file in the dataset. |
@@ -561,75 +638,9 @@ Here is an example of a `GeneratedByProv` field containing the IRI of an `Entity |
561 | 638 | } |
562 | 639 | ``` |
563 | 640 |
|
564 | | -### 3.3 Top-level structure {#3-3-top-level-structure} |
565 | | - |
566 | | -#### File-level provenance |
| 641 | +TODO: where are the @context and BIDSProvVersion ? |
567 | 642 |
|
568 | | -A skeleton for a file-level BIDS-Prov JSON-LD file looks like this: |
569 | | - |
570 | | -``` |
571 | | -{ |
572 | | -"@context": "https://purl.org/nidash/bidsprov/context.json", |
573 | | -"BIDSProvVersion": "1.0.0", |
574 | | -<...Entity 1...> |
575 | | -"wasGeneratedBy": { |
576 | | -<...Activity...> |
577 | | - "wasAssociatedWith": { |
578 | | - <...Agent...> |
579 | | - }, |
580 | | - "used": { |
581 | | - <...Entity 2…> |
582 | | - } |
583 | | - } |
584 | | -} |
585 | | -``` |
586 | | - |
587 | | -<table> |
588 | | - <tr> |
589 | | - <td> |
590 | | - |
591 | | -<strong>Key name</strong> |
592 | | - </td> |
593 | | - <td><strong>Description</strong> |
594 | | - </td> |
595 | | - </tr> |
596 | | - <tr> |
597 | | - <td><code>@context</code> |
598 | | - </td> |
599 | | - <td>REQUIRED. A URL to the BIDS-Prov json context. Value must be “<code>https://purl.org/nidash/bidsprov/context.json"</code> |
600 | | - </td> |
601 | | - </tr> |
602 | | - <tr> |
603 | | - <td><code>BIDSProvVersion</code> |
604 | | - </td> |
605 | | - <td>REQUIRED. A string identifying the version of the specification adhered to. |
606 | | - </td> |
607 | | - </tr> |
608 | | - <tr> |
609 | | - <td><code>[no-key : root-level attributes]</code> |
610 | | - </td> |
611 | | - <td>REQUIRED. An Entity record describing the provenance (see “Entity” section below). |
612 | | - </td> |
613 | | - </tr> |
614 | | - <tr> |
615 | | - <td><code>wasGeneratedBy</code> |
616 | | - </td> |
617 | | - <td>REQUIRED. An Activity describing the provenance (see “Activity”, section below). |
618 | | - </td> |
619 | | - </tr> |
620 | | - <tr> |
621 | | - <td><code>wasAssociatedWith</code> |
622 | | - </td> |
623 | | - <td>OPTIONAL. An Agent describing the provenance (see “Activity”, section below). |
624 | | - </td> |
625 | | - </tr> |
626 | | - <tr> |
627 | | - <td><code>used</code> |
628 | | - </td> |
629 | | - <td>OPTIONAL. An Entity describing the provenance (see “Entity”, section below). |
630 | | - </td> |
631 | | - </tr> |
632 | | -</table> |
| 643 | +### 3.3 Contents of a BIDS-Prov file {#3-3-contents-of-a-bids-prov-file} |
633 | 644 |
|
634 | 645 | #### Dataset-level provenance |
635 | 646 |
|
@@ -674,45 +685,73 @@ A skeleton for a dataset level BIDS-Prov JSON-LD file looks like this: |
674 | 685 | } |
675 | 686 | ``` |
676 | 687 |
|
| 688 | +## 4 Examples |
| 689 | + |
| 690 | +A list of examples for BIDS-Prov are available in https://github.com/bids-standard/BEP028_BIDSprov/tree/master/examples |
| 691 | + |
| 692 | +TODO: some examples are not merged yet. |
| 693 | + |
677 | 694 | <table> |
678 | 695 | <tr> |
679 | | - <td> |
680 | | - |
681 | | -<strong>Key name</strong> |
| 696 | + <td><strong>Location</strong> |
682 | 697 | </td> |
683 | 698 | <td><strong>Description</strong> |
684 | 699 | </td> |
685 | 700 | </tr> |
| 701 | + |
686 | 702 | <tr> |
687 | | - <td><code>@context</code> |
| 703 | + <td><a href="https://github.com/bids-standard/BEP028_BIDSprov/tree/master/examples/simple_example/">examples/simple_example/</a> |
688 | 704 | </td> |
689 | | - <td>REQUIRED. A URL to the BIDS-Prov json context. Value must be “<code>https://purl.org/nidash/bidsprov/context.json"</code> |
| 705 | + <td>A simple example describing the downsampling of EEG data using EEGLAB. |
690 | 706 | </td> |
691 | 707 | </tr> |
| 708 | + |
692 | 709 | <tr> |
693 | | - <td><code>BIDSProvVersion</code> |
| 710 | + <td><a href="https://github.com/bids-standard/BEP028_BIDSprov/tree/master/examples/from_parsers/afni/">examples/from_parsers/afni/</a> |
694 | 711 | </td> |
695 | | - <td>REQUIRED. A string identifying the version of the specification adhered to. |
| 712 | + <td>A set of examples for fMRI processing using AFNI. These where generated generated from ... |
696 | 713 | </td> |
697 | 714 | </tr> |
| 715 | + |
698 | 716 | <tr> |
699 | | - <td><code>records</code> |
| 717 | + <td><a href="https://github.com/bids-standard/BEP028_BIDSprov/tree/master/examples/from_parsers/fsl/">examples/from_parsers/fsl/</a> |
700 | 718 | </td> |
701 | | - <td>REQUIRED. A list of Activity, Entity and Agent records describing the provenance (see “Activity”, “Entity” and “Agent” sections below). |
| 719 | + <td>A set of examples for fMRI processing using FSL. These where generated generated from ... |
702 | 720 | </td> |
703 | 721 | </tr> |
704 | | -</table> |
705 | 722 |
|
706 | | -A complete schema for the model file to facilitate specification and validation is available from [https://github.com/bids-standard/BEP028_BIDSprov](https://github.com/bids-standard/BEP028_BIDSprov). In the event of disagreements between the schema and the specification, the specification is authoritative. |
| 723 | + <tr> |
| 724 | + <td><a href="https://github.com/bids-standard/BEP028_BIDSprov/tree/master/examples/from_parsers/spm/">examples/from_parsers/spm/</a> |
| 725 | + </td> |
| 726 | + <td>A set of examples for fMRI processing using SPM. These where generated generated from ... |
| 727 | + </td> |
| 728 | + </tr> |
| 729 | + |
| 730 | + <tr> |
| 731 | + <td><a href="https://github.com/bids-standard/BEP028_BIDSprov/tree/master/examples/dcm2niix/">examples/dcm2niix/</a> |
| 732 | + </td> |
| 733 | + <td>A set of examples describing dicom to nifti conversion using dcm2niix. These aim at showing different ways to organise the exact same provenance records inside a dataset. |
| 734 | + </td> |
| 735 | + </tr> |
707 | 736 |
|
| 737 | + <tr> |
| 738 | + <td><a href="https://github.com/bids-standard/BEP028_BIDSprov/tree/master/examples/heudiconv/">examples/heudiconv/</a> |
| 739 | + </td> |
| 740 | + <td>An example describing dicom to nifti conversion using heudiconv. |
| 741 | + </td> |
| 742 | + </tr> |
708 | 743 |
|
| 744 | + <tr> |
| 745 | + <td><a href="https://github.com/bids-standard/BEP028_BIDSprov/tree/master/examples/nipype/">examples/nipype/</a> |
| 746 | + </td> |
| 747 | + <td>An example describing simple processings on anatomical MRI using FSL through Nipype. |
| 748 | + </td> |
| 749 | + </tr> |
709 | 750 |
|
710 | | -## 4 Graph model {#4-graph-model} |
| 751 | +</table> |
711 | 752 |
|
712 | | -Note: since these jsonld documents are graph objects, they can be aggregated using RDF tools without the need to apply the inheritance principle. |
713 | 753 |
|
714 | | -## 4 Examples |
715 | | -A list of fMRI examples for BIDS-Prov are available for SPM, FSL and AFNI in: https://github.com/bids-standard/BEP028_BIDSprov/tree/master/examples |
| 754 | +## 5 Tools |
716 | 755 |
|
717 | 756 | ## 5 Future perspectives |
718 | 757 |
|
|
0 commit comments