Very simple BIDS formatting question

Sorry for bothering with this simple question, but it’s the last step in a week of work that I just can’t figure out.

Why is this not proper BIDS format (according to BIDS-validator):

data/sub-001/ses-1/func/sub-001_ses-1_acq-ert_task-ert_bold.nii.gz
or
data/sub-001/ses-2/func/sub-001_ses-2_acq-rest2_task-rest2_bold.nii.gz

I use the acq-<label> key/value pair to distinguish fmaps for func and dwi data. It’s optional so that can’t be the problem right?

sub-001
ses-2
acq-rest2
task-rest2
bold

Maybe I am blind but am I missing something?

Thanks in advance

is data the root of the dataset; the directory that dataset_description.json lives in? If not the subject directories should be moved to the datasets root directory.

If so there are two possible things that the validator may be taking issue with:
data/sub-001/ses-1/func/sub-001_ses-1_acq-ert_task-ert_bold.nii.gzz
^ the file extension in this filename has an extra z, gzz → gz

data/sub-001/ses-1/func/sub-001_ses-2_acq-rest2_task-rest2_bold.nii.gz
^ this files says ses-2 but its in the ses-1 directory.

Will also add:

  1. you don’t need the acq-<label> since the task names are enough to differentiate between files.
  2. Not sure this applies to your data because I don’t know your full scanning protocols, but one “session” can have multiple files. It is not that one “session” must contain one BOLD. Rather, one session can contain your ert and rest acquisitions, as long as they were collected in the same session (that is, one sequence after the other).
  3. You have the task name rest2 which implies the existence of rest1. Multiple runs of rest should have _task-rest_run-01_ or _task-rest_run-02_ in the filename. This way, it is clear that these are both the same task (resting state), but different runs of it. And similar to what I said in the previous point, multiple runs of data can be contained in different sessions. You should mainly only have multiple sessions if data are collected of multiple days.
1 Like

Hi rwblair! Thanks for your quick response. Yes data is the root that contains .bidsignore, dataset_description.json, participants.tsv and README.

I’m sorry, the gzz → gz was a typo in this comment.
The ses inconsistency was also a typo in the comment.
Thanks for being sharp, I fixed them in the comments!

Hi Steven,

  1. Task names (e.g. task-ert) differntiate between func files. I also have dwi files. I then have fmaps for both func and dwi data so I’m using acq. Since dwi doesn’t have a task field the only consistent way to disciminate I saw was using a acquisition field (or adding a task field to the dwi data, but that doesn’t seem to make sense)
  2. Thanks. I have two sessions (follow-up) that contain multiple func scans.
  3. Good idea about adding a run field for the separate rest scans; I’ll get that implemented.

But currently, nothing seems to be out of the ordinary despite BIDS validators errors, right?

What is the error that the bids validator is sending you?

Location:

data/sub-001/ses-1/func/sub-001_ses-1_acq-rest1_task-rest1_bold.nii.gz

Reason:

Files with such naming scheme are not part of BIDS specification. …

Evidence:

sub-001_ses-1_acq-rest1_task-rest1_bold.nii.gz

DWI and Fmap files will go in separate dwi and fmap folders, so you still do not need the acq label.

According the the BIDS specification, for the task modality, the acquisition label comes after the task label:

sub-<label>/
    [ses-<label>/]
        func/
            sub-<label>[_ses-<label>]_task-<label>[_acq-<label>][_ce-<label>][_rec-<label>][_dir-<label>][_run-<index>][_echo-<index>][_part-<label>]_bold.json
            sub-<label>[_ses-<label>]_task-<label>[_acq-<label>][_ce-<label>][_rec-<label>][_dir-<label>][_run-<index>][_echo-<index>][_part-<label>]_bold.nii[.gz]
            sub-<label>[_ses-<label>]_task-<label>[_acq-<label>][_ce-<label>][_rec-<label>][_dir-<label>][_run-<index>][_echo-<index>][_part-<label>]_cbv.json
            sub-<label>[_ses-<label>]_task-<label>[_acq-<label>][_ce-<label>][_rec-<label>][_dir-<label>][_run-<index>][_echo-<index>][_part-<label>]_cbv.nii[.gz]
            sub-<label>[_ses-<label>]_task-<label>[_acq-<label>][_ce-<label>][_rec-<label>][_dir-<label>][_run-<index>][_echo-<index>][_part-<label>]_sbref.json
            sub-<label>[_ses-<label>]_task-<label>[_acq-<label>][_ce-<label>][_rec-<label>][_dir-<label>][_run-<index>][_echo-<index>][_part-<label>]_sbref.nii[.gz]
            sub-<label>[_ses-<label>]_task-<label>[_acq-<label>][_ce-<label>][_rec-<label>][_dir-<label>][_run-<index>][_echo-<index>]_phase.json
            sub-<label>[_ses-<label>]_task-<label>[_acq-<label>][_ce-<label>][_rec-<label>][_dir-<label>][_run-<index>][_echo-<index>]_phase.nii[.gz]
            sub-<label>[_ses-<label>]_task-<label>[_acq-<label>][_ce-<label>][_rec-<label>][_dir-<label>][_run-<index>]_events.json
            sub-<label>[_ses-<label>]_task-<label>[_acq-<label>][_ce-<label>][_rec-<label>][_dir-<label>][_run-<index>]_events.tsv
            sub-<label>[_ses-<label>]_task-<label>[_acq-<label>][_ce-<label>][_rec-<label>][_dir-<label>][_run-<index>][_recording-<label>]_physio.json
            sub-<label>[_ses-<label>]_task-<label>[_acq-<label>][_ce-<label>][_rec-<label>][_dir-<label>][_run-<index>][_recording-<label>]_physio.tsv.gz
            sub-<label>[_ses-<label>]_task-<label>[_acq-<label>][_ce-<label>][_rec-<label>][_dir-<label>][_run-<index>][_recording-<label>]_stim.json
            sub-<label>[_ses-<label>]_task-<label>[_acq-<label>][_ce-<label>][_rec-<label>][_dir-<label>][_run-<index>][_recording-<label>]_stim.tsv.gz

Maybe that is why the bids validator is complaining?

1 Like

simply that the naming scheme is not part of BIDS specification…

Try switching the task and acq labels.

1 Like