Bids-validator vs BIDS Specification for T2starw

I’m trying to validate a BIDS dataset and I’m getting an error that the T2starw files are NOT_INCLUDED.

The reason seems to be that the BIDS Specification allows for echo with T2Starw but the bids-validator does not. I guess this would be true for all non-parametric structural MR images.

Example file:
rawdata/sub-142/ses-60238918/anat/sub-142_ses-60238918_acq-T2MAPGRE_echo-0_T2starw.nii.gz

bids-validator regexp for T2starw does not allow for “echo”

BIDS Specification for T2starw does allow for “echo” in both the Modality specific files section and the Entity Table appendix.
https://bids-specification.readthedocs.io/en/stable/modality-specific-files/magnetic-resonance-imaging-data.html#non-parametric-structural-mr-images
https://bids-specification.readthedocs.io/en/stable/appendices/entity-table.html

The easy solution seems to be to change the “echo” to “run” and bump the index up by 1.

Thoughts or opinions?

I guess I could also create an issue with the bids-validator or modify the offending bids-validator file and submit a patch.

Please do. If the spec allows it and the validator doesn’t, that’s a bug and should be handled on the issue tracker.

I have entered an issue on github. I also noticed that chunk should be allowed as well.

1 Like

Also create pull request with the fix.