From 0513a250407eea7c370fccfe77b7f70eb36d907e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20tom=20W=C3=B6rden?= <h.tomwoerden@indiscale.com> Date: Fri, 22 Sep 2023 21:08:54 +0200 Subject: [PATCH] ENH: distinguish between side car file and t1weighted image --- src/bids-cfood/cfood.yml | 7 ++++++- src/bids-cfood/model.yml | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/bids-cfood/cfood.yml b/src/bids-cfood/cfood.yml index 348f763..41b210d 100644 --- a/src/bids-cfood/cfood.yml +++ b/src/bids-cfood/cfood.yml @@ -34,10 +34,11 @@ metadata: params: suffix: null parent: null + extension: "[.a-zA-Z0-9]+" definition: ${parent}_datafile: type: SimpleFile - match: ^sub-(?P<sub>[a-zA-Z0-9]+)(_ses-(?P<ses>[a-zA-Z0-9]+))?(_acq-(?P<acq>[a-zA-Z0-9]+))?(_ce-(?P<ce>[a-zA-Z0-9]+))?(_rec-(?P<rec>[a-zA-Z0-9]+))?(_run-(?P<run>[a-zA-Z0-9]+))?(_mod-(?P<mod>[a-zA-Z0-9]+))?(_echo-(?P<echo>[a-zA-Z0-9]+))?(_inv-(?P<inv>[a-zA-Z0-9]+))?(_flip-(?P<flip>[a-zA-Z0-9]+))?(_mt-(?P<mt>[a-zA-Z0-9]+))?(_part-(?P<part>[a-zA-Z0-9]+))?(_(?P<suffix>${suffix}))?\.(?P<extension>[.a-zA-Z0-9]+)$ + match: ^sub-(?P<sub>[a-zA-Z0-9]+)(_ses-(?P<ses>[a-zA-Z0-9]+))?(_acq-(?P<acq>[a-zA-Z0-9]+))?(_ce-(?P<ce>[a-zA-Z0-9]+))?(_rec-(?P<rec>[a-zA-Z0-9]+))?(_run-(?P<run>[a-zA-Z0-9]+))?(_mod-(?P<mod>[a-zA-Z0-9]+))?(_echo-(?P<echo>[a-zA-Z0-9]+))?(_inv-(?P<inv>[a-zA-Z0-9]+))?(_flip-(?P<flip>[a-zA-Z0-9]+))?(_mt-(?P<mt>[a-zA-Z0-9]+))?(_part-(?P<part>[a-zA-Z0-9]+))?(_(?P<suffix>${suffix}))?\.(?P<extension>${extension})$ records: someFile: parents: @@ -476,6 +477,10 @@ project_level: parent: "MagnetizationTransferSaturation" - suffix: T1w parent: "T1WeightedImage" + extension: "(nii(\.gz))?" + - suffix: T1w + parent: "JSONSidecar" + extension: "json" - suffix: T2starw parent: "T2starWeightedImage" - suffix: inplaneT1 diff --git a/src/bids-cfood/model.yml b/src/bids-cfood/model.yml index c4ce95b..8b9f2f5 100644 --- a/src/bids-cfood/model.yml +++ b/src/bids-cfood/model.yml @@ -66,6 +66,7 @@ Subject: Session: label: datatype: TEXT +JSONSidecar: Session: description: "A logical grouping of neuroimaging and behavioral data consistent across subjects. Session can (but doesn't have to) be synonymous to a visit in a longitudinal study. In general, subjects will stay in the scanner during one session. However, for example, if a subject has to leave the scanner room and then be re-positioned on the scanner bed, the set of MRI acquisitions will still be considered as a session and match sessions acquired in other subjects. Similarly, in situations where different data types are obtained over several visits (for example fMRI on one day followed by DWI the day after) those can be grouped in one session. Defining multiple sessions is appropriate when several identical or similar data acquisitions are planned and performed on all -or most- subjects, often in the case of some intervention between sessions (for example, training). https://bids-specification.readthedocs.io/en/stable/appendices/entities.html#ses" -- GitLab