Bids validation with rawdata subfolder

Hello,

I have a project organized in the following way.

├── code
├── derivatives
├── rawdata
└── sourcedata

I would have liked to upload it to openneuro.org, but it fails the bids validation.

Note that the rawdata folder by itself passes the bids validation (online bids validator 1.3.12).

I would have expected the entire project to pass the validation given the following excerpt from the bids reference:
https://bids-specification.readthedocs.io/en/stable/02-common-principles.html#source-vs-raw-vs-derived-data

Any thought?
Thanks,

Hi @chrplr, if you want to upload rawdata/ to OpenNeuro, it will accept it, because that’s a BIDS dataset. The directory containing these four directories is not. However, code/, derivatives/ and sourcedata/ are all valid subdirectories in a BIDS dataset that do not get validated.

If your goal is to archive all of this, and not just rawdata/, you can reorganize as follows:

rawdata/
    code/
    derivatives/
    sourcedata/
    ...

If this passes the validator, it can be uploaded to OpenNeuro.

1 Like

Is there a documented reason why the following structure,

rawdata/
    code/
    derivatives/
    sourcedata/
    ...

is the preferred way to store all folders in a single BIDS folder rather than having rawdata, sourcedata, code, derivatives, etc all at the same folder level? It hasn’t yet made sense to me why, e.g., why I would go looking for code in the rawdata folder.

It’s not really preferred, but BIDS is the rawdata folder. The other directories are reserved names in case you want to distribute additional data with your BIDS dataset.

In my actual practice, I keep:

/data/
    bids/
        dsXYZ/
        ...
    derivatives/
        dsXYZ/
            freesurfer/
            fmriprep/
            ...
        ...
1 Like