Mixing datatype between subject and session level

43 views
Skip to first unread message

Joseph Ziminski

unread,
Sep 28, 2023, 5:27:55 AM9/28/23
to bids-discussion
Dear BIDS Community,

I have a question about mixing subject and session level datatypes. It is allowed in BIDS to place data-type folders at either the subject or session level, for example in the case that there is only one session.

However, is it allowed to mix the level of data-type depending on whether the datatype was collected across multiple sessions? For example, is the following structure BIDS compliant?

.
└── sub-001/
    ├── ses-001/
    │   └── func
    ├── ses-002  /
    │   └── func
    └── anat

Apologies if this question has been answered before I could not find  this on the google group or specification.

I ask becase we (the neuroinformatics unit at Sainsbury Wellcome Centre, London) are designing a lightweight version of BIDS to encourage researchers to get started with BIDS-like folder organisation, called NeuroBlueprint. This aims to be a subset of BIDS, but within this subset we want to be completely BIDS-compliant.

Best Wishes,
Joe

Dr Cyril Pernet

unread,
Sep 28, 2023, 9:21:38 AM9/28/23
to bids-di...@googlegroups.com

Hi Joe

I'm guessing anat has been acquired during ses-001 or ses-002, so it should go in there (and actually must, ie not allowed as you present it)

If your issue is assigning particular scans you can use a metadata field called 'intended for' https://bids-specification.readthedocs.io/en/stable/glossary.html#intendedfor-sense-1-metadata

Cyril


--
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/be977a96-a4e6-46ec-9f4f-10fef9793a26n%40googlegroups.com.
-- 
Dr Cyril Pernet, PhD, OHBM fellow, SSI fellow
Neurobiology Research Unit
Copenhagen University Hospital, Rigshospitalet
Building 8057, Blegdamsvej 9
DK-2100 Copenhagen, Denmark

wamc...@gmail.com
https://cpernet.github.io/
https://orcid.org/0000-0003-4010-4632

Chris Markiewicz

unread,
Sep 28, 2023, 10:21:10 AM9/28/23
to bids-di...@googlegroups.com
I think it is generally within the spirit of BIDS that you do not have session and non-session data within a dataset. For the case described, I've seen the following pattern:

sub-01/ses-anat/
sub-01/ses-func01/
sub-01/ses-func02/
...

That said, a strict reading of https://bids-specification.readthedocs.io/en/latest/common-principles.html#filesystem-structure does not seem to me to disallow a structure like Joe describes, and I don't think the validator would error (worth trying...). I also don't see a lot of added value to starting to enforce a restriction here, as the dataset would be understandable and machine-queryable, if a bit unusual.

Chris


Remi Gau

unread,
Sep 28, 2023, 10:33:00 AM9/28/23
to bids-di...@googlegroups.com, Chris Markiewicz

When it comes to raw BIDS see previous answers.

Not that I quickly check and the latest version of the validator does NOT error on this modified BIDS example:

ds006/
├── sub-01
│   ├── anat                                            <-- moved and renamed anat folder
│   │   ├── sub-01_inplaneT2.nii.gz
│   │   └── sub-01_T1w.nii.gz
│   ├── ses-post
│   │   └── func
│   └── ses-pre
│       ├── anat
│       └── func
├── sub-02


Note that bids-matlab does not "like" this type of unusual structure.


Note that for derivatives you may come across data that has been averaged across sessions and where the session folder and entity has been "dropped" because it is no longer relevant.

This is typically what fmriprep does: for example https://github.com/OpenNeuroDerivatives/ds000017-fmriprep/tree/main/sub-1

But this is BIDS derivatives not raw.


@+

Rémi

Joseph Ziminski

unread,
Dec 5, 2023, 6:20:52 AM12/5/23
to bids-discussion
Hi Everyone,

Very sorry for the delay in reply! These responses were very useful for our discussions, thanks a lot for your help in understanding this case.  For our purposes we have fixed it such that the session level folders must be present, to simplify design of a tool datashuttle we are implementing to create / transfer BIDS-like projects. Thanks for your help!
Reply all
Reply to author
Forward
0 new messages