Skip to content

Preparing the imaging metadata as a table

To be able to query information about available neuroimaging data in your dataset, you must provide Neurobagel with a .tsv file containing your dataset's neuroimaging metadata. We refer to this as a BIDS metadata table.

If your dataset is already in BIDS, the Neurobagel CLI provides a bids2tsv command that will automatically generate this table for you.

The BIDS metadata table lists each subject's available NIfTI imaging files and modality information, using BIDS naming conventions, in the format shown below.

Example BIDS metadata table

sub ses suffix path
sub-01 ses-01 T1w /data/bids-examples/synthetic/sub-01/ses-01/anat/sub-01_ses-01_T1w.nii
sub-01 ses-01 bold /data/bids-examples/synthetic/sub-01/ses-01/func/sub-01_ses-01_task-rest_bold.nii
sub-02 ses-01 T1w /data/bids-examples/synthetic/sub-02/ses-01/anat/sub-02_ses-01_T1w.nii
sub-02 ses-01 bold /data/bids-examples/synthetic/sub-02/ses-01/func/sub-02_ses-01_task-rest_bold.nii
... ... ... ...

About the BIDS metadata table

The table must include at least four columns named exactly sub, ses, suffix, and path (adapted from BIDS entities). Additional columns are allowed but will be ignored by Neurobagel.

Each row of the table indexes a single NIfTI (.nii or .nii.gz) file with the following metadata:

  • sub (required)
    • Subject ID in the format sub-<label>
    • Example: sub-PD123
  • ses (optional)
    • Session ID in the format ses-<label>, if applicable
    • Example: ses-01
  • suffix (required)
    • BIDS suffix corresponding to the image modality (or sequence) of the NIfTI file
    • For more information, see the "Modality specific files" section of the BIDS specification or consult this master list of recognized BIDS image suffixes
    • Example: T1w
  • path (required)
    • Path to the NIfTI file, ending with the extension .nii or .nii.gz
    • Example: /data/pd/qpn/sub-PD123/ses-01/anat/sub-PD123_ses-01_T1w.nii.gz