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

A stimulus file was declared but not found in the dataset #2134

Open gifale95 opened 1 week ago

gifale95 commented 1 week ago

Hi,

While uploading a dataset to OpenNeuro I got an error in the validation step saying "A stimulus file was declared but not found in the dataset". However, after double checking the "/stimuli" directory of my dataset I am sure that the image paths and file names declared in the '*events.tsv' files are correct.

The official BIDS documentation says that "The stimulus files can be added in a /stimuli directory (under the root directory of the dataset; with optional subdirectories)", and I am following these guidelines.

Am I doing something wrong, or could there be a bug in the BIDS validator?

Thank you! Ale

effigies commented 1 week ago

Do you see this issue in both the schema validator (https://bids-standard.github.io/bids-validator/) and the legacy validator (https://bids-standard.github.io/bids-validator/legacy/)?

gifale95 commented 1 week ago

When using the legacy validator I get the same error described above ([Code 52] STIMULUS_FILE_MISSING):

Screenshot from 2024-09-17 20-19-00

With the schema validator I get a different error, also related to the stimuli folder:

Screenshot from 2024-09-17 20-15-11

However, here too I do understand why I'm getting the error, since there is a ".bidsignore" file included in the dataset as the error text suggests. This is the content of the ".bidsignore" file.

used_mri_sequences.pdf

stimuli/multivariate_rnc_controlling_images/
stimuli/univariate_rnc_controlling_images/
stimuli/catch_images/
effigies commented 1 week ago

What happens if you remove the stimuli/ directories from .bidsignore? You shouldn't need to ignore valid files.

For the used_mri_sequences.pdf, you could try adding a / to see if that matches the file better?

gifale95 commented 1 week ago

After editing the .bidsignore file as you suggested, the schema validator error remains the same, but the legacy validator error disappears, and I also no longer get errors when uploading the dataset on OpenNeuro. Thank you very much for your help!