You should run the BIDS validator command line tool, not in python, so it will give you a verbose output. In command line environment with BIDS-validator installed, run bids-validator 'C:\Users\rubin\Documents 2021\Germany\fMRI data\Motor imagery dataset\BIDS'
As you can see here the is_bids
method checks individual file names to see if they are BIDS compliant, not whole directories which is what you are trying to do.
If I don’t run the command in Python, where should I run this?
Silly question but I’m not sure what you mean by command line environment?
Also, I tried using https://bids-standard.github.io/bids-validator/ to validate my dataset. Could there be a bug which I can remove?
If you have node.js on your terminal, you can install the bids validator by using npm install -g bids-validator
, you will be able to use it as a command line tool in your terminal. Once installed you should be able to run bids-validator /path/to/your/bids/directory
and see any validation issues logged to the terminal. Run bids-validator
without a directory path to see available options.
Alternatively, you can build a Docker or Singularity container of bids validator and run it through there.
Staying in python you could just have the is_bids
method loop over all files in the directory, but the outputs won’t be as helpful as the verbose command line tool output.
Put the directory path as string (surround it by quotes).
Try to cd
to the BIDS directory, and then just run bids-validator .
The period is part of that command and tells the validator to run it in that directory.
It still looks like you are trying to enter the full path for the command. What I suggested was to put the terminal in to the BIDS directory through the cd
command (cd '/path/to/directory/'
) and then running the BIDS-validator with bids-validator .
, making sure to include that period to tell the BIDS validator to work in the current directory, which we will have set to be the BIDS folder.
Sorry, I didn’t understand what you meant.
So in the cmd, I’m trying to figure out what code would work to change the directory
When I run cd ‘\BIDS’ it says that the system cannot find the path specified. Any other code that I can use?
You have to type in the full path to the bids directory for cd
you did not include the space and period after bids-validator
Can you paste the output of ls
please?
I don’t follow…1s of?
ls
(that first character is a lowercase L) is a terminal command that prints what is in the directory.