Skip to content

Commit c561958

Browse files
committed
Remove cohort as an explicit entity
1 parent f46370a commit c561958

File tree

6 files changed

+26
-67
lines changed

6 files changed

+26
-67
lines changed

src/common-principles.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,7 @@ in that directory.
130130

131131
**Specific structure of derived data**.
132132
In the case of [storing derived data (see below)](#source-vs-raw-vs-derived-data),
133-
template (`tpl-<label>`) directories may be found at the root of the dataset,
134-
and these may include cohort (`cohort-<label>`) subdirectories.
133+
template (`tpl-<label>`) directories may be found at the root of the dataset.
135134
These directories are described in [Templates and atlases](derivatives/atlas.md).
136135

137136
### Other top level directories
@@ -415,9 +414,7 @@ possible (that is, unless explicitly contradicted for derivatives).
415414
Any subject-specific derivatives SHOULD be housed within each subject's directory;
416415
if session-specific derivatives are generated, they SHOULD be deposited under a
417416
session subdirectory within the corresponding subject directory; and so on.
418-
Likewise, any template-specific derivatives SHOULD be housed within each template's directory;
419-
if cohort-specific derivatives are generated, they SHOULD be deposited under a
420-
cohort subdirectory within the corresponding template directory; and so on.
417+
Likewise, any template-specific derivatives SHOULD be housed within each template's directory.
421418
422419
### Non-compliant derivatives
423420

src/derivatives/atlas.md

Lines changed: 24 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,8 @@ Template:
3636
```Text
3737
<pipeline_name>/
3838
tpl-<label>/
39-
[cohort-<label>/]
40-
[<datatype>/]
41-
tpl-<label>[_cohort-<label>][_<entities>]_<suffix>.<extension>
39+
[<datatype>/]
40+
tpl-<label>[_<entities>]_<suffix>.<extension>
4241
```
4342

4443
where [`suffix`](../glossary.md#suffix-common_principles) is any valid BIDS suffix
@@ -47,24 +46,11 @@ such as `T1w` or `PET`; and
4746
such as `nii[.gz]`, `dscalar.nii[.gz]`, `dlabel.nii[.gz]`, `label.gii`, `tsv`, or `json`.
4847
Templates and atlases do not establish new suffixes or extensions,
4948
but any valid BIDS/BIDS Derivatives filename is permitted in a template directory,
50-
substituting `tpl` for `sub` and `cohort` for `ses`.
49+
substituting `tpl` for `sub`.
5150

5251
The [`<datatype>/` directory](../glossary.md#data_type-common_principles) MAY be omitted in the case
5352
only one data type (such as `anat/`) is stored under the `tpl-<label>/` directory.
5453

55-
The [`cohort-<label>` directory and entity](../appendices/entities.md#cohort) MUST be specified for templates
56-
with several cohorts.
57-
58-
!!! note "Dataset structure"
59-
60-
In templates/atlases the [`tpl-<label>`](../appendices/entities.md#tpl) and
61-
[`cohort-<label>`](../appendices/entities.md#cohort) entities are structurally
62-
analogous to the [`sub-<label>`](../appendices/entities.md#sub)
63-
and [`ses-<label>`](../appendices/entities.md#ses) entities,
64-
appearing as both directories and entities.
65-
The [`cohort-<label>`](../appendices/entities.md#cohort) entity is used
66-
to track mappings of arbitrary subject/session pairs.
67-
6854
In BIDS, a template is considered *any* aggregation of data and the `tpl-` entity
6955
replaces the subject-level `sub-` entity when aggregating data across subjects.
7056
The `tpl-` entity and `sub-` entity are mutually exclusive in a given file.
@@ -107,34 +93,32 @@ A guide for using macros can be found at
10793

10894
### Example: Multi-cohort template
10995

110-
In the case that the template-generating pipeline derives
111-
several cohorts, the file structure must employ the
112-
[`cohort-<label>` directory and entity](../appendices/entities.md#cohort).
96+
In the case that the template-generating pipeline derives several related templates,
97+
each template is assigned a unique label.
98+
In this example, a common prefix is used to indicate a family of related templates:
11399

114100
<!-- This block generates a file tree.
115101
A guide for using macros can be found at
116102
https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md
117103
-->
118104
{{ MACROS___make_filetree_example({
119105
"mnipediatricasym-pipeline": {
120-
"tpl-MNIPediatricAsym": {
121-
"cohort-1": {
122-
"tpl-MNIPediatricAsym_cohort-1_T1w.nii.gz": "",
123-
"tpl-MNIPediatricAsym_cohort-1_T2w.nii.gz": "",
124-
"tpl-MNIPediatricAsym_cohort-1_PDw.nii.gz": "",
125-
"tpl-MNIPediatricAsym_cohort-1_desc-brain_mask.nii.gz": "",
126-
"tpl-MNIPediatricAsym_cohort-1_probseg.nii.gz": "",
127-
"tpl-MNIPediatricAsym_cohort-1_probseg.json": "",
128-
},
129-
"...": "",
130-
"cohort-6": {
131-
"tpl-MNIPediatricAsym_cohort-6_T1w.nii.gz": "",
132-
"tpl-MNIPediatricAsym_cohort-6_T2w.nii.gz": "",
133-
"tpl-MNIPediatricAsym_cohort-6_PDw.nii.gz": "",
134-
"tpl-MNIPediatricAsym_cohort-6_desc-brain_mask.nii.gz": "",
135-
"tpl-MNIPediatricAsym_cohort-6_probseg.nii.gz": "",
136-
"tpl-MNIPediatricAsym_cohort-6_probseg.json": "",
137-
},
106+
"tpl-MNIPediatricAsym+1": {
107+
"tpl-MNIPediatricAsym+1_T1w.nii.gz": "",
108+
"tpl-MNIPediatricAsym+1_T2w.nii.gz": "",
109+
"tpl-MNIPediatricAsym+1_PDw.nii.gz": "",
110+
"tpl-MNIPediatricAsym+1_desc-brain_mask.nii.gz": "",
111+
"tpl-MNIPediatricAsym+1_probseg.nii.gz": "",
112+
"tpl-MNIPediatricAsym+1_probseg.json": "",
113+
},
114+
"...": "",
115+
"tpl-MNIPediatricAsym+6": {
116+
"tpl-MNIPediatricAsym+6_T1w.nii.gz": "",
117+
"tpl-MNIPediatricAsym+6_T2w.nii.gz": "",
118+
"tpl-MNIPediatricAsym+6_PDw.nii.gz": "",
119+
"tpl-MNIPediatricAsym+6_desc-brain_mask.nii.gz": "",
120+
"tpl-MNIPediatricAsym+6_probseg.nii.gz": "",
121+
"tpl-MNIPediatricAsym+6_probseg.json": "",
138122
},
139123
}
140124
})
@@ -192,9 +176,8 @@ Template:
192176
<pipeline_name>/
193177
atlas-<label>_description.json
194178
tpl-<label>/
195-
[cohort-<label>/]
196-
[<datatype>/]
197-
tpl-<label>[_cohort-<label>][_<entities>]_<suffix>.<extension>
179+
[<datatype>/]
180+
tpl-<label>[_<entities>]_<suffix>.<extension>
198181
```
199182

200183
### Atlas identification and metadata

src/schema/meta/templates.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,4 +163,3 @@ atlas:
163163
base:
164164
entities:
165165
template: required
166-
cohort: optional

src/schema/objects/entities.yaml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,6 @@ ceagent:
4444
`"ContrastBolusIngredient"` MAY also be added in the JSON file, with the same label.
4545
type: string
4646
format: label
47-
cohort:
48-
name: cohort
49-
display_name: Cohort
50-
description: |
51-
A set of subjects sharing one or more common characteristics.
52-
53-
In the context of a template, the `cohort-<label>` entity identifies a subset of
54-
subjects or sessions that were used to construct template variations.
55-
For example, a developmental template may use scans from participants of different ages,
56-
longitudinal sessions of the same participants, or a combination of the two.
57-
type: string
58-
format: label
5947
chunk:
6048
name: chunk
6149
display_name: Chunk

src/schema/rules/directories.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,6 @@ derivative:
119119
name: code
120120
level: optional
121121
opaque: true
122-
cohort:
123-
entity: cohort
124-
level: optional
125-
opaque: false
126-
subdirs:
127-
- datatype
128122
docs:
129123
name: docs
130124
level: optional
@@ -167,7 +161,6 @@ derivative:
167161
level: optional
168162
opaque: false
169163
subdirs:
170-
- cohort
171164
- datatype
172165
datatype:
173166
value: datatype

src/schema/rules/entities.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
- subject
55
- template
66
- session
7-
- cohort
87
- sample
98
- task
109
- tracksys

0 commit comments

Comments
 (0)