Skip to content

Commit

Permalink
Merge pull request #1187 from celprov/fix/derivative_name_json
Browse files Browse the repository at this point in the history
FIX: copy name attribute of dataset_description.json from input dataset
  • Loading branch information
oesteban committed Mar 18, 2024
2 parents 9fcebc5 + 1fddcfc commit 2a6793e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mriqc/utils/bids.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ def write_derivative_description(bids_dir, deriv_dir):
bids_dir = Path(bids_dir)
deriv_dir = Path(deriv_dir)
desc = {
"Name": "MRIQC - MRI Quality Control",
"BIDSVersion": "1.4.0",
"DatasetType": "derivative",
"GeneratedBy": [
Expand Down Expand Up @@ -81,6 +80,11 @@ def write_derivative_description(bids_dir, deriv_dir):
if fname.exists():
orig_desc = json.loads(fname.read_text())

if "Name" in orig_desc:
desc["Name"] = f"MRIQC - {orig_desc['Name']}"
else:
desc["Name"] = "MRIQC - MRI Quality Control"

if "DatasetDOI" in orig_desc:
desc["SourceDatasets"] = [
{
Expand Down

0 comments on commit 2a6793e

Please sign in to comment.