BIDS with different groups

I organized my data files according to the BIDS architecture:

project
    -sub-01
         -ses-01
             -anat

    -sub-02
          -ses-01
              -anat

however the different subjects belong to different treatment groups (eg sub-01 is a patient, sub-02 a control, etc). What is the appropriate way to include group in the BIDS folder structure? Thanks!

In this case, you can either change the names, e.g. sub-control01, sub-patient01, or update your participants.tsv like the following:

participant_id  group
sub-01  patient
sub-02  control

See Participants file.

Thanks @effigies, the link is very useful.
Can I ask you another question? I would like to include the group column information in the participant label like: sub-01-patient
I updated the participants.tsv as you suggested:

participant_id  group
sub-01  patient
sub-02  control

however, what is the purpose of the group column? Is it just there for organization? Can I somehow attach the labels in this column to the participant_id during the fmriprep call? or will I have to manually re-label every subject like this?:

participant_id  group
sub-01-patient  patient
sub-02-control  control

Thanks!

- is not a valid character in a label. But you could do sub-01patient or sub-patient01.

The group column is just an arbitrary name to associate a value with each participant. It could be called anything you like.

As in, filter subjects by group when calling fMRIPrep? There is currently no functionality there, although it’s certainly possible to add. At present, though, you can use Unix utilities to select a group to process like so:

PATIENTS=$(grep patient $DATASET/participants.tsv | cut -f1 | sed -e "s/^sub-//")
fmriprep ... --participant-label $PATIENTS
1 Like