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
So instead of grouping echoes, it treats them as separate runs.
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!
Hi,
I am running into an issue with multi-echo fMRI data not being grouped correctly by dcm2bids.
Setup
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:
Please let me know the reason for the discrepancies and how can I best avoid them
Thanks!