NrgXnat / docker-images

Dockerfiles and metadata for XNAT's container service
18 stars 21 forks source link

Include the dataset_description.json as output #2

Open jhuguetn opened 4 years ago

jhuguetn commented 4 years ago

As per version 1.2.x BIDS specification states that a BIDS-compliant dataset MUST include the compulsory file dataset_description.json. See Section 03 (Modality agnostic files) of the BIDS specification.

This small PR ensures that the xnat2bids.py script copies the dataset_description.json JSON file stored in the BIDS resource into the output directory (if present).

The hereby proposed fix shall permit container-service using the xnat2bids setup-command to run up-to-date BIDS apps. Otherwise, BIDS apps might fail running due to invalid BIDS datasets, e.g. see error below running poldracklab/mriqc:0.15.1 container with current setting:

ValueError: 'dataset_description.json' is missing from project root. Every valid BIDS dataset must have this file.

For easy deployment, changes should be propagated in the creation of a new version of the xnat2bids-setup docker image at Docker Hub.