Dcm2bids rerunning and showing multiple runs in docker container

Hi,

This is probably obvious, but I am running dcm2bids inside of a docker container with the following code on windows. It appears to be rerun the processing so that I end up with 7 copies of the bold run and T1 sequence. What do I need to get it to only run once per fMRI and T1?

in ubuntu for windows…
docker run -it -v /mnt/c/analysis/:/mnt/anal unfmontreal/dcm2bids

Then inside the container…
dcm2bids -d path_to_data -p 08 -c location of bids folder

Did you run the dcm2bids test run function to see what the outputs look like? Sometimes scanners will spit out various versions of an acquisition (e.g. one raw and one MoCo/scanner motion corrected). You have to be specific in your dcm2bids filter file to make sure you’re only getting the files you want.

Thanks Steven for the suggestion. I should say, that has happened in the past to me, but I don’t think it’s the problem this time. I didn’t mention that I’ve specifically pulled out 1 fMRI and 1 T1 folder to test dcm2bids from the full scanner sequence and am running dcm2bids on that output (rather than the full sequence). So it’s def only not funning on a random scanner processing output like motion corrected or a fieldmap scan or anything.

Got it, can you look the JSONS for the final BIDS-ified file and see if anything differentiates them? And also make sure that before rerunning that you clear the BIDS directory (because it will not overwrite files, but store them as new runs instead).

Oh, I bet that’s what I need to do. I wasn’t clearing the BIDs directory. You mean the tmpdcm2bids folder that gets created?

Oh, I bet that’s what I am missing. You mean the I need to clear/remove the temp_dcm2bids folder that gets created?

Wherever the BIDS output is going. If dcm2bids sees a file with the same specification it is trying to write, it will add it as a new run and not overwrite, I believe. It is also worth looking for clues in the JSON files of the duplicate runs.

Thanks so much! I see this note in First steps - Dcm2Bids

Sidecars with one matching description will be convert to BIDS. If a file already exists, dcm2bids won’t overwrite it. You should use the --clobber option to overwrite files.