Skip to content

Commit dce96f0

Browse files
committed
fix commits from code review
1 parent bf83ec1 commit dce96f0

File tree

1 file changed

+44
-3
lines changed

1 file changed

+44
-3
lines changed

docs/getting_started/folders_and_files/derivatives.md

Lines changed: 44 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,14 +177,55 @@ all possible derivatives produced from them.
177177
This independence affords flexibility in the relative organization of datasets.
178178
The following examples show three ways to organize:
179179

180+
The following examples show three ways to organize:
181+
180182
#### 1. BIDS Raw with derivatives/
181183

182-
A collection of derivative datasets may be stored in the `derivatives/` subdirectory
183-
@@ -199,31 +201,46 @@
184-
analysis/
184+
A collection of derivative datasets may be stored in the `derivatives/` subdirectory. Disadvantage is that such organization would complicate distribution of the raw BIDS dataset
185+
by itself as it would require explicit exclusion of datasets within its `derivatives/` folder.
186+
187+
#### 2. BIDS Derivative with sourcedata/raw
188+
189+
A BIDS Derivative dataset may contain references to its input datasets
190+
(could be BIDS Raw, non-BIDS or even other BIDS Derivatives) in the `sourcedata/` subdirectory:
191+
192+
```bash
193+
my_analysis/
194+
sourcedata/
195+
raw/
196+
sub-01/
197+
...
198+
dataset_description.json
199+
preprocessed/
185200
sub-01/
186201
...
187202
dataset_description.json
188203
```
189204

205+
Note that the `sourcedata/` and `derivatives/` subdirectories constitute dataset boundaries.
206+
Any subfolders of these directories may be validated independently, if they are BIDS datasets
207+
which would be indicated by presence of `dataset_description.json` file(s) in them with a
208+
REQUIRED `"BIDSVersion"` key.
209+
It is important to note that their contents must not affect the interpretation of the nested
210+
or containing datasets.
211+
212+
One potential disadvantage to nesting a BIDS Derivative dataset inside a BIDS Raw dataset, or vice versa,
213+
is that packaging them for independent sharing or publication can become more complicated.
214+
215+
#### 3. BIDS Study with sourcedata/raw and derivatives/
216+
217+
It is also possible to completely avoid nesting of BIDS Raw datasets into BIDS Derivative datasets (or vice versa),
218+
by simply placing them in separate folders, namely `sourcedata/` and `derivatives/` at root level:
219+
220+
```bash
221+
my_study/
222+
sourcedata/
223+
raw/
224+
sub-01/
225+
...
226+
derivatives/
227+
preprocessed/
228+
analysis/
229+
```
230+
190231
<!-- TODO derivatives JSON -->

0 commit comments

Comments
 (0)