bids-standard / bids-validator

Validator for the Brain Imaging Data Structure
https://bids-standard.github.io/bids-validator/
MIT License
181 stars 109 forks source link

EEG: multiple dataset files can be submitted with different extension #1900

Open arnodelorme opened 6 months ago

arnodelorme commented 6 months ago

This dataset contains both .set and .vhdr files

https://nemar.org/dataexplorer/detail?dataset_id=ds003190

This should not be possible. There should be either one or the other.

Remi-Gau commented 6 months ago

Relates to https://github.com/bids-standard/bids-specification/issues/1487

Unless I am mistaken enforcing this would depend on updating the schema (see https://github.com/bids-standard/bids-specification/pull/1492) for the deno based validator.

I doubt the legacy validator will enforce this.

sappelhoff commented 6 months ago

I don't think we have a rule in BIDS that the data format chosen for a dataset must be consistent :thinking:

although it is a bit weird to mix them in a single dataset.

effigies commented 6 months ago

We do check whether someone has both .nii and .nii.gz files, as this is a somewhat common issue.

https://github.com/bids-standard/bids-validator/blob/932c782a556afea34346e994f655e03cf3e171fe/bids-validator/validators/nifti/duplicateFiles.js#L3-L34

A similar thing could be written for other formats, although it would be more complicated, because EEG has multi-file formats and files sharing the same stem isn't in itself an error.

sappelhoff commented 6 months ago

We do check whether someone has both .nii and .nii.gz files, as this is a somewhat common issue.

but does it say in the spec, that these shouldn't be mixed?

effigies commented 6 months ago

No, but it does create ambiguity about the data and frequently problems for tools expecting to retrieve a unique data file for a collection of entities.

I would support making it an explicit part of the spec, though I would not complain if it happened after @Remi-Gau's schema changes were incorporated and supported by the schema validator.

Remi-Gau commented 6 months ago

I think we had added this section in the spec, no?

https://bids-specification.readthedocs.io/en/stable/common-principles.html#uniqueness-of-data-files

But I need to get back to finishing the schema pr.

sappelhoff commented 6 months ago

I think we had added this section in the spec, no?

what we added there was:

However, here we have data_a.jpg and data_b.tif as a situation 🤔