BIDS validator - command line

Dear All,

We have recently installed bids validator. I tried using it today following the command line instructions on the Github page. However, I can’t seem to be able to get it to work.

I used the following command:
bids-validator /data/project/STUDY_1/sourcedata/

the only output I seem to get it:

Usage: bids-validator <dataset_directory> [options]

Options:
  --help, -h            Show help                                      [boolean]
  --version, -v         Show version number                            [boolean]
  --ignoreWarnings      Disregard non-critical issues                  [boolean]
  --ignoreNiftiHeaders  Disregard NIfTI header content during validation
                                                                       [boolean]
  --verbose             Log more extensive information about issues    [boolean]
  --json                Output results as JSON                         [boolean]
  --bep006              Enable support for BIDS Extension Proposal 006 [boolean]
  --bep010              Enable support for BIDS extension proposal 010 [boolean]
  --config, -c          Optional configuration file. See
                        https://github.com/INCF/bids-validator for more info

This tool checks if a dataset in a given directory is compatible with the Brain
Imaging Data Structure specification. To learn more about Brain Imaging Data
Structure visit http://bids.neuroimaging.io

Not enough non-option arguments: got 0, need at least 1

Can anyone tell me what I’m doing wrong?

Many thanks,
Jenni

I could not replicate this locally. Could you share the outputs of the following commands

which bids-validator

bids-validator -v

node -v

Thanks so much for getting back to me so quickly!

  1. which bids-validator
    Output: bids-validator: aliased to singularity run -e /software/system/singularity/containers/bids-validator/20180906

  2. bids-validator -v
    Output:
    Usage: bids-validator <dataset_directory> [options]

    Options:
    –help, -h Show help [boolean]
    –version, -v Show version number [boolean]
    –ignoreWarnings Disregard non-critical issues [boolean]
    –ignoreNiftiHeaders Disregard NIfTI header content during validation
    [boolean]
    –verbose Log more extensive information about issues [boolean]
    –json Output results as JSON [boolean]
    –bep006 Enable support for BIDS Extension Proposal 006 [boolean]
    –bep010 Enable support for BIDS extension proposal 010 [boolean]
    –config, -c Optional configuration file. See
    https://github.com/INCF/bids-validator for more info

    This tool checks if a dataset in a given directory is compatible with the Brain
    Imaging Data Structure specification. To learn more about Brain Imaging Data
    Structure visit http://bids.neuroimaging.io

    Not enough non-option arguments: got 0, need at least 1

  3. node -v
    Output: v0.10.48

Many thanks,
Jenni

It’s an issue with your alias - see https://stackoverflow.com/questions/7131670/make-a-bash-alias-that-takes-a-parameter

Thank you so much! It works perfectly now.

1 Like