Hi all, I’ve been using dcm2bids to process some functional and structural MRI data, and I’ve been having trouble with duplicates. For some participants we have duplicate scans (e.g. if the scanner had to be stopped and restarted half way through an acquisition), so I’ve included the “dup_method” command in the config json file.
dcm2bids appends ‘run-X’ to the file if it finds duplicates. From the docs:
“dup_method”: “run”
run is the default behavior and will add ‘_run-’ to the customEntities of the acquisition if it finds duplicate destination roots.
The issue is that we’ve got two functional runs, which I’ve labelled as ‘run-01’ and ‘run-02’ in the “custom_entities” field in the config. In the example dataset I’m working on at the moment, the first run was restarted so there are two ‘run 1’ files.
So when I run dcm2bids, I end up with the two duplicate acquisitions for the first functional run (i.e. the false start and the real first run) getting labelled as ‘run-01’ and ‘run-02’, while my actual run 2 gets lost into the ether:
sub-01_task-facehouse_acq-LC_dir-PA_run-01_bold.nii.gz (false start)
sub-01_task-facehouse_acq-LC_dir-PA_run-01_bold.json (false start)
sub-01_task-facehouse_acq-LC_dir-PA_run-02_bold.nii.gz (actually run 1)
sub-01_task-facehouse_acq-LC_dir-PA_run-02_bold.json (actually run 1)
dcm2bids also displays a warning showing that it has renamed my files:
Filename was reordered according to BIDS entity table order:
from: sub-01_task-facehouse_acq-LC_dir-PA_run-01_run-02_bold
to: sub-01_task-facehouse_acq-LC_dir-PA_run-02_bold
I’ve tried using “dup_method”: “dup” in the config file, but the exact same thing happens.
Is there any way I can suppress the renaming of files, or get it to add “duplicate” or something other than “run”?
Thanks!