diff --git a/README.md b/README.md index 1f25af9ba..b1c6c373f 100644 --- a/README.md +++ b/README.md @@ -362,3 +362,14 @@ DO NOT EDIT DIRECTLY. | name | description | datatypes | suffixes | link to full data | maintained by | |:--------------------------------------------------------------------------------|:-----------------------------------------------------------------|:----------------|:-----------|:--------------------|:-----------------------------------------| | [pheno004](https://github.com/bids-standard/bids-examples/tree/master/pheno004) | Minimal dataset with subjects with imaging and/or phenotype data | phenotype, anat | T1w | n/a | [@ericearl](https://github.com/ericearl) | + +### Provenance + + + +| name | description | datatypes | suffixes | link to full data | maintained by | +|:------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------|:------------|:-------------------------|:------------------------------------------------------------------------------------------------|:---------------------------------------| +| [provenance_dcm2niix](https://github.com/bids-standard/bids-examples/tree/master/provenance_dcm2niix) | Shows minimal example of provenance records for a DICOM to Nifti conversion, performed by [`dcm2niix`](https://github.com/rordenlab/dcm2niix) | anat | T1w, act, ent, env, soft | This example is buid upon [hirni-demo](https://github.com/psychoinformatics-de/hirni-demo) data | [@bclenet](https://github.com/bclenet) | diff --git a/dataset_listing.tsv b/dataset_listing.tsv index 52cf73cb2..5702248cb 100644 --- a/dataset_listing.tsv +++ b/dataset_listing.tsv @@ -83,3 +83,4 @@ mrs_fmrs Functional MRS data involving a pain stimulus task from 15 subjects [li xeeg_hed_score EEG and iEEG data with annotations of artifacts, seizures and modulators using HED-SCORE [@dorahermes](https://github.com/dorahermes) anat, eeg, ieeg T1w, channels, coordsystem, eeg, electrodes, events, ieeg dwi_deriv exemplifies the storage of diffusion MRI derivates that may be generated on the Siemens XA platform. dwi dwi pheno004 Minimal dataset with subjects with imaging and/or phenotype data [@ericearl](https://github.com/ericearl) phenotype, anat T1w +provenance_dcm2niix Shows minimal example of provenance records for a DICOM to Nifti conversion, performed by [`dcm2niix`](https://github.com/rordenlab/dcm2niix) This example is buid upon [hirni-demo](https://github.com/psychoinformatics-de/hirni-demo) data [@bclenet](https://github.com/bclenet) anat T1w, act, ent, env, soft diff --git a/provenance_dcm2niix/README.md b/provenance_dcm2niix/README.md new file mode 100644 index 000000000..e9f48d4f8 --- /dev/null +++ b/provenance_dcm2niix/README.md @@ -0,0 +1,21 @@ +# BEP028 example dataset - Provenance records for `dcm2niix` + +This example aims at showing provenance records for a DICOM to Nifti conversion, performed by [`dcm2niix`](https://github.com/rordenlab/dcm2niix +). Provenance records were created manually ; they act as a guideline for further machine-generated records by `dcm2niix`. + +After conversion, and adding provenance traces, the directory tree is as follows: + +``` +prov/ +├── prov-dcm2niix_act.json +├── prov-dcm2niix_ent.json +├── prov-dcm2niix_env.json +└── prov-dcm2niix_soft.json +sourcedata/ +sub-02/ +└── anat + ├── sub-02_T1w.json + └── sub-02_T1w.nii +``` + +Note that the `sourcedata/` directory contains the source dataset (DICOM files) known as [hirni-demo](https://github.com/psychoinformatics-de/hirni-demo). diff --git a/provenance_dcm2niix/dataset_description.json b/provenance_dcm2niix/dataset_description.json new file mode 100644 index 000000000..f87e66509 --- /dev/null +++ b/provenance_dcm2niix/dataset_description.json @@ -0,0 +1,14 @@ +{ + "Name": "Provenance records for dcm2niix", + "BIDSVersion": "1.10.0", + "DatasetType": "raw", + "License": "CC0", + "Authors": [ + "Boris Clénet" + ], + "SourceDatasets": [ + { + "URL": "https://github.com/psychoinformatics-de/hirni-demo" + } + ] +} diff --git a/provenance_dcm2niix/prov/prov-dcm2niix_act.json b/provenance_dcm2niix/prov/prov-dcm2niix_act.json new file mode 100644 index 000000000..39ee6ce78 --- /dev/null +++ b/provenance_dcm2niix/prov/prov-dcm2niix_act.json @@ -0,0 +1,14 @@ +{ + "Activities": [ + { + "Id": "bids::prov/#conversion-00f3a18f", + "Label": "Conversion", + "Command": "dcm2niix -o . -f sub-%i/anat/sub-%i_T1w sourcedata/hirni-demo/acq1/dicoms/example-dicom-structural-master/dicoms", + "AssociatedWith": "bids::prov/#dcm2niix-khhkm7u1", + "Used": [ + "bids::prov/#fedora-uldfv058", + "bids::sourcedata/hirni-demo/acq1/dicoms/example-dicom-structural-master/dicoms" + ] + } + ] +} \ No newline at end of file diff --git a/provenance_dcm2niix/prov/prov-dcm2niix_ent.json b/provenance_dcm2niix/prov/prov-dcm2niix_ent.json new file mode 100644 index 000000000..f984e2aa3 --- /dev/null +++ b/provenance_dcm2niix/prov/prov-dcm2niix_ent.json @@ -0,0 +1,9 @@ +{ + "Entities": [ + { + "Id": "bids::sourcedata/hirni-demo/acq1/dicoms/example-dicom-structural-master/dicoms", + "Type": "Entity", + "Label": "dicoms" + } + ] +} diff --git a/provenance_dcm2niix/prov/prov-dcm2niix_env.json b/provenance_dcm2niix/prov/prov-dcm2niix_env.json new file mode 100644 index 000000000..ada5e3b5b --- /dev/null +++ b/provenance_dcm2niix/prov/prov-dcm2niix_env.json @@ -0,0 +1,9 @@ +{ + "Environments": [ + { + "Id": "bids::prov/#fedora-uldfv058", + "Label": "Fedora release 36 (Thirty Six)", + "OperatingSystem": "GNU/Linux 6.2.15-100.fc36.x86_64" + } + ] +} \ No newline at end of file diff --git a/provenance_dcm2niix/prov/prov-dcm2niix_soft.json b/provenance_dcm2niix/prov/prov-dcm2niix_soft.json new file mode 100644 index 000000000..ad80dbdc6 --- /dev/null +++ b/provenance_dcm2niix/prov/prov-dcm2niix_soft.json @@ -0,0 +1,9 @@ +{ + "Software": [ + { + "Id": "bids::prov/#dcm2niix-khhkm7u1", + "Label": "dcm2niix", + "Version": "v1.0.20220720" + } + ] +} \ No newline at end of file diff --git a/provenance_dcm2niix/sub-02/anat/sub-02_T1w.json b/provenance_dcm2niix/sub-02/anat/sub-02_T1w.json new file mode 100644 index 000000000..ad24ca1a6 --- /dev/null +++ b/provenance_dcm2niix/sub-02/anat/sub-02_T1w.json @@ -0,0 +1,25 @@ +{ + "Modality": "MR", + "ManufacturersModelName": "nifti2dicom", + "SoftwareVersions": "0.4.11", + "SeriesDescription": "anat-T1w", + "ProtocolName": "anat-T1w", + "ImageType": ["DERIVED", "SECONDARY"], + "RawImage": false, + "SeriesNumber": 401, + "AcquisitionTime": "13:25:18.000000", + "AcquisitionNumber": 1, + "SliceThickness": 0.666667, + "SpacingBetweenSlices": 0.666667, + "ImageOrientationPatientDICOM": [ + 0.999032, + -0.0217884, + 0.0382096, + 0.0265195, + 0.991414, + -0.128044 ], + "ConversionSoftware": "dcm2niix", + "ConversionSoftwareVersion": "v1.0.20220720", + "GeneratedBy": "bids::prov/#conversion-00f3a18f", + "SidecarGeneratedBy": "bids::prov/#conversion-00f3a18f" +} \ No newline at end of file diff --git a/provenance_dcm2niix/sub-02/anat/sub-02_T1w.nii b/provenance_dcm2niix/sub-02/anat/sub-02_T1w.nii new file mode 100644 index 000000000..e69de29bb diff --git a/tools/print_dataset_listing.py b/tools/print_dataset_listing.py index c4d714037..0dc310594 100644 --- a/tools/print_dataset_listing.py +++ b/tools/print_dataset_listing.py @@ -57,6 +57,7 @@ "PET": "pet", "qMRI": "", "Phenotype": "phenotype", + "Provenance": "", } DELIMITER = "" @@ -176,6 +177,8 @@ def add_tables(df: pd.DataFrame, output_file: Path, names) -> None: mask = names.str.contains("qmri_") elif table_name == "HED": mask = names.str.contains("_hed_") + elif table_name == "Provenance": + mask = names.str.contains("provenance_") else: mask = df["datatypes"].str.contains(table_datatypes, regex=True)