Including QC-failed images

We are including QC-failed images in a BIDS dataset naming them as *_BADdwi.nii.gz etc. and putting these files under “ignoredFiles” in the validator config file. However, in case someone actually wants to process these, we are including the IntendedFor definitions for these files in the appropriate fieldmap files.

The problem is that validator ignores the BADdwi files but the Intent definition trips it up because it can’t find those (ignored) files.
[ERR] ‘IntendedFor’ field needs to point to an existing file. (code: 37 - INTENDED_FOR)

What is the best way to handle this situation ?

Are you already using acq-? You could try using acq-BAD instead, so the data is valid but clearly marked.

An alternative could be to duplicate your fieldmaps (e.g., copy *_epi.nii.gz to *_BADepi.nii.gz), point those at your BADdwi files with IntendedFor, and add them to your .bidsignore.

That’s the best I can think of at the moment. Others might have better ideas. QC is definitely something that could use better BIDS support.

@effigies , would fmriprep skip acq-BAD from processing? Currently we are keeping fully separate branches for good fmriprep-processable data.

@dorianps You might be able to do it with a --bids-filter-file. See FAQ, Tips, and Tricks — fmriprep version documentation.

If it doesn’t cover your use case, we may be able to improve it.

MANAGED BY INCF