Skip to content

Commit 6070069

Browse files
authored
Merge pull request bids-standard#2177 from yarikoptic/enh-pipeline
DOC: make mentioning of pipeline_name consistent
2 parents bbcd79d + 944f634 commit 6070069

File tree

8 files changed

+35
-35
lines changed

8 files changed

+35
-35
lines changed

src/common-principles.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ Derivatives can be stored/distributed in two ways:
309309
Different components of a pipeline can, however, also be stored under different
310310
subdirectories.
311311
There are few restrictions on the directory names;
312-
it is RECOMMENDED to use the format `<pipeline>-<variant>` in cases where
312+
it is RECOMMENDED to use the format `<pipeline-name>-<variant>` in cases where
313313
it is anticipated that the same pipeline will output more than one variant
314314
(for example, `AFNI-blurring` and `AFNI-noblurring`).
315315
For the sake of consistency, the subdirectory name SHOULD be
@@ -381,7 +381,7 @@ Derivatives can be stored/distributed in two ways:
381381
382382
Throughout this specification, if a section applies particularly to derivatives,
383383
then Case 1 will be assumed for clarity in templates and examples, but removing
384-
`/derivatives/<pipeline>` from the template name will provide the equivalent for
384+
`/derivatives/<pipeline-name>[-<variant>]` from the template name will provide the equivalent for
385385
Case 2.
386386
In both cases, every derivatives dataset is considered a BIDS dataset and must
387387
include a `dataset_description.json` file at the root level (see
@@ -423,8 +423,8 @@ A guide for using macros can be found at
423423
"..." : "",
424424
},
425425
"derivatives": {
426-
"pipeline_1": {},
427-
"pipeline_2": {},
426+
"pipeline1-v1": {},
427+
"pipeline2": {},
428428
"...": "",
429429
},
430430
"dataset_description.json": "",

src/derivatives/common-data-types.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,11 @@ A guide for using macros can be found at
178178
Template:
179179

180180
```Text
181-
<pipeline_name>/
181+
<pipeline-name>/
182182
sub-<label>/
183183
[ses-<label>/]
184184
<datatype>/
185-
<source_entities>[_space-<space>][_desc-<label>]_<suffix>.<extension>
185+
<source-entities>[_space-<space>][_desc-<label>]_<suffix>.<extension>
186186
```
187187

188188
Data is considered to be *preprocessed* or *cleaned* if the data type of the input,

src/derivatives/imaging.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ extent and resolution.
88
Template:
99

1010
```Text
11-
<pipeline_name>/
11+
<pipeline-name>/
1212
sub-<label>/
1313
[ses-<label>/]
1414
<datatype>/
15-
<source_entities>[_space-<space>][_res-<label>][_den-<label>][_desc-<label>]_<suffix>.<extension>
15+
<source-entities>[_space-<space>][_res-<label>][_den-<label>][_desc-<label>]_<suffix>.<extension>
1616
```
1717

1818
Volumetric preprocessing does not modify the number of dimensions, and so
@@ -146,12 +146,12 @@ And the corresponding `sub-001_task-rest_run-1_space-fsLR_bold.json` file:
146146
Template:
147147

148148
```Text
149-
<pipeline_name>/
149+
<pipeline-name>/
150150
sub-<label>/
151151
[ses-<label>/]
152152
anat|func|dwi/
153-
<source_entities>[_space-<space>][_res-<label>][_label-<label>][_desc-<label>]_mask.json
154-
<source_entities>[_space-<space>][_res-<label>][_label-<label>][_desc-<label>]_mask.nii[.gz]
153+
<source-entities>[_space-<space>][_res-<label>][_label-<label>][_desc-<label>]_mask.json
154+
<source-entities>[_space-<space>][_res-<label>][_label-<label>][_desc-<label>]_mask.nii[.gz]
155155
```
156156

157157
A binary (1 - inside, 0 - outside) mask in the space defined by the [`space` entity](../appendices/entities.md#space).
@@ -265,13 +265,13 @@ of how integer values map to anatomical structures.
265265
Template:
266266

267267
```Text
268-
<pipeline_name>/
268+
<pipeline-name>/
269269
sub-<label>/
270270
[ses-<label>/]
271271
anat|func|dwi/
272-
<source_entities>[_space-<space>][_seg-<label>][_res-<label>][_desc-<label>]_dseg.json
273-
<source_entities>[_space-<space>][_seg-<label>][_res-<label>][_desc-<label>]_dseg.nii[.gz]
274-
<source_entities>[_space-<space>][_seg-<label>][_res-<label>][_desc-<label>]_dseg.tsv
272+
<source-entities>[_space-<space>][_seg-<label>][_res-<label>][_desc-<label>]_dseg.json
273+
<source-entities>[_space-<space>][_seg-<label>][_res-<label>][_desc-<label>]_dseg.nii[.gz]
274+
<source-entities>[_space-<space>][_seg-<label>][_res-<label>][_desc-<label>]_dseg.tsv
275275
```
276276

277277
Example:
@@ -332,12 +332,12 @@ the structure.
332332
Template:
333333

334334
```Text
335-
<pipeline_name>/
335+
<pipeline-name>/
336336
sub-<label>/
337337
[ses-<label>/]
338338
func|anat|dwi/
339-
<source_entities>[_space-<space>][_seg-<label>][_res-<label>][_label-<label>][_desc-<label>]_probseg.json
340-
<source_entities>[_space-<space>][_seg-<label>][_res-<label>][_label-<label>][_desc-<label>]_probseg.nii[.gz]
339+
<source-entities>[_space-<space>][_seg-<label>][_res-<label>][_label-<label>][_desc-<label>]_probseg.json
340+
<source-entities>[_space-<space>][_seg-<label>][_res-<label>][_label-<label>][_desc-<label>]_probseg.nii[.gz]
341341
```
342342

343343
Example:
@@ -408,14 +408,14 @@ CIFTI-2 dense label files, with the extension `.dlabel.nii`.
408408
Template:
409409

410410
```Text
411-
<pipeline_name>/
411+
<pipeline-name>/
412412
sub-<label>/
413413
[ses-<label>/]
414414
anat/
415-
<source_entities>[_hemi-{L|R}][_space-<space>][_seg-<label>][_res-<label>][_den-<label>][_desc-<label>]_dseg.json
416-
<source_entities>[_hemi-{L|R}][_space-<space>][_seg-<label>][_den-<label>][_desc-<label>]_dseg.label.gii
417-
<source_entities>[_hemi-{L|R}][_space-<space>][_seg-<label>][_res-<label>][_den-<label>][_desc-<label>]_dseg.dlabel.nii
418-
<source_entities>[_hemi-{L|R}][_space-<space>][_seg-<label>][_res-<label>][_den-<label>][_desc-<label>]_dseg.tsv
415+
<source-entities>[_hemi-{L|R}][_space-<space>][_seg-<label>][_res-<label>][_den-<label>][_desc-<label>]_dseg.json
416+
<source-entities>[_hemi-{L|R}][_space-<space>][_seg-<label>][_den-<label>][_desc-<label>]_dseg.label.gii
417+
<source-entities>[_hemi-{L|R}][_space-<space>][_seg-<label>][_res-<label>][_den-<label>][_desc-<label>]_dseg.dlabel.nii
418+
<source-entities>[_hemi-{L|R}][_space-<space>][_seg-<label>][_res-<label>][_den-<label>][_desc-<label>]_dseg.tsv
419419
```
420420

421421
The [`hemi-<label>`](../appendices/entities.md#hemi) entity is REQUIRED for GIFTI files storing information about

src/derivatives/introduction.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,12 @@ in [Derived dataset and pipeline description][derived-dataset-description].
6060
copy of that raw file.
6161

6262
- Each Derivatives filename MUST be of the form:
63-
`<source_entities>[_keyword-<value>]_<suffix>.<extension>`
63+
`<source-entities>[_keyword-<value>]_<suffix>.<extension>`
6464
(where `<value>` could either be an `<index>` or a `<label>` depending on
6565
the keyword; see [Definitions][definitions])
6666

6767
- When the derivatives chain involves outputs derived from a single raw input,
68-
`source_entities` MUST be the entire source filename, with the omission of
68+
`source-entities` MUST be the entire source filename, with the omission of
6969
the source suffix and extension. One exception to this rule is filename
7070
entities that are no longer relevant. Depending on the nature of the
7171
derivative file, the suffix can either be the same as the source file if

src/modality-agnostic-files/dataset-description.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ Example:
111111

112112
As for any BIDS dataset, a `dataset_description.json` file MUST be found at the
113113
top level of every derived dataset:
114-
`<dataset>/derivatives/<pipeline_name>/dataset_description.json`.
114+
`<dataset>/derivatives/<pipeline-name>/dataset_description.json`.
115115

116116
In contrast to raw BIDS datasets, derived BIDS datasets MUST include a
117117
`GeneratedBy` key:
@@ -130,8 +130,8 @@ and a guide for using macros can be found at
130130

131131
If a derived dataset is stored as a subdirectory of the raw dataset, then the `Name` field
132132
of the first `GeneratedBy` object MUST be a substring of the derived dataset directory name.
133-
That is, in a directory `<dataset>/derivatives/<pipeline>[-<variant>]/`, the first
134-
`GeneratedBy` object should have a `Name` of `<pipeline>`.
133+
That is, in a directory `<dataset>/derivatives/<pipeline-name>[-<variant>]/`, the first
134+
`GeneratedBy` object should have a `Name` of `<pipeline-name>`.
135135

136136
Example:
137137

src/schema/objects/metaentities.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ matches:
4343
4444
`<matches>` could correspond to `sub-control01_task-nback_run-1`.
4545
46-
source_entities:
46+
source-entities:
4747
display_name: source entities
4848
description: |
49-
`source_entities` is used as a placeholder in BIDS derivatives filenames templates.
49+
`source-entities` is used as a placeholder in BIDS derivatives filenames templates.
5050
51-
`source_entities` MUST be the entire source filename, with the omission of
51+
`source-entities` MUST be the entire source filename, with the omission of
5252
the source suffix and extension.
5353
One exception to this rule is filename entities that are no longer relevant.

src/schema/rules/metaentities.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# This file simply defines the order in which the meta-entities and placeholders are presented in the specification.
33
# The actual term definitions appear in `objects/metaentities.yaml`.
44
- matches
5-
- source_entities
5+
- source-entities

tools/schemacode/src/bidsschematools/render/text.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ def make_filename_template(
266266
If True, placeholder meta-entities will replace keyword-value entities in the
267267
filename.
268268
If ``dstype`` is ``"raw"``, the placeholder meta-entity is ``<matches>``.
269-
If ``dstype`` is ``"derivatives"``, the placeholder meta-entity is ``<source_entities>``.
269+
If ``dstype`` is ``"derivatives"``, the placeholder meta-entity is ``<source-entities>``.
270270
Default is False.
271271
empty_dirs: bool, optional
272272
If False, empty datatype directories are not included. If ``placeholders`` is True,
@@ -333,7 +333,7 @@ def make_filename_template(
333333
entity_list = schema.rules.entities
334334
start_string = ""
335335
if placeholders:
336-
metaentity_name = "matches" if dstype == "raw" else "source_entities"
336+
metaentity_name = "matches" if dstype == "raw" else "source-entities"
337337
start_string = (
338338
lt
339339
+ utils._link_with_html(
@@ -501,7 +501,7 @@ def append_filename_template_legend(text, pdf_format=False):
501501
legend = f"""{info_str}
502502
- `<matches>` is a placeholder to denote an arbitrary (and valid) sequence of entities
503503
and labels at the beginning of the filename (only BIDS "raw").
504-
- `<source_entities>` is a placeholder to denote an arbitrary sequence of entities and labels
504+
- `<source-entities>` is a placeholder to denote an arbitrary sequence of entities and labels
505505
at the beginning of the filename matching a source file from which the file derives
506506
(only BIDS-Derivatives).
507507
- Filename entities or directories between square brackets

0 commit comments

Comments
 (0)