Don't Understand Why Validation Fails when Naming Scheme Matches

Hello,

Forgive me if I’m missing something obvious, but I tried validating a BIDS dataset and I’m getting a failure error about a lot of the files and do not understand the problem as it seems to me the naming convention and hierarchy matches the specifications. If someone could point me in the right direction, I would appreciate it! I’m attaching a screenshot of the error.

Best,
Melanie

Hi Melanie,

The _brain at the end does not match the BIDS specification.

Best,
Chris

1 Like

I apologize,that was a bad example because that was a file that I created for fsl and needed a different naming structure. I’m attaching other examples of rejected filenames and I’m still confused why they are rejected given that they seem to adhere to the BIDS specification as far as I can tell.
Thanks so much!!

Ah, this looks like this bug.

Hmm, well I tried it with lowercase and I’m still failing the BIDS validator step so I don’t understand.

Yeah, that appears strange… Is there any chance you’re using non-ASCII characters in your filenames?

Hello,

I checked using the instructions on this post and it seems the files do not have any non-ASCII characters in the filenames. Any other suggestions?

I’m kind of stuck… Perhaps someone else can see something I don’t?

I made a dummy dataset with those names and they passed the online validator, so I think it has to be a character issue.

image

1 Like

I believe the full set of valid characters is [^a-zA-Z0-9/_\.-]. Perhaps you can do the following:

find $DATASET | grep '[^a-zA-Z0-9/_\.-]'

This should show any files with invalid characters:

> $(echo "touch dataset/sub\u201001_T1w.nii")
> find dataset
dataset
dataset/sub‐01_T1w.nii
> find dataset | grep '[^a-zA-Z0-9/_\.-]'
dataset/sub‐01_T1w.nii

If this turns out to be the issue, perhaps we can add a direct check with a more informative error.

Hello,

Just a heads up that the BIDS validator seems to be very OS/browser specific. There were no invalid characters in my file names–I tested with your find/grep suggestion and other suggestions out there, and got no indications there were invalid characters in my filename.
I had initially tested the BIDS validator on a Windows PC with Chrome; then I tested on a linux server with firefox. This produced the same errors I reported above. But then I downloaded the same files to a Mac and tested with Chrome and had no problems with the validator–everything was kosher, just like the person in the thread who said they tested on a dummy set with the same filenames. So there were no invalid characters, but something about the combination of OS and browser I would say? I thought you guys should know, and any other people running into fallacious errors on the BIDS validator out there.

Best,
Melanie

A couple things:

We recently updated the web validator, which we discovered had not been updating for ~5 months. Is there any chance that this failed on the old version and succeeded on the new, and this merely coincided with trying different OS/Browser combinations?

Assuming that it does still fail with the most recent version, could you test in Chrome and Firefox on all three systems? And, ideally, if you could install bids-validator locally with npm, that would be a good additional data point. If there is a system where we can reliably reproduce this, it will make it easier to debug.

Some rambling: I find it strange that it would fail on Windows and Linux but not OSX. I would have thought OSX and Linux would be most similar, as they’re both Unix systems. OSX file systems are case-insensitive, while Windows and Linux are case-sensitive, so there might be something there, though I can’t immediately think of what.