Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Re-align the text and the schema for filenames in derivatives #1567

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
5 changes: 3 additions & 2 deletions src/derivatives/common-data-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,9 @@ Template:
```Text
<pipeline_name>/
sub-<label>/
<datatype>/
<source_entities>[_space-<space>][_desc-<label>]_<suffix>.<extension>
[ses-<label>/]
<datatype>/
<source_entities>[_space-<space>][_desc-<label>]_<suffix>.<extension>
```

Data is considered to be *preprocessed* or *cleaned* if the data type of the input,
Expand Down
32 changes: 22 additions & 10 deletions src/derivatives/imaging.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ Template:
```Text
<pipeline_name>/
sub-<label>/
<datatype>/
<source_entities>[_space-<space>][_res-<label>][_den-<label>][_desc-<label>]_<suffix>.<extension>
[ses-<label>/]
<datatype>/
<source_entities>[_space-<space>][_res-<label>][_den-<label>][_desc-<label>]_<suffix>.<extension>
```

Volumetric preprocessing does not modify the number of dimensions, and so
Expand Down Expand Up @@ -147,8 +148,10 @@ Template:
```Text
<pipeline_name>/
sub-<label>/
anat|func|dwi/
<source_entities>[_space-<space>][_res-<label>][_den-<label>][_label-<label>][_desc-<label>]_mask.nii.gz
[ses-<label>/]
anat|func|dwi/
<source_entities>[_space-<space>][_res-<label>][_label-<label>][_desc-<label>]_mask.json
<source_entities>[_space-<space>][_res-<label>][_label-<label>][_desc-<label>]_mask.nii[.gz]
```

A binary (1 - inside, 0 - outside) mask in the space defined by the [`space` entity](../appendices/entities.md#space).
Expand Down Expand Up @@ -264,8 +267,11 @@ Template:
```Text
<pipeline_name>/
sub-<label>/
anat|func|dwi/
<source_entities>[_space-<space>][_seg-<label>][_res-<label>][_den-<label>]_dseg.nii.gz
[ses-<label>/]
anat|func|dwi/
<source_entities>[_space-<space>][_seg-<label>][_res-<label>][_desc-<label>]_dseg.json
<source_entities>[_space-<space>][_seg-<label>][_res-<label>][_desc-<label>]_dseg.nii[.gz]
<source_entities>[_space-<space>][_seg-<label>][_res-<label>][_desc-<label>]_dseg.tsv
```

Example:
Expand Down Expand Up @@ -328,8 +334,10 @@ Template:
```Text
<pipeline_name>/
sub-<label>/
func|anat|dwi/
<source_entities>[_space-<space>][_seg-<label>][_res-<label>][_den-<label>][_label-<label>]_probseg.nii.gz
[ses-<label>/]
func|anat|dwi/
<source_entities>[_space-<space>][_seg-<label>][_res-<label>][_label-<label>][_desc-<label>]_probseg.json
<source_entities>[_space-<space>][_seg-<label>][_res-<label>][_label-<label>][_desc-<label>]_probseg.nii[.gz]
```

Example:
Expand Down Expand Up @@ -402,8 +410,12 @@ Template:
```Text
<pipeline_name>/
sub-<label>/
anat/
<source_entities>[_hemi-{L|R}][_space-<space>][_seg-<label>][_res-<label>][_den-<label>]_dseg.{label.gii|dlabel.nii}
[ses-<label>/]
anat/
<source_entities>[_hemi-{L|R}][_space-<space>][_seg-<label>][_res-<label>][_den-<label>][_desc-<label>]_dseg.json
<source_entities>[_hemi-{L|R}][_space-<space>][_seg-<label>][_den-<label>][_desc-<label>]_dseg.label.gii
<source_entities>[_hemi-{L|R}][_space-<space>][_seg-<label>][_res-<label>][_den-<label>][_desc-<label>]_dseg.dlabel.nii
<source_entities>[_hemi-{L|R}][_space-<space>][_seg-<label>][_res-<label>][_den-<label>][_desc-<label>]_dseg.tsv
```

The [`hemi-<label>`](../appendices/entities.md#hemi) entity is REQUIRED for GIFTI files storing information about
Expand Down
43 changes: 29 additions & 14 deletions src/schema/rules/files/deriv/imaging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ anat_parametric_mask:
$ref: rules.files.raw.anat.parametric.entities
space: optional
resolution: optional
density: optional
label: optional
description: optional

Expand All @@ -64,19 +63,21 @@ anat_nonparametric_mask:
$ref: rules.files.raw.anat.nonparametric.entities
space: optional
resolution: optional
density: optional
label: optional
description: optional

dwi_mask:
$ref: rules.files.raw.dwi.dwi
suffixes:
- mask
extensions:
- .nii.gz
- .nii
- .json
entities:
$ref: rules.files.raw.dwi.dwi.entities
space: optional
resolution: optional
density: optional
label: optional
description: optional

Expand All @@ -88,7 +89,6 @@ func_mask:
$ref: rules.files.raw.func.func.entities
space: optional
resolution: optional
density: optional
label: optional
description: optional

Expand All @@ -99,8 +99,8 @@ anat_parametric_discrete_segmentation:
entities:
$ref: rules.files.raw.anat.parametric.entities
space: optional
segmentation: optional
resolution: optional
density: optional
description: optional
extensions:
- .nii.gz
Expand All @@ -115,8 +115,8 @@ anat_nonparametric_discrete_segmentation:
entities:
$ref: rules.files.raw.anat.nonparametric.entities
space: optional
segmentation: optional
resolution: optional
density: optional
description: optional
extensions:
- .nii.gz
Expand All @@ -131,9 +131,14 @@ func_discrete_segmentation:
entities:
$ref: rules.files.raw.func.func.entities
space: optional
segmentation: optional
resolution: optional
density: optional
description: optional
extensions:
- .nii.gz
- .nii
- .json
- .tsv

dwi_discrete_segmentation:
$ref: rules.files.raw.dwi.dwi
Expand All @@ -143,8 +148,12 @@ dwi_discrete_segmentation:
$ref: rules.files.raw.dwi.dwi.entities
space: optional
resolution: optional
density: optional
description: optional
extensions:
- .nii.gz
- .nii
- .json
- .tsv

anat_parametric_probabilistic_segmentation:
$ref: rules.files.raw.anat.parametric
Expand All @@ -153,8 +162,8 @@ anat_parametric_probabilistic_segmentation:
entities:
$ref: rules.files.raw.anat.parametric.entities
space: optional
segmentation: optional
resolution: optional
density: optional
label: optional
description: optional

Expand All @@ -165,8 +174,8 @@ anat_nonparametric_probabilistic_segmentation:
entities:
$ref: rules.files.raw.anat.nonparametric.entities
space: optional
segmentation: optional
resolution: optional
density: optional
label: optional
description: optional

Expand All @@ -177,8 +186,8 @@ func_probabilistic_segmentation:
entities:
$ref: rules.files.raw.func.func.entities
space: optional
segmentation: optional
resolution: optional
density: optional
label: optional
description: optional

Expand All @@ -189,12 +198,16 @@ dwi_probabilistic_segmentation:
entities:
$ref: rules.files.raw.dwi.dwi.entities
space: optional
segmentation: optional
resolution: optional
density: optional
label: optional
description: optional
extensions:
- .nii.gz
- .nii
- .json

anat_parametic_discrete_surface:
anat_parametric_discrete_surface:
$ref: rules.files.raw.anat.parametric
suffixes:
- dseg
Expand All @@ -207,11 +220,12 @@ anat_parametic_discrete_surface:
$ref: rules.files.raw.anat.parametric.entities
hemisphere: optional
space: optional
segmentation: optional
resolution: optional
density: optional
description: optional

anat_nonparametic_discrete_surface:
anat_nonparametric_discrete_surface:
$ref: rules.files.raw.anat.nonparametric
suffixes:
- dseg
Expand All @@ -224,6 +238,7 @@ anat_nonparametic_discrete_surface:
$ref: rules.files.raw.anat.nonparametric.entities
hemisphere: optional
space: optional
segmentation: optional
resolution: optional
density: optional
description: optional