Following BIDS convention (filenames, folder structure) when organizing a dataset

Dear SCT Team,

I’m using the SCT for data processing (on cervical spinal cord) and I would like to know, please, if the following organisation is the right one to respect BIDS convention ?

I looked at BIDS website and some tips you gave on the forum, therefore I apologise if my question isn´t relevant but I’m still not sure. :smiling_face:

Many thanks for your support !

Best wishes,
Mathilde

Hi @Brd !

Thank you for reaching out. Avanto1, Aera1, etc. are not valid BIDS suffixes. Also, the session needs to appear in the file name. Eg: Longitudinal and multi-site studies - Brain Imaging Data Structure

I recommend you use pybids to validate your BIDS dataset

Cheers
Julien

1 Like

To expand on this recommendation, pybids has a BidsValidator class that can check if a filepath is BIDS-compliant.

However, I think there might be an easier way? There is an official tool called bids-validator that has a web-based utility requiring no installation: https://bids-standard.github.io/bids-validator/

Kind regards,
Joshua

2 Likes

Dear @jcohenadad and @joshuacwnewton,

Thank you so much for your valuable help.
I used the tool bids-validator (which is very fast and simple indeed!) and I’ve been curious to try pybids too, with the BidsValidator class and Jupyter Notebook. Therefore, I found an organisation in compliance with BIDS convention for my dataset :

In my file names (nii.gz), I haven’t found a solution to keep “F1988 MPRAGE” and “M1982 MPRAGE” (that we can see on the image of my first post). Do you confirm there is no solution to add them in file names?

Best wishes,
Mathilde

1 Like

I’m presuming that the first term (“F1998”) refers to sex and birth year of the subject? If so, you may want to consider moving this metadata into a Participants file for the dataset.

As far as “MPRAGE” goes, I did a quick search on https://bids-specification.readthedocs.io/ and found this page with the following example:

For example: "sub-01/ses-mri/anat/sub-01_ses-mri_acq-mprage_T1w.json"

So, it seems like “_acq-mprage” is a valid entity to place before the “_T1w” suffix? (More info here: Entities - Brain Imaging Data Structure v1.9.0)

Kind regards,
Joshua

1 Like

Okay, many thanks for your recommendations.

Indeed, the first term “F1998” refers to sex and birth year, so I think I’m going to implement a participants file for the dataset.

I’ve just added “_acq-mprage” before the “_T1w” suffix in the file names, and the bids-validator tool has validated my BIDS dataset. So thank you very much for your help !

Best wishes,
Mathilde

1 Like

Wonderful news! I’m so glad to hear. :heart:

1 Like

I think I’m going to implement a participants file for the dataset.

yes, this is a requirement for BIDS

1 Like