Skip to content

Commit 4035e76

Browse files
authored
Merge branch 'master' into schema/notch-type
2 parents 296cebc + d56b689 commit 4035e76

File tree

12 files changed

+74
-68
lines changed

12 files changed

+74
-68
lines changed

.github/workflows/schemacode_ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
os: ["ubuntu-latest"]
2727
python-version: ["3.11"]
2828
steps:
29-
- uses: actions/checkout@v3
29+
- uses: actions/checkout@v4
3030
- uses: actions/setup-python@v4
3131
with:
3232
python-version: ${{ matrix.python-version }}
@@ -64,7 +64,7 @@ jobs:
6464
python-version: 3
6565
name: ${{ matrix.os }} with Python ${{ matrix.python-version }}
6666
steps:
67-
- uses: actions/checkout@v3
67+
- uses: actions/checkout@v4
6868

6969
- name: "Set up Python"
7070
uses: actions/setup-python@v4
@@ -129,7 +129,7 @@ jobs:
129129
runs-on: ubuntu-latest
130130
name: Validate schema
131131
steps:
132-
- uses: actions/checkout@v3
132+
- uses: actions/checkout@v4
133133

134134
- name: Set Up Python environment
135135
uses: actions/setup-python@v4
@@ -157,7 +157,7 @@ jobs:
157157
needs: [test, validate_schema]
158158
steps:
159159
- name: Checkout
160-
uses: actions/checkout@v3
160+
uses: actions/checkout@v4
161161

162162
- name: Download artifacts
163163
uses: actions/download-artifact@v3

.github/workflows/validation.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ jobs:
1616
codespell:
1717
runs-on: ubuntu-latest
1818
steps:
19-
- uses: actions/checkout@v3
19+
- uses: actions/checkout@v4
2020
- uses: codespell-project/actions-codespell@master
2121

2222
# Markdown formatting
2323
remark:
2424
runs-on: ubuntu-latest
2525
steps:
26-
- uses: actions/checkout@v3
26+
- uses: actions/checkout@v4
2727
- uses: actions/setup-node@v3
2828
with:
2929
node-version: 14
@@ -36,7 +36,7 @@ jobs:
3636
yamllint:
3737
runs-on: ubuntu-latest
3838
steps:
39-
- uses: actions/checkout@v3
39+
- uses: actions/checkout@v4
4040
- uses: actions/setup-python@v4
4141
with:
4242
python-version: 3
@@ -49,7 +49,7 @@ jobs:
4949
python-style:
5050
runs-on: ubuntu-latest
5151
steps:
52-
- uses: actions/checkout@v3
52+
- uses: actions/checkout@v4
5353
- uses: actions/setup-python@v4
5454
with:
5555
python-version: 3
@@ -63,7 +63,7 @@ jobs:
6363
latin-phrases:
6464
runs-on: ubuntu-latest
6565
steps:
66-
- uses: actions/checkout@v3
66+
- uses: actions/checkout@v4
6767
- uses: actions/setup-python@v4
6868
with:
6969
python-version: 3
@@ -86,7 +86,7 @@ jobs:
8686
validate_cff:
8787
runs-on: ubuntu-latest
8888
steps:
89-
- uses: actions/checkout@v3
89+
- uses: actions/checkout@v4
9090
- uses: actions/setup-python@v4
9191
with:
9292
python-version: 3

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ repos:
1313
- id: check-added-large-files
1414
- id: check-case-conflict
1515
- repo: https://github.com/psf/black
16-
rev: 23.7.0
16+
rev: 23.9.1
1717
hooks:
1818
- id: black
1919
files: ^tools/(?!schemacode)

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[![Validation](https://github.com/bids-standard/bids-specification/actions/workflows/validation.yml/badge.svg)](https://github.com/bids-standard/bids-specification/actions/workflows/validation.yml)
22
[![CircleCI](https://circleci.com/gh/bids-standard/bids-specification.svg?style=shield)](https://circleci.com/gh/bids-standard/bids-specification)
3+
[![Mastodon Follow](https://img.shields.io/mastodon/follow/109520103085644521?domain=https%3A%2F%2Ffosstodon.org%2F)](https://fosstodon.org/@bidsstandard)
34
[![@BIDSstandard](http://img.shields.io/twitter/follow/bidsstandard.svg?style=social)](https://twitter.com/BIDSstandard)
45
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3686061.svg)](https://doi.org/10.5281/zenodo.3686061)
56

src/CHANGES.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,18 @@
22

33
## [Unreleased](https://github.com/bids-standard/bids-specification/tree/HEAD)
44

5+
- \[ENH] Allow Levels field of column descriptions to be objects with TermURLs for each level [#1603](https://github.com/bids-standard/bids-specification/pull/1603) ([Remi-Gau](https://github.com/Remi-Gau))
6+
- \[ENH] Add optional low_cutoff and high_cutoff columns for fnirs channels.tsv [#1597](https://github.com/bids-standard/bids-specification/pull/1597) ([Remi-Gau](https://github.com/Remi-Gau))
7+
- \[SCHEMA]\[ENH] Remove atlas entity and replace it with seg in prep of BEP038 [#1579](https://github.com/bids-standard/bids-specification/pull/1579) ([melanieganz](https://github.com/melanieganz))
8+
- \[FIX] improve longitudinal example [#1576](https://github.com/bids-standard/bids-specification/pull/1576) ([Remi-Gau](https://github.com/Remi-Gau))
9+
- Adds Kim Ray as maintainer. [#1571](https://github.com/bids-standard/bids-specification/pull/1571) ([arokem](https://github.com/arokem))
10+
- \[ENH] Allow for "echo" entity to be used with T1w and other nonparametric anatomical suffixes [#1570](https://github.com/bids-standard/bids-specification/pull/1570) ([yarikoptic](https://github.com/yarikoptic))
11+
- Update `templates` in modality-agnostic-files [#1564](https://github.com/bids-standard/bids-specification/pull/1564) ([sappelhoff](https://github.com/sappelhoff))
12+
- \[FIX] Clarify that electrodes.tsv is optional for MEG, for use with simultaneous (i)EEG [#1555](https://github.com/bids-standard/bids-specification/pull/1555) ([effigies](https://github.com/effigies))
13+
- \[ENH] Allow UNKNOWN and NONE ContrastBolusIngredients [#1547](https://github.com/bids-standard/bids-specification/pull/1547) ([Remi-Gau](https://github.com/Remi-Gau))
514
- \[FIX] Update links to BIDS examples [#1545](https://github.com/bids-standard/bids-specification/pull/1545) ([Remi-Gau](https://github.com/Remi-Gau))
15+
- \[ENH] add schema in appendix [#1543](https://github.com/bids-standard/bids-specification/pull/1543) ([Remi-Gau](https://github.com/Remi-Gau))
16+
- \[ENH] add "visual correction" and "head stabilization" metadata [#1539](https://github.com/bids-standard/bids-specification/pull/1539) ([Remi-Gau](https://github.com/Remi-Gau))
617
- \[ENH] Clarify meaning of raw vs derivative datasets [#1537](https://github.com/bids-standard/bids-specification/pull/1537) ([CPernet](https://github.com/CPernet))
718
- \[FIX] match subject label in folder and filename in func example [#1536](https://github.com/bids-standard/bids-specification/pull/1536) ([Remi-Gau](https://github.com/Remi-Gau))
819
- FIX: Trail MEG directory formats with `/` [#1534](https://github.com/bids-standard/bids-specification/pull/1534) ([effigies](https://github.com/effigies))

src/common-principles.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,29 @@ Example:
513513
}
514514
```
515515

516+
Each level can be described with a string as in the example above,
517+
or with an object containing the fields [`Description`](./glossary.md#description-metadata)
518+
and [`TermURL`](./glossary.md#termurl-metadata)
519+
like in the example below.
520+
521+
```JSON
522+
{
523+
"sex": {
524+
"Description": "sex of the participant as reported by the participant",
525+
"Levels": {
526+
"M": {
527+
"Description": "Male",
528+
"TermURL": "https://www.ncbi.nlm.nih.gov/mesh/68008297"
529+
},
530+
"F": {
531+
"Description": "Female",
532+
"TermURL": "https://www.ncbi.nlm.nih.gov/mesh/68005260"
533+
},
534+
}
535+
}
536+
}
537+
```
538+
516539
### Key-value files (dictionaries)
517540

518541
JavaScript Object Notation (JSON) files MUST be used for storing key-value

src/derivatives/imaging.md

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,9 @@ Template:
153153

154154
A binary (1 - inside, 0 - outside) mask in the space defined by the [`space` entity](../appendices/entities.md#space).
155155
If no transformation has taken place, the value of `space` SHOULD be set to `orig`.
156-
If the mask is an ROI mask derived from an atlas, then the [`label` entity](../appendices/entities.md#label)) SHOULD
157-
be used to specify the masked structure
158-
(see [Common image-derived labels](#common-image-derived-labels)),
159-
and the `Atlas` metadata SHOULD be defined.
156+
If the mask is an ROI mask derived from an atlas segmentation,
157+
then the [`label` entity](../appendices/entities.md#label) SHOULD be used to specify the masked structure
158+
(see [Common image-derived labels](#common-image-derived-labels)).
160159

161160
JSON metadata fields:
162161

@@ -170,7 +169,6 @@ A guide for using macros can be found at
170169
-->
171170
{{ MACROS___make_sidecar_table([
172171
"derivatives.common_derivatives.MaskDerivatives",
173-
"derivatives.common_derivatives.MaskDerivativesAtlas",
174172
"derivatives.common_derivatives.ImageDerivativeResEntity",
175173
"derivatives.common_derivatives.ImageDerivativeDenEntity",
176174
]) }}
@@ -229,10 +227,10 @@ structure may be concatenated in a single file.
229227
Segmentations may be defined in a volume (labeled voxels), a surface (labeled
230228
vertices) or a combined volume/surface space.
231229

232-
If the segmentation can be derived from different atlases,
233-
the [`atlas` entity](../appendices/entities.md#atlas) MAY be used to
234-
distinguish the different segmentations.
235-
If so, the `Atlas` metadata SHOULD also be defined.
230+
If the segmentation can be generated in different ways,
231+
for example, following an atlas segmentation,
232+
the [`seg` entity](../appendices/entities.md#segmentation) MAY be used to
233+
distinguish the name of the segmentation used.
236234

237235
The following section describes discrete and probabilistic segmentations of
238236
volumes, followed by discrete segmentations of surface/combined spaces.
@@ -250,7 +248,6 @@ A guide for using macros can be found at
250248
-->
251249
{{ MACROS___make_sidecar_table([
252250
"derivatives.common_derivatives.SegmentationCommon",
253-
"derivatives.common_derivatives.SegmentationCommonAtlas",
254251
"derivatives.common_derivatives.ImageDerivativeResEntity",
255252
"derivatives.common_derivatives.ImageDerivativeDenEntity",
256253
]) }}
@@ -268,7 +265,7 @@ Template:
268265
<pipeline_name>/
269266
sub-<label>/
270267
anat|func|dwi/
271-
<source_entities>[_space-<space>][_atlas-<label>][_res-<label>][_den-<label>]_dseg.nii.gz
268+
<source_entities>[_space-<space>][_seg-<label>][_res-<label>][_den-<label>]_dseg.nii.gz
272269
```
273270

274271
Example:
@@ -296,8 +293,7 @@ In this case, the mask suffix MUST be used,
296293
the [`label` entity](../appendices/entities.md#label)) SHOULD be used
297294
to specify the masked structure
298295
(see [Common image-derived labels](#common-image-derived-labels)),
299-
the [`atlas` entity](../appendices/entities.md#atlas) and the
300-
`Atlas` metadata SHOULD be defined.
296+
and the [`seg` entity](../appendices/entities.md#segmentation) SHOULD be defined.
301297

302298
For example:
303299

@@ -310,8 +306,8 @@ A guide for using macros can be found at
310306
"pipeline": {
311307
"sub-001": {
312308
"anat": {
313-
"sub-001_space-orig_atlas-Desikan_label-GM_mask.nii.gz": "",
314-
"sub-001_space-orig_atlas-Desikan_label-GM_mask.json": "",
309+
"sub-001_space-orig_seg-Desikan_label-GM_mask.nii.gz": "",
310+
"sub-001_space-orig_seg-Desikan_label-GM_mask.json": "",
315311
},
316312
},
317313
}
@@ -333,7 +329,7 @@ Template:
333329
<pipeline_name>/
334330
sub-<label>/
335331
func|anat|dwi/
336-
<source_entities>[_space-<space>][_atlas-<label>][_res-<label>][_den-<label>][_label-<label>]_probseg.nii.gz
332+
<source_entities>[_space-<space>][_seg-<label>][_res-<label>][_den-<label>][_label-<label>]_probseg.nii.gz
337333
```
338334

339335
Example:
@@ -407,7 +403,7 @@ Template:
407403
<pipeline_name>/
408404
sub-<label>/
409405
anat/
410-
<source_entities>[_hemi-{L|R}][_space-<space>][_atlas-<label>][_res-<label>][_den-<label>]_dseg.{label.gii|dlabel.nii}
406+
<source_entities>[_hemi-{L|R}][_space-<space>][_seg-<label>][_res-<label>][_den-<label>]_dseg.{label.gii|dlabel.nii}
411407
```
412408

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

src/schema/objects/entities.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,6 @@ acquisition:
2525
remains at the discretion of the researcher.
2626
type: string
2727
format: label
28-
atlas:
29-
name: atlas
30-
display_name: Atlas
31-
description: |
32-
The `atlas-<label>` key/value pair corresponds to a custom label the user
33-
MAY use to distinguish a different atlas used for similar type of data.
34-
35-
This entity is only applicable to derivative data.
36-
type: string
37-
format: label
3828
ceagent:
3929
name: ce
4030
display_name: Contrast Enhancing Agent
@@ -286,6 +276,16 @@ sample:
286276
The label MUST be unique per subject and is RECOMMENDED to be unique throughout the dataset.
287277
type: string
288278
format: label
279+
segmentation:
280+
name: seg
281+
display_name: Segmentation
282+
description: |
283+
The `seg-<label>` key/value pair corresponds to a custom label the user
284+
MAY use to distinguish different segmentations.
285+
286+
This entity is only applicable to derivative data.
287+
type: string
288+
format: label
289289
session:
290290
name: ses
291291
display_name: Session

src/schema/objects/metadata.yaml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -177,12 +177,6 @@ AssociatedEmptyRoom:
177177
format: dataset_relative
178178
- type: string
179179
format: bids_uri
180-
Atlas:
181-
name: Atlas
182-
display_name: Atlas
183-
description: |
184-
Which atlas (if any) was used to generate the mask.
185-
type: string
186180
AttenuationCorrection:
187181
name: AttenuationCorrection
188182
display_name: Attenuation Correction
@@ -3371,9 +3365,10 @@ TermURL:
33713365
name: TermURL
33723366
display_name: TermURL
33733367
description: |
3374-
URL pointing to a formal definition of this type of data in an ontology
3375-
available on the web.
3368+
URL pointing to a formal definition of this type of data in an ontology available on the web.
3369+
For example: https://www.ncbi.nlm.nih.gov/mesh/68008297 for "male".
33763370
type: string
3371+
format: uri
33773372
TimeZero:
33783373
name: TimeZero
33793374
display_name: Time Zero

src/schema/rules/checks/events.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ StimulusFileMissing:
2626
- suffix == "events"
2727
- columns.stim_file != null
2828
checks:
29-
- exists(columns.stim_file, "stimuli") == length(columns.stim_file)
29+
- exists(columns.stim_file, "stimuli") == length(columns.stim_file) - count(columns.stim_file, "n/a")

0 commit comments

Comments
 (0)