Naming Convention with additional suffixes?

9 views
Skip to first unread message

F Press

unread,
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,
Fiona

Erdal Karaca

unread,
Mar 23, 2022, 7:26:15 AM3/23/22
to bids-di...@googlegroups.com
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 bids-discussi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bids-discussion/efe45ef8-3c00-4b41-b520-11b2fc12b79an%40googlegroups.com.

Remi Gau

unread,
Mar 23, 2022, 7:33:17 AM3/23/22
to bids-di...@googlegroups.com, 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

unread,
Mar 23, 2022, 7:49:01 AM3/23/22
to bids-di...@googlegroups.com, fiona....@gmail.com
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,
sub-patientGFR,

cyril


Reply all
Reply to author
Forward
0 new messages