Your dataset is not a valid BIDS dataset

Hi everyone,

I just ran the BIDS-validator and get this error message:

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.

My folder structure is as follows:

Has someone had a similar issue or does someone know how to resolve this error?

I’m trying to figure out what I am doing wrong: whether the name or folder structure is incorrect, or if I am missing some files? I would be so grateful for your help.

Thank you,

Rubina

Hi Rubina!

You will need to change several things inside the individual subject folders:

  1. dataset_description.json goes into the overall BIDS folders (see below), not the subject-specific folders
  2. sub and the subject number should be separated by a -, not a _.
  3. The _a and _b suffix are not BIDs-compliant. If you have different tasks or different runs, they should be named as sub-A0123061_task-X_run-Y.nii.gz/json
  4. heart's anatomy and tsv are not valid sub-folders. I don’t know what is in heart's anatomy so I don’t know how to help you there, but if tsv are the functional event files, then they should be with in the func folder named sub-A0123061_task-X_run-Y_events.tsv

Then you have to make sure that in the overall BIDs folder, that is the one that contains the subject folders, you should also have:

  1. code folder, which contains code used for analyses
  2. derivatives folder, which contains processed/analyzed data
  3. sourcedata folder, which contains original DICOMS and any other raw files (BIDS validator will ignore things inside here, so no need to stylize this too much)
  4. participants.tsv which contains information about the subjects in the directory and optionally participants.json to elaborate on what column names and values represent.
  5. dataset_description.json
  6. README containing any other information someone looking at your data should know
  7. If you want BIDS validator to look over parts of the directory, you can put them in a .bidsignore file.

You might find it helpful to look around this repo: GitHub - bids-standard/bids-starter-kit: Collection of tutorials, wikis, and templates to get you started with creating BIDS compliant datasets

Hope this helps!

Best,
Steven

1 Like

Also, I notice that these subject folders are contained in fMRI data. A BIDS directory should ideally contain all data for a subject. So if you called other modalities like EEG, DWI, etc., they should be in the BIDS subject folders too.

Hi Steven!

Thank you so much for the feedback. I’ve made some changes according to your suggestions, but would you know what the minimum files are needed to validate my dataset using the BIDS-validator?

Answering your other question re the subject folders contained in fMRI data, I divided DICOM and Nifty in two separate folders, but I’ll put DICOM files in the source data folder (like you suggested). I want to check the dataset for one participant before doing the same process for the remaining participants.

Best,

Rubina

As a minimum, I would do one subject folder, and the things I mention in the second list. You can also use this tool to go from dicoms to BIDs dcm2bids · PyPI. I know some that the tool uses this forum for support so if you run into issues you can post here.

1 Like

I have conda and installed dcm2bids but I’m new to this and cannot find a tutorial on the next steps. Would you be knowing of any website?

Thank you so much for your help :slight_smile:

https://unfmontreal.github.io/Dcm2Bids/docs/2-tutorial/

Hi Steven,

I tried validating my dataset again but it failed again. I re-arranged the folder and naming structure like this (please see the screenshot). Sourcedata has DICOM files in anatomical and functional folders. Is there something I’m not doing right?

Thank you for your help.

Best,

Rubina

Hi Rubina,

What’s the error output from the validator? Also, .bidsignore should be a text file, sorry if I did not make that clear before.

Best,
Steven

Hi Steven,

Oh okay, I excluded the .bidsignore folder, however, I still get the same error message. It reads as follows:

Best,

Rubina

What is your bids validator command? What folder are you running the query on?

BIDS validator is supposed to be run on the overall bids folder, not the individual subject folder. Also, how are you running this?

Okay, I would have to convert the DICOM files to Nifty files for all participants then. I had it only for one or two participants.

I’m using https://bids-standard.github.io/bids-validator/ to validate the dataset.

Hi Steven,

I ran the overall bids folder with all the files for all the participants and still get the same error message. I think there might be a bug with the validator. Would you know how to resolve this?

Thank you,

Rubina

Can you show me the output? As an alternative, you can download the bids-validator on Pip into a Anaconda virtual environment (pip install bids-validator) and run it like that:
bids-validator /path/to/BIDS/directory

Here’s the output:

I’m not sure I quite understand the code to run. Would it be like this?

bids-validator\Users\rubin\Documents 2021\Germany\fMRI data\Motor imagery dataset\BIDS

I meant the output of the bids-validator command (the website you took a screenshot of last time). You would need a space between bids-validator and the path to the directory. Also you would probably want to make the path into a string by surrounding it with quotation marks because it has spaces in it which will confuse the command. Also forward slashes should be replaced by back slashes. You can look at the bids-validator documentation here. GitHub - bids-standard/bids-validator: Validator for the Brain Imaging Data Structure

Here it is:

Also take a look at the BIDS specifications. There should be an underscore between subject name and run in your functional files. So it should read sub-XXXX_run-Y_bold.nii.gz/json. Same thing for anatomical files. Having a tool like dcm2bids do this for you is helpful.