Surprising error with BIDS-validator

Hi,
in my BIDS dataset I do have
sub-_ses-_acq-mb3_dir-0_epi.nii.gz images.
To avoid redundant json files, i simply add a
acq-mb3_dir-0_epi.json file at the upper level

I get a BIDS validation error:
acq-mb3_dir-0_epi.json

Location:
sourcedata/acq-mb3_dir-0_epi.json

Reason:
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 https://github.com/INCF/bids-validator#bidsignore 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.

Is there a mistake in my understanding of BIDS ?

Thanks in advance !

This seems like a validator bug. Could you try this branch: https://github.com/INCF/bids-validator/pull/531 or this web build: https://1456-37161308-gh.circle-artifacts.com/0/root/web_version/index.html

Yes, that worked. Thx !

Hi neurostars,

I am getting another error of that kind:

bids-validator@1.3.12

	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 https://github.com/bids-standard/bids-validator#bidsignore 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)
		./task-ArchiEmotional_dir-ap_bold.json
			Evidence: task-ArchiEmotional_dir-ap_bold.json
		./task-ArchiEmotional_dir-ap_sbref.json
			Evidence: task-ArchiEmotional_dir-ap_sbref.json
		./task-ArchiEmotional_dir-pa_bold.json
			Evidence: task-ArchiEmotional_dir-pa_bold.json
		./task-ArchiEmotional_dir-pa_sbref.json
			Evidence: task-ArchiEmotional_dir-pa_sbref.json
		./task-ArchiSocial_dir-ap_bold.json
			Evidence: task-ArchiSocial_dir-ap_bold.json
		./task-ArchiSocial_dir-ap_sbref.json
			Evidence: task-ArchiSocial_dir-ap_sbref.json
		./task-ArchiSocial_dir-pa_bold.json
			Evidence: task-ArchiSocial_dir-pa_bold.json
		./task-ArchiSocial_dir-pa_sbref.json
			Evidence: task-ArchiSocial_dir-pa_sbref.json
		./task-ArchiSpatial_dir-ap_bold.json
			Evidence: task-ArchiSpatial_dir-ap_bold.json
		./task-ArchiSpatial_dir-ap_sbref.json
			Evidence: task-ArchiSpatial_dir-ap_sbref.json
		... and 200 more files having this issue (Use --verbose to see them all).

The only thing I did recently was to rename this from ‘./task-ArchiEmotional_acq-ap_bold.json’ (that was OK) to ‘./task-ArchiEmotional_dir-ap_bold.json’

Am I missing something or I am hitting a limitation of BIDS-validator ?

Thx

Looking at the regular expression in the validator used to match top level functional files it does not attempt to match ‘_dir-’ but it is matching ‘_acq-’ so this appears to be an oversight in the validator.

To confirm all these files are at the top level of the dataset?

Thx for you answer.
Yes, they are.

Looks like you’ve fixed it, thx !

Sorry , but I’m afraid I have nother one of that kind

sub-01_ses-00_task-ArchiSocial_dir-ap_bold.nii.gz454867.499 KB | application/gzip
Location:
sourcedata/sub-01/ses-00/func/sub-01_ses-00_task-ArchiSocial_dir-ap_bold.nii.gz

Reason:
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 https://github.com/INCF/bids-validator#bidsignore 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.

Evidence:
sub-01_ses-00_task-ArchiSocial_dir-ap_bold.nii.gz

sub-01_ses-00_task-ArchiSocial_dir-ap_sbref.nii.gz1812.495 KB | application/gzip
Location:
sourcedata/sub-01/ses-00/func/sub-01_ses-00_task-ArchiSocial_dir-ap_sbref.nii.gz

Reason:
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 https://github.com/INCF/bids-validator#bidsignore 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.

Evidence:
sub-01_ses-00_task-ArchiSocial_dir-ap_sbref.nii.gz

Best,
Bertrand

Bizarre! I haven’t published a fix for the first issue. My copy of the validator does not see ‘sourcedata/sub-01/ses-00/func/sub-01_ses-00_task-ArchiSocial_dir-ap_sbref.nii.gz’ as an issue but does throw an error for ‘./task-ArchiSocial_dir-ap_bold.json’

The sourcedata directory should be ignored by default in the validator.

Yes, sorry. The problem I reported yesterday has not been fixed. I tried with another (deprecated) version. Sorry for the noise.

The BiDS check within openneuro upload is actually blocking the upload to openneuro repo. I’d be grateful for a solution to that !

I’ve released a new version of the validator 1.4.0. @bthirion if you have a chance could you try this new version from the command line to confirm that it validates your dataset now?

Will update here when a version of this is deployed onto OpenNeuro.

Thx ! Can’t do it before Monday unfortunately.
Best,
Bertrand

No worries, looks like earliest OpenNeuro deployment would be wednesday.

Sorry, I get the error below, which I don’t undertsand.

bt206016@is151225:/neurospin/tmp/bthirion/ibc_release/sourcedata$ bids-validator .
bids-validator@1.4.0

Unhandled rejection (
  reason: TypeError: Cannot read property 'length' of undefined
    at Object.formatIssues [as issues] (/home/bt206016/.nvm/versions/node/v13.7.0/lib/node_modules/bids-validator/utils/consoleFormat.js:21:21)
    at /home/bt206016/.nvm/versions/node/v13.7.0/lib/node_modules/bids-validator/cli.js:47:36
    at /home/bt206016/.nvm/versions/node/v13.7.0/lib/node_modules/bids-validator/validators/bids/start.js:26:7
    at /home/bt206016/.nvm/versions/node/v13.7.0/lib/node_modules/bids-validator/utils/options.js:25:9
    at /home/bt206016/.nvm/versions/node/v13.7.0/lib/node_modules/bids-validator/utils/options.js:63:9
    at /home/bt206016/.nvm/versions/node/v13.7.0/lib/node_modules/bids-validator/utils/options.js:50:11
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
).

bt206016@is151225:/neurospin/tmp/bthirion/ibc_release/sourcedata$ 

So looks like this is happening when its parsing the configuration file. If you are using a custom validator configuration can you post it here?

Noticed you were using node 13.7.0, so I tested validator using that against a few datasets with no config and it worked as expected.

I haven’t any custormized files. I have uninstalled and reinstalled bids-validator, but the result is unchanged.
Maybe there is an online version or circeci or anywhere that I can use ?
Thx for your time and patience.
Best,
B

I have been able to use the 1.4.2 through http://bids-standard.github.io/bids-validator/ and it works. Thanks !
(still get the same error with the npm version…)

Best,

Bertrand