Skip to content

Commit fb4f5a4

Browse files
committed
Move and extend description and definition of DatasetType "project"
1 parent 009c8b6 commit fb4f5a4

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
@@ -275,51 +275,6 @@ However, in the case that these data are to be included:
275275
We RECOMMEND including the PDF print-out with the actual sequence
276276
parameters generated by the scanner in the `sourcedata` directory.
277277

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

325280
Sharing source data may help amend errors and missing data discovered
@@ -443,6 +398,53 @@ In particular, if a BIDS dataset contains a `derivatives/` subdirectory,
443398
the contents of that directory may be a heterogeneous mix of BIDS Derivatives
444399
datasets and non-compliant derivatives.
445400
401+
## Project dataset
402+
403+
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
404+
405+
<!-- This block generates a file tree.
406+
A guide for using macros can be found at
407+
https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md
408+
-->
409+
{{ MACROS___make_filetree_example(
410+
{
411+
"my_project-1": {
412+
"sourcedata": {
413+
"dicoms": {},
414+
"raw": {
415+
"sub-01": {},
416+
"sub-02": {},
417+
"...": "",
418+
"dataset_description.json": "",
419+
"...": "",
420+
},
421+
"..." : "",
422+
},
423+
"derivatives": {
424+
"pipeline_1": {},
425+
"pipeline_2": {},
426+
"...": "",
427+
},
428+
"dataset_description.json": "",
429+
"...": "",
430+
}
431+
}
432+
) }}
433+
434+
In this example, `sourcedata/dicoms` is not nested inside
435+
`sourcedata/raw`, **and only the `sourcedata/raw` subdirectory** is a BIDS-compliant dataset among `sourcedata/` subfolders.
436+
The subdirectories of `derivatives` MAY be BIDS-compliant derivatives datasets
437+
(see [Non-compliant derivatives](#non-compliant-derivatives) for further discussion).
438+
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.
439+
When using this convention, `dataset_description.json` MUST have `DatasetType` to be set to `"project"`. It is also RECOMMENDED to set the `SourceDatasets`
440+
field in `dataset_description.json` of each subdirectory of `derivatives` to:
441+
442+
```JSON
443+
{
444+
"SourceDatasets": [ {"URL": "../../sourcedata/raw/"} ]
445+
}
446+
```
447+
446448
## File format specification
447449

448450
### Imaging files

src/schema/objects/enums.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1319,6 +1319,11 @@ derivative:
13191319
display_name: derivative
13201320
description: |
13211321
A derived BIDS dataset.
1322+
project:
1323+
value: project
1324+
display_name: project
1325+
description: |
1326+
A project BIDS dataset.
13221327
balanced:
13231328
value: balanced
13241329
display_name: balanced

src/schema/objects/metadata.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -583,6 +583,7 @@ DatasetType:
583583
enum:
584584
- $ref: objects.enums.raw.value
585585
- $ref: objects.enums.derivative.value
586+
- $ref: objects.enums.project.value
586587
DecayCorrectionFactor:
587588
name: DecayCorrectionFactor
588589
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)