Naming Convention with additional suffixes?

Skip to first unread message

F Press

Mar 23, 2022, 7:12:59 AM3/23/22
to bids-discussion
If you wanted to add a suffix to sub01 so that you can add your own participant identifier and/or group (i.e. control or patient), would that be allowed?  e.g sub01_a

If not, are there any workarounds? I find that these make building 2nd level models easier when you can quickly add all participants with a certain suffix.

Many thanks for your help,

Erdal Karaca

Mar 23, 2022, 7:26:15 AM3/23/22
That pattern does not comply with the naming convention.
What is wrong with, e.g., sub-01a?

Using pybids or ancpBIDS (both Python libraries), you could then filter the files of interest:

layout = BIDSLayout(your_dataset_path)
file_paths = layout.get(sub='*a', return_type='file')

We are all colleagues working together to shape brain imaging for tomorrow, please be respectful, gracious, and patient with your fellow group members.
You received this message because you are subscribed to the Google Groups "bids-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

Remi Gau

Mar 23, 2022, 7:33:17 AM3/23/22
to, Erdal Karaca

Same with BIDS matlab

BIDS = bids.layout(your_dataset_path);

subjects = bids.query(BIDS, 'subjects', 'sub', '*a');

files = bids.query(BIDS, 'data', 'sub', '*a');

Dr Cyril Pernet

Mar 23, 2022, 7:49:01 AM3/23/22
Hi Fiona,

sub-  is the only ting you must have, what comes after is up to you eg
sub-control0001, sub-patient0002, sub-control0003, etc ... even
numbering is not mandatory eg sub-controlAHK, sub-controlGHR,


Reply all
Reply to author
0 new messages