BIDS: "Study Dataset" Structure and Validation Issue

Summary of what happened:

I want to set up my BIDS directory as a study dataset and am wondering where to put the two participant files (participants.tsv, participants.json) that are normally located in the BIDS root directory.
The BIDS specification is unfortunately not very specific about that:

└─ study-1/
   ├─ sourcedata/
   │  ├─ dicoms/
   │  ├─ raw/
   │  │  ├─ sub-01/
   │  │  ├─ sub-02/
   │  │  ├─ ... 
   │  │  └─ dataset_description.json 
   │  └─ ... 
   ├─ derivatives/
   │  ├─ pipeline1-v1/
   │  ├─ pipeline2/
   │  └─ ... 
   ├─ dataset_description.json 
   └─ ... 

When I leave the two participants files in the root directory and run the command line bids-validator via

deno run -ERWN jsr:@bids/validator .

I get the following error:

[ERROR] PARTICIPANT_ID_MISMATCH Subject directories found in this dataset did not match the values in the participant_id column found in the participants.tsv file.
	/participants.tsv


      Summary:                         Available Tasks:        Available Modalities:
      5 Files, 8.16 kB                                                              
      0 - Subjects 1 - Sessions                               

I assume it is because the the participants files are not in the same folder as the raw data. And looking at the summary, the validator didn’t recognize my subjects in sourcedata/raw/ at all.

When adding the two files under sourcedata/raw/, the error is gone, but the raw data is still not recognized.

Does anyone have suggestions about where to store the files (would be nice to have them in the main folder as an overview), and how to get the bids-validator to recognize my subjects?

Thanks!

Hi @Sarah_Tischer and welcome to neurostars!

Your participants.* files should be on the same level as your subject folders. And in this case, your BIDS directory you’re going to want to validate is study-1/sourcedata/raw/.

Best,

Steven