Skip to content

Commit 2d9bfdf

Browse files
committed
Move and extend description and definition of DatasetType "project"
1 parent 37c32f5 commit 2d9bfdf

File tree

4 files changed

+55
-46
lines changed

4 files changed

+55
-46
lines changed

src/common-principles.md

Lines changed: 47 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -270,51 +270,6 @@ However, in the case that these data are to be included:
270270
We RECOMMEND including the PDF print-out with the actual sequence
271271
parameters generated by the scanner in the `sourcedata` directory.
272272

273-
Alternatively one can organize their data in the following way
274-
275-
<!-- This block generates a file tree.
276-
A guide for using macros can be found at
277-
https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md
278-
-->
279-
{{ MACROS___make_filetree_example(
280-
{
281-
"my_dataset-1": {
282-
"sourcedata": {
283-
"dicoms": {},
284-
"raw": {
285-
"sub-01": {},
286-
"sub-02": {},
287-
"...": "",
288-
"dataset_description.json": "",
289-
"...": "",
290-
},
291-
"..." : "",
292-
},
293-
"derivatives": {
294-
"pipeline_1": {},
295-
"pipeline_2": {},
296-
"...": "",
297-
},
298-
"dataset_description.json": "",
299-
"...": "",
300-
}
301-
}
302-
) }}
303-
304-
In this example, `sourcedata/dicoms` is not nested inside
305-
`sourcedata/raw`, **and only the `sourcedata/raw` subdirectory** is a BIDS-compliant dataset among `sourcedata/` subfolders.
306-
The subdirectories of `derivatives` MAY be BIDS-compliant derivatives datasets
307-
(see [Non-compliant derivatives](#non-compliant-derivatives) for further discussion).
308-
The above example is a fully compliant BIDS dataset, providing a convention useful for organizing source, raw BIDS, and derived BIDS data while maintaining overall BIDS compliance.
309-
When using this convention it is RECOMMENDED to set the `SourceDatasets`
310-
field in `dataset_description.json` of each subdirectory of `derivatives` to:
311-
312-
```JSON
313-
{
314-
"SourceDatasets": [ {"URL": "../../sourcedata/raw/"} ]
315-
}
316-
```
317-
318273
!!! danger "Caution"
319274

320275
Sharing source data may help amend errors and missing data discovered
@@ -438,6 +393,53 @@ In particular, if a BIDS dataset contains a `derivatives/` subdirectory,
438393
the contents of that directory may be a heterogeneous mix of BIDS Derivatives
439394
datasets and non-compliant derivatives.
440395
396+
## Project dataset
397+
398+
BIDS allows one to organize the data for the entire project (original source data, raw BIDS, derivatives) as a valid BIDS dataset in the following way
399+
400+
<!-- This block generates a file tree.
401+
A guide for using macros can be found at
402+
https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md
403+
-->
404+
{{ MACROS___make_filetree_example(
405+
{
406+
"my_project-1": {
407+
"sourcedata": {
408+
"dicoms": {},
409+
"raw": {
410+
"sub-01": {},
411+
"sub-02": {},
412+
"...": "",
413+
"dataset_description.json": "",
414+
"...": "",
415+
},
416+
"..." : "",
417+
},
418+
"derivatives": {
419+
"pipeline_1": {},
420+
"pipeline_2": {},
421+
"...": "",
422+
},
423+
"dataset_description.json": "",
424+
"...": "",
425+
}
426+
}
427+
) }}
428+
429+
In this example, `sourcedata/dicoms` is not nested inside
430+
`sourcedata/raw`, **and only the `sourcedata/raw` subdirectory** is a BIDS-compliant dataset among `sourcedata/` subfolders.
431+
The subdirectories of `derivatives` MAY be BIDS-compliant derivatives datasets
432+
(see [Non-compliant derivatives](#non-compliant-derivatives) for further discussion).
433+
The above example is a fully compliant BIDS dataset, providing a convention useful for organizing source, raw BIDS, and derived BIDS data while maintaining overall BIDS compliance.
434+
When using this convention, `dataset_description.json` MUST have `DatasetType` to be set to `"project"`. It is also RECOMMENDED to set the `SourceDatasets`
435+
field in `dataset_description.json` of each subdirectory of `derivatives` to:
436+
437+
```JSON
438+
{
439+
"SourceDatasets": [ {"URL": "../../sourcedata/raw/"} ]
440+
}
441+
```
442+
441443
## File format specification
442444

443445
### Imaging files

src/schema/objects/enums.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1296,6 +1296,11 @@ derivative:
12961296
display_name: derivative
12971297
description: |
12981298
A derived BIDS dataset.
1299+
project:
1300+
value: project
1301+
display_name: project
1302+
description: |
1303+
A project BIDS dataset.
12991304
balanced:
13001305
value: balanced
13011306
display_name: balanced

src/schema/objects/metadata.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,7 @@ DatasetType:
553553
enum:
554554
- $ref: objects.enums.raw.value
555555
- $ref: objects.enums.derivative.value
556+
- $ref: objects.enums.project.value
556557
DecayCorrectionFactor:
557558
name: DecayCorrectionFactor
558559
display_name: Decay Correction Factor

src/schema/rules/checks/dataset.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ SubjectFolders:
66
issue:
77
code: SUBJECT_FOLDERS
88
message: |
9-
There are no subject directories (labeled "sub-*") in the root of this dataset.
9+
There are no subject directories (labeled "sub-*") in the root of this raw BIDS dataset.
1010
level: error
1111
selectors:
1212
- path == '/dataset_description.json'
13+
- dataset.dataset_description.DatasetType == "raw"
1314
checks:
1415
- length(dataset.subjects.sub_dirs) > 0
1516

0 commit comments

Comments
 (0)