Bids-validator command line tool return different error compared with website

Hi, when I use bids-validator command line tool, I got error code 61. But when I use the website demo with the same bids folder, I got error code 55 and 44.

Any idea?
website result:

cmd: bids-validator ds000114 --json
cmd result:
{"issues":{"errors":[{"key":"QUICK_VALIDATION_FAILED","severity":"error","reason":"Quick validation failed - the general folder structure does not resemble a BIDS dataset. Have you chosen the right folder (with \"sub-*/\" subfolders)? Check for structural/naming issues and presence of at least one subject.","files":[{"key":"QUICK_VALIDATION_FAILED","code":61,"file":{"name":".","path":".","relativePath":"."},"evidence":null,"line":null,"character":null,"severity":"error","reason":"Quick validation failed - the general folder structure does not resemble a BIDS dataset. Have you chosen the right folder (with \"sub-*/\" subfolders)? Check for structural/naming issues and presence of at least one subject.","helpUrl":"https://neurostars.org/search?q=QUICK_VALIDATION_FAILED"}],"additionalFileCount":0,"helpUrl":"https://neurostars.org/search?q=QUICK_VALIDATION_FAILED","code":61}],"warnings":[],"ignored":[]}}%

Can you print the output of ls ds000114 as well as tree $SUB where $SUB is the name of one of the subjects?

Thanks,
Steven

the output of ls ds000114:

CHANGES                              sub-08
dataset_description.json             sub-09
dwi.bval                             sub-10
dwi.bvec                             task-covertverbgeneration_bold.json
participants.tsv                     task-covertverbgeneration_events.tsv
sub-01                               task-fingerfootlips_bold.json
sub-02                               task-fingerfootlips_events.tsv
sub-03                               task-linebisection_bold.json
sub-04                               task-overtverbgeneration_bold.json
sub-05                               task-overtverbgeneration_events.tsv
sub-06                               task-overtwordrepetition_bold.json
sub-07                               task-overtwordrepetition_events.tsv

Got it, thanks. The two dwi files do not belong there, but it looks fine besides that. Now how about the tree structure of a single subject (cd ds000114; tree sub-01)?

Best,
Steven

the output of tree sub-01:

β”œβ”€β”€ ses-retest
β”‚   β”œβ”€β”€ anat
β”‚   β”‚   └── sub-01_ses-retest_T1w.nii.gz -> ../../../.git/annex/objects/xm/25/MD5E-s8503839--3b3b49b2396b59ddd5a73b7f596f9e46.nii.gz/MD5E-s8503839--3b3b49b2396b59ddd5a73b7f596f9e46.nii.gz
β”‚   β”œβ”€β”€ dwi
β”‚   β”‚   └── sub-01_ses-retest_dwi.nii.gz -> ../../../.git/annex/objects/0K/16/MD5E-s99899518--5ebac8e9e23180638dd68dde10b818be.nii.gz/MD5E-s99899518--5ebac8e9e23180638dd68dde10b818be.nii.gz
β”‚   └── func
β”‚       β”œβ”€β”€ sub-01_ses-retest_task-covertverbgeneration_bold.nii.gz -> ../../../.git/annex/objects/3q/Qf/MD5E-s22317848--b30f5b2f7a6039a3e384bcb40bec7e55.nii.gz/MD5E-s22317848--b30f5b2f7a6039a3e384bcb40bec7e55.nii.gz
β”‚       β”œβ”€β”€ sub-01_ses-retest_task-fingerfootlips_bold.nii.gz -> ../../../.git/annex/objects/26/6j/MD5E-s23793248--327e42d440f0557105bf7c05a3b9f1e8.nii.gz/MD5E-s23793248--327e42d440f0557105bf7c05a3b9f1e8.nii.gz
β”‚       β”œβ”€β”€ sub-01_ses-retest_task-linebisection_bold.nii.gz -> ../../../.git/annex/objects/qv/gf/MD5E-s30728838--58392e3ead9caeefe148a57c71dd5b44.nii.gz/MD5E-s30728838--58392e3ead9caeefe148a57c71dd5b44.nii.gz
β”‚       β”œβ”€β”€ sub-01_ses-retest_task-linebisection_events.tsv
β”‚       β”œβ”€β”€ sub-01_ses-retest_task-overtverbgeneration_bold.nii.gz -> ../../../.git/annex/objects/Fx/6K/MD5E-s11839146--5f62c005467de0dabc6ebcd09c3e7ec3.nii.gz/MD5E-s11839146--5f62c005467de0dabc6ebcd09c3e7ec3.nii.gz
β”‚       └── sub-01_ses-retest_task-overtwordrepetition_bold.nii.gz -> ../../../.git/annex/objects/x3/qW/MD5E-s10162063--a86a0f448872de33a901a6b639e975c9.nii.gz/MD5E-s10162063--a86a0f448872de33a901a6b639e975c9.nii.gz
└── ses-test
    β”œβ”€β”€ anat
    β”‚   └── sub-01_ses-test_T1w.nii.gz -> ../../../.git/annex/objects/QP/jm/MD5E-s8677710--d6820f6cb8fb965e864419c14f6a22d5.nii.gz/MD5E-s8677710--d6820f6cb8fb965e864419c14f6a22d5.nii.gz
    β”œβ”€β”€ dwi
    β”‚   └── sub-01_ses-test_dwi.nii.gz -> ../../../.git/annex/objects/X2/kJ/MD5E-s104193417--454850ac9ed1c96c40b6b7946e51bf71.nii.gz/MD5E-s104193417--454850ac9ed1c96c40b6b7946e51bf71.nii.gz
    └── func
        β”œβ”€β”€ sub-01_ses-test_task-covertverbgeneration_bold.nii.gz -> ../../../.git/annex/objects/mx/zJ/MD5E-s22944165--71b1eda077a1003a177552f6c380323a.nii.gz/MD5E-s22944165--71b1eda077a1003a177552f6c380323a.nii.gz
        β”œβ”€β”€ sub-01_ses-test_task-fingerfootlips_bold.nii.gz -> ../../../.git/annex/objects/k6/4f/MD5E-s24454931--e9ab535d84a922b0c7ed52461244cf47.nii.gz/MD5E-s24454931--e9ab535d84a922b0c7ed52461244cf47.nii.gz
        β”œβ”€β”€ sub-01_ses-test_task-linebisection_bold.nii.gz -> ../../../.git/annex/objects/32/Qq/MD5E-s31617092--151bc230c3b577110883369b6fad0daa.nii.gz/MD5E-s31617092--151bc230c3b577110883369b6fad0daa.nii.gz
        β”œβ”€β”€ sub-01_ses-test_task-linebisection_events.tsv
        β”œβ”€β”€ sub-01_ses-test_task-overtverbgeneration_bold.nii.gz -> ../../../.git/annex/objects/p3/fZ/MD5E-s12048980--648c9094579aa5d047a5f6db468f9bc9.nii.gz/MD5E-s12048980--648c9094579aa5d047a5f6db468f9bc9.nii.gz
        └── sub-01_ses-test_task-overtwordrepetition_bold.nii.gz -> ../../../.git/annex/objects/56/GV/MD5E-s10362270--6a5c483d118db28ff8a62455def5501c.nii.gz/MD5E-s10362270--6a5c483d118db28ff8a62455def5501c.nii.gz

8 directories, 16 files
  1. DWI bvals and bvecs should be copied to the subject folders with BIDS naming conventions.
  2. There do not seem to be any JSON filess

Also, does the tree indicate that your niftis are on a git repo and not stored locally (sorry I am not familiar with that output structure)? That may confuse the bids validator. Does that make sense?

Best,
Steven

Thanks Steven, it makes sense to me. But I am still confuse that the result of using command line to validate folder ds000114 is different with the result of validating ds000114 through the browser(https://bids-standard.github.io/bids-validator/)

Maybe because you used the --json argument in command line?

No I don’t think so. --json argument just makes the output as a json format.

Ah I thought that was doing something like this (from the documentation)


but you’re right.

If I use command line without --json, the output like this:


the output only shows Quick validation failed while the output of browser shows Error 1: [Code 55] JSON_SCHEMA_VALIDATION_ERROR and Error 2: [Code 44] FILE_READ

Sorry about this difference, it looks like the latest version of the validator isn’t being used on the website. I’ll see about getting this fixed. I’m downloading ds000114 to test against as well.

1 Like