bids-validator icon indicating copy to clipboard operation
bids-validator copied to clipboard

EEG and iEEG "electrodes" and "coordsystem" files accept more entities than they should

Open sappelhoff opened this issue 3 years ago • 3 comments

crossref:

  • https://github.com/bids-standard/bids-validator/pull/1190#issuecomment-783520897
  • https://github.com/bids-standard/bids-examples/issues/244

According to the spec, electrodes and coordsystem files should accept:

  • sub
  • ses
  • acq
  • space

see https://bids-specification.readthedocs.io/en/stable/04-modality-specific-files/03-electroencephalography.html#electrodes-description-_electrodestsv

But they accept many more.

See here:

https://github.com/bids-standard/bids-validator/blob/5d3835b5b6f4fcbbade1b7122c57a3f48f92cb46/bids-validator/bids_validator/rules/file_level_rules.json#L358-L498

https://github.com/bids-standard/bids-validator/blob/5d3835b5b6f4fcbbade1b7122c57a3f48f92cb46/bids-validator/bids_validator/rules/session_level_rules.json#L78-L195

https://github.com/bids-standard/bids-validator/blob/5d3835b5b6f4fcbbade1b7122c57a3f48f92cb46/bids-validator/bids_validator/rules/top_level_rules.json#L80-L119

Overall the regexps are getting unwieldy ... we should move towards building the regexps from the BIDS schema

sappelhoff avatar Feb 24 '21 10:02 sappelhoff

Landed on this while investigating an issue from bids matlab https://github.com/bids-standard/bids-matlab/issues/542

Just to know: is it worth putting effort into creating regex that match the schema or wait for the validator to directly use the schema.

Remi-Gau avatar May 01 '23 18:05 Remi-Gau

Just to know: is it worth putting effort into creating regex that match the schema or wait for the validator to directly use the schema.

I think at this point we should wait for the schema based validator to take over and invest our time in effort in more urgent issues. However if you want to dive into this, it'd still be helpful.

sappelhoff avatar May 02 '23 10:05 sappelhoff

if you want to dive into this

irony: on

oh yes!!!! I love writing complex regex to parse file names!!!

irony: off

OK let's wait then.

Remi-Gau avatar May 02 '23 11:05 Remi-Gau