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

deno validator: warning missing events.tsv file for emptyroom noise task #2137

Open monique2208 opened 1 week ago

monique2208 commented 1 week ago

I am getting a warning EVENTS_TSV_MISSING about the noise task that is part of empty room data for an meg dataset. Since this is explicitly how this task should be labelled according to the specification, should there not be an exception for noise as there is for rest?

EVENTS_TSV_MISSING Task scans should have a corresponding 'events.tsv' file.
If this is a resting state scan you can ignore this warning or rename the task to include the word "rest".
        /sub-emptyroom/ses-20190619/meg/sub-emptyroom_ses-20190619_task-noise_channels.tsv
        /sub-emptyroom/ses-20190619/meg/sub-emptyroom_ses-20190619_task-noise_meg.fif
        12 more files with the same issue

we are actually upgrading this warning to an error for our system, is there a way to avoid this error for the noise task specifically through configuration?

effigies commented 1 week ago

The place to fix this will be in the schema:

https://github.com/bids-standard/bids-specification/blob/0698f5a59db2e06c4559473c34432ce03b2306d5/src/schema/rules/checks/events.yaml#L4-L19

I would add the following selector:

    - (datatype != "meg" || entities.subject != "emptyroom")

Rather than matching on task-noise, catching the meg/sub-emptyroom seems better targeted to this case.

Would you be willing to open a PR over on the spec?