From 79f1e22cdd18a02ea1ea8b6617ea66827466adbf Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Thu, 25 Apr 2024 18:31:17 -0400 Subject: [PATCH] Formalize BIDSEntitiesLayout Aims to provide a solution to - https://github.com/bids-standard/bids-2-devel/issues/54 ### Name rationale: Originally I thought to name it BIDSLayout but that one was/is used as a class in pybids. On one hand it is great because corresponds in "principles". But I thought to avoid confusion at least ATM so to make it easier to find issues/code where such a term is used/mentioned. So for now decided to go with BIDSEntitiesLayout but it would be easy to change to anything we want. --- src/modality-agnostic-files.md | 97 ++++++++++++++++++++++++++++++++ src/schema/objects/metadata.yaml | 8 +++ 2 files changed, 105 insertions(+) diff --git a/src/modality-agnostic-files.md b/src/modality-agnostic-files.md index c6890aa6b4..e928abebdb 100644 --- a/src/modality-agnostic-files.md +++ b/src/modality-agnostic-files.md @@ -30,6 +30,7 @@ and a guide for using macros can be found at { "Name": "REQUIRED", "BIDSVersion": "REQUIRED", + "BIDSEntitiesLayout": "REQUIRED if layout is not just sub-*/", "HEDVersion": "RECOMMENDED", "DatasetLinks": "REQUIRED if [BIDS URIs][] are used", "DatasetType": "RECOMMENDED", @@ -103,6 +104,102 @@ Example: } ``` +#### BIDS Entities Layout + +The `BIDSEntitiesLayout` field is REQUIRED if the layout of the dataset is not just `sub-*/` of a typical BIDS 1.0 dataset without sessions. + +The `BIDSEntitiesLayout` field is an object where keys are directory names and values are lists of objects describing order of entities defining hierarchy and/or file name prefixes that are expected to be found in the directory. + +**TODO**: define "Entity" and "Datatype" in glossary. + +**TODO**: check if *concept* is the best term to use here. + +It could be an [entity](appendix/entity-table.md) or the [datatype](glossary.md#datatype) concept to define that level of the hierarchy. + +By default, each level represented both as a directory and a prefix in the file name, e.g. having `subject` entity would establish `sub-