niworkflows icon indicating copy to clipboard operation
niworkflows copied to clipboard

Error on compressed+uncompressed images in collect_data

Open effigies opened this issue 3 years ago • 0 comments

If a dataset contains a compressed and uncompressed version of a file that will be operated on, the behavior or downstream tools may change. sMRIPrep will align and average a compressed and uncompressed T1w image, wasting time and possibly producing slightly confusing reports. In fMRIPrep, each BOLD series will get a workflow, and Nipype will crash due to duplication, as extension does not enter into the node name.

The best place to resolve this is in collect_data:

https://github.com/nipreps/niworkflows/blob/616d2bca69c023a4144afe3d1117b9c3ef5ebbcd/niworkflows/utils/bids.py#L126-L209

When the same file is present in compressed and uncompressed form, we should raise an error rather than return both, so that each downstream tool does not have to decide how best to deal with these.

Issue discovered in nipreps/fmriprep#2396.

effigies avatar Apr 12 '21 15:04 effigies