BIDS Validator Errors

Hello BIDS Experts,

There are two errors that I keep getting when I run the command line BIDS Validator on my data:

1) I believe that our files do adhere to the BIDS naming scheme. What is it about these files (all my files) that is not compliant?

1: [ERR] Files with such naming scheme are not part of BIDS specification. This error is most commonly caused by typos in file names that make them not BIDS compatible. Please consult the specification and make sure your files are named correctly. If this is not a file naming issue (for example when including files not yet covered by the BIDS specification) you should include a ".bidsignore" file in your dataset (see for details). Please note that derived (processed) data should be placed in /derivatives folder and source data (such as DICOMS or behavioural logs in proprietary formats) should be placed in the /sourcedata folder. (code: 1 - NOT_INCLUDED)
		Evidence: sub-010_ses-ne_calibraton_ASSET.json
		Evidence: sub-010_ses-ne_calibraton_ASSET.nii.gz
		Evidence: sub-010_ses-ne_task_newsevents_run-1_bold.json
		Evidence: sub-010_ses-ne_task_newsevents_run-1_bold.nii.gz
		Evidence: sub-010_ses-ne_task_newsevents_run-1_bold_topup.nii.gz
		Evidence: sub-010_ses-ne_task_newsevents_run-2_bold.json
		Evidence: sub-010_ses-ne_task_newsevents_run-2_bold.nii.gz
		Evidence: sub-010_ses-ne_task_newsevents_run-2_bold_topup.nii.gz
		Evidence: sub-010_ses-ne_task_newsevents_run-3_bold.json
	... and 758 more files having this issue (Use --verbose to see them all).

2) The session label appears to contain an illegal character for a small subset of my files. The session label is the same for all of my files (ses-ne, ses-sen, ses-str). So, why is this subset highlighted for violating the session labeling rules?

3: [ERR] Ses label contain an Illegal Character hyphen or underscore. Please edit the filename as per BIDS spec. (code: 63 - SESSION_VALUE_CONTAINS_ILLEGAL_CHARACTER)
		Evidence: ses name contains illegal character:/sub-010/ses-ne/anat/sub-010_ses-ne_calibraton_ASSET.json
		Evidence: ses name contains illegal character:/sub-010/ses-ne/func/sub-010_ses-ne_task_newsevents_run-1_bold.json
		Evidence: ses name contains illegal character:/sub-010/ses-ne/func/sub-010_ses-ne_task_newsevents_run-1_bold_topup.nii.gz
		Evidence: ses name contains illegal character:/sub-010/ses-ne/func/sub-010_ses-ne_task_newsevents_run-2_bold.nii.gz
		Evidence: ses name contains illegal character:/sub-010/ses-ne/func/sub-010_ses-ne_task_newsevents_run-3_bold.json
		Evidence: ses name contains illegal character:/sub-010/ses-ne/func/sub-010_ses-ne_task_newsevents_run-3_bold_topup.nii.gz
		Evidence: ses name contains illegal character:/sub-010/ses-ne/func/sub-010_ses-ne_task_newsevents_run-4_bold.nii.gz
		Evidence: ses name contains illegal character:/sub-010/ses-ne/func/sub-010_ses-ne_task_newsevents_run-5_bold.json
		Evidence: ses name contains illegal character:/sub-010/ses-ne/func/sub-010_ses-ne_task_newsevents_run-5_bold_topup.nii.gz
		Evidence: ses name contains illegal character:/sub-010/ses-sen/anat/sub-010_ses-sen_calibraton_ASSET.json
	... and 10 more files having this issue (Use --verbose to see them all).

Thank you,

Hi, thanks for posting.

calibration and ASSET are going to fail, as ASSET is not a valid suffix and calibration is not part of a key-value pair.

The underscore (_) between task and newsevents should be a hyphen (-).

topup is not a valid suffix, and you can’t have two suffixes. You probably want fmap/sub-010_ses-ne_task-newsevents_run-1_epi.nii.gz, which should reference the corresponding bold file with the IntendedFor metadata.

These are unexpected underscores, and should be covered by the first two things I mentioned.

Hello Chris,

Thank you for responding so quickly. We are confused about how to label our ASSET calibration scan. Your reply was:

We were using the following instructions from the BIDS Specification manual:

“Additional files and folders containing raw data may be added as needed for special cases. They
should be named using all lowercase with a name that reflects the nature of the scan (e.g.,
“calibration”). Naming of files within the directory should follow the same scheme as above (e.g.,
“sub-control01_calibration_Xcalibration.nii.gz”)”. For the following error:

we found success by changing the file name to sub-010_ses-ne_ASSETcalibration.nii.gz. The BIDS manual might be improved by changing the recommended example here to eliminate the last underscore.

However, we are still getting the following error pertaining to the naming scheme for these ASSET files.

Can you give us some advice on how to label our ASSET calibration scans so they conform to the BIDS Specifications?

You also stated:

Thank you, this fixed the problem.


Ah, I see. That looks like an error in the specification, and it looks like it’s been there for quite some time. I have opened an issue on GitHub to decide what to do about it.

I think the current suggestion for unspecified images is to place the file in sourcedata/, which is not subject to validator scrutiny. You can name them however you like, but trying to mirror the regular structure is probably a good idea. As an example: