Skip to content

Multi-echo fMRI not grouped into echo- (converted as runs instead) despite using latest dcm2niix #362

@shashank-519

Description

@shashank-519

Hi,
I am running into an issue with multi-echo fMRI data not being grouped correctly by dcm2bids.

Setup

  • dcm2bids version: 3.2.0
  • dcm2niix (HPC container): v1.0.20250506
  • dcm2niix (local): v1.0.20250505
  • Environment: HPC (SLURM) vs local

Problem

When running locally(just by doing pip install dcm2bids), the outputs are correctly grouped by echo:
sub-XXX_task-rest_echo-1_bold.nii.gz
sub-XXX_task-rest_echo-2_bold.nii.gz

However, on HPC (container), the same data produces:
sub-XXX_task-rest_run-01_bold.nii.gz
sub-XXX_task-rest_run-02_bold.nii.gz

So instead of grouping echoes, it treats them as separate runs.

What I tried

Here is the config I used:

config file - {
  "descriptions": [
    {
	  "datatype": "anat",
	  "suffix": "T1w",
      "criteria": {
        "SeriesDescription": "T1w_64_MPR_HCP_xa60a_ND",
        "EchoTime": 0.00222,
		"RepetitionTime": 2.5
      },
      "sidecar_changes": {
		"ProtocolName": "T1w_MPR_HCP"
      }
},
    {
	  "datatype": "anat",
	  "suffix": "T2w",
      "criteria": {
        "SeriesDescription": "T2w_SPC_10_2025_ND",
        "EchoTime": 0.564,
		"RepetitionTime": 3.2
      },
      "sidecar_changes": {
		"ProtocolName": "T2w_SPC_10_2025"
      }
},
{
	  "id": "task-rest",
	  "datatype": "func",
	  "suffix": "bold",
	  "custom_entities": [
	  "echo",
	  "task-rest"
	  ],
	  "criteria": {
         "SeriesDescription": "Resting state me cmrr_mbep2d_xa60a",
		 "EchoNumber": 1,
		 "EchoTime": 0.0122,
         "RepetitionTime": 1.32
		},
		"sidecar_changes": {
		"TaskName": "rest"
	}
},

{
	"id": "task-rest",
	"datatype": "func",
	"suffix": "bold",
	"custom_entities": [
	"echo",
	"task-rest"
	],
	"criteria": {
	   "SeriesDescription": "Resting state me cmrr_mbep2d_xa60a",
		 "EchoNumber": 2,
		 "EchoTime": 0.0292,
		 "RepetitionTime": 1.32
		},
		"sidecar_changes": {
		"TaskName": "rest"
	}
},
	
{
	"id": "task-rest",
	"datatype": "func",
	"suffix": "bold",
	"custom_entities": [
	"echo",
	"task-rest"
	],
	"criteria": {
	   "SeriesDescription": "Resting state me cmrr_mbep2d_xa60a",
		 "EchoNumber": 3,
		 "EchoTime": 0.0462,
		 "RepetitionTime": 1.32
		},
		"sidecar_changes": {
		"TaskName": "rest"
	}
},
{
	"id": "task-rest",
	"datatype": "func",
	"suffix": "bold",
	"custom_entities": [
	"echo",
	"task-rest"
	],
	"criteria": {
	   "SeriesDescription": "Resting state me cmrr_mbep2d_xa60a",
		 "EchoNumber": 4,
		 "EchoTime": 0.0632,
		 "RepetitionTime": 1.32
		},
		"sidecar_changes": {
		"TaskName": "rest"
	}
},
{
	  "id": "task-WM",
	  "datatype": "func",
	  "suffix": "bold",
	  "custom_entities": [
	  "echo",
	  "task-WM"
	  ],
	  "criteria": {
         "SeriesDescription": "Working Memory Verbal Run 1 me cmrr_mbep2d_xa60a",
		 "EchoNumber": 1,
		 "EchoTime": 0.0122,
         "RepetitionTime": 1.32
		},
		"sidecar_changes": {
		"TaskName": "WM"
	}
},

{
	"id": "task-WM",
	"datatype": "func",
	"suffix": "bold",
	"custom_entities": [
	"echo",
	"task-WM"
	],
	"criteria": {
	   "SeriesDescription": "Working Memory Verbal Run 1 me cmrr_mbep2d_xa60a",
		 "EchoNumber": 2,
		 "EchoTime": 0.0292,
		 "RepetitionTime": 1.32
		},
		"sidecar_changes": {
		"TaskName": "WM"
	}
},
	
{
	"id": "task-WM",
	"datatype": "func",
	"suffix": "bold",
	"custom_entities": [
	"echo",
	"task-WM"
	],
	"criteria": {
	   "SeriesDescription": "Working Memory Verbal Run 1 me cmrr_mbep2d_xa60a",
		 "EchoNumber": 3,
		 "EchoTime": 0.0462,
		 "RepetitionTime": 1.32
		},
		"sidecar_changes": {
		"TaskName": "WM"
	}
},
{
	"id": "task-WM",
	"datatype": "func",
	"suffix": "bold",
	"custom_entities": [
	"echo",
	"task-WM"
	],
	"criteria": {
	   "SeriesDescription": "Working Memory Verbal Run 1 me cmrr_mbep2d_xa60a",
		 "EchoNumber": 4,
		 "EchoTime": 0.0632,
		 "RepetitionTime": 1.32
		},
		"sidecar_changes": {
		"TaskName": "WM"
	}
},

{
	"id": "task-WM",
	"datatype": "func",
	"suffix": "bold",
	"custom_entities": [
	"echo",
	"task-WM"
	],
	"criteria": {
	   "SeriesDescription": "Working Memory Verbal Run 2 me cmrr_mbep2d_xa60a",
		 "EchoNumber": 1,
		 "EchoTime": 0.0122,
         "RepetitionTime": 1.32
		},
		"sidecar_changes": {
		"TaskName": "WM"
	}
},

{
	"id": "task-WM",
	"datatype": "func",
	"suffix": "bold",
	"custom_entities": [
	"echo",
	"task-WM"
	],
	"criteria": {
	   "SeriesDescription": "Working Memory Verbal Run 2 me cmrr_mbep2d_xa60a",
		 "EchoNumber": 2,
		 "EchoTime": 0.0292,
		 "RepetitionTime": 1.32
		},
		"sidecar_changes": {
		"TaskName": "WM"
	}
},
	
{
	"id": "task-WM",
	"datatype": "func",
	"suffix": "bold",
	"custom_entities": [
	"echo",
	"task-WM"
	],
	"criteria": {
	   "SeriesDescription": "Working Memory Verbal Run 2 me cmrr_mbep2d_xa60a",
		 "EchoNumber": 3,
		 "EchoTime": 0.0462,
		 "RepetitionTime": 1.32
		},
		"sidecar_changes": {
		"TaskName": "WM"
	}
},
{
	"id": "task-WM",
	"datatype": "func",
	"suffix": "bold",
	"custom_entities": [
	"echo",
	"task-WM"
	],
	"criteria": {
	   "SeriesDescription": "Working Memory Verbal Run 2 me cmrr_mbep2d_xa60a",
		 "EchoNumber": 4,
		 "EchoTime": 0.0632,
		 "RepetitionTime": 1.32
		},
		"sidecar_changes": {
		"TaskName": "WM"
	}
}
]
}

Please let me know the reason for the discrepancies and how can I best avoid them
Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions