-
Notifications
You must be signed in to change notification settings - Fork 169
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
base: master
Are you sure you want to change the base?
[FIX] Re-align the text and the schema for filenames in derivatives #1567
Conversation
This entity is present in the corresponding YAML files in the schema: src/schema/rules/files/deriv/imaging.yaml
These filename entities, which appear in the corresponding text, were added in bids-standard#997, but the schema was only updated for the JSON sidecar entities.
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## master #1567 +/- ##
=======================================
Coverage 87.83% 87.83%
=======================================
Files 16 16
Lines 1356 1356
=======================================
Hits 1191 1191
Misses 165 165 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for addressing this. I think the one lingering problem is that the set of allowed entities will depend on the extension (i.e., nifti vs. gifti vs. cifti).
I also think we're not far from being able to generate these filename templates with macros (the way we do for the raw BIDS filename templates), but your fixes are much appreciated in the meantime.
I would like to put the brakes on adding I would be pro-converting these to filename templates like the rest. It will need a new macro, since I don't know if we want to do something like: meta.derivatives.masks.vol_mask:
suffixes:
- mask
extensions:
- .nii
- .nii.gz
- .json
entities:
space: optional
resolution: optional
label: optional
description: optional
meta.derivatives.masks.surf_mask:
suffixes:
- mask
extensions:
- .label.gii
- .json
entities:
space: optional
density: optional
label: optional
description: optional
meta.derivatives.masks.volsurf_mask:
suffixes:
- mask
extensions:
- .dlabel.nii
- .json
entities:
space: optional
resolution: optional
density: optional
label: optional
description: optional
rules.files.deriv.imaging.func_mask:
$ref: rules.files.raw.func.func
suffixes:
$ref: meta.derivatives.masks.vol_mask.suffixes
entities:
$ref: rules.files.raw.func.func.entities
$ref: meta.derivatives.masks.vol_mask.entities That would allow us to write the macro to work on |
switching to draft PR |
…sc-in-segmentations
This reverts commit 1866012.
As pointed out by @tsalo, this entity is not applicable to nifti files. And as pointed out by @mattcieslak, dwi masks don't need bvecs and bvals.
According to @tsalo the density entity should not be allowed for gifti files, but I don't know how to reflect that in the yaml, so I'm leaving it as slightly too permissive.
I have addressed all the feedback, so that the text and yaml line up with each other. Could I get another round of reviews? |
I initially set out to add the
desc
entity to the filename templates for segmentations (in the 'Segmentations' subsection), since the BIDS spec says here that:But then I noticed that this repository also contains a YAML version of the spec, and the
desc
entity already appears there. What's more, I noticed that theatlas
filename entity has the opposite problem: it appears in the text (added in #997), but not in the YAML.I also noticed that the
[ses-<label>/]
folder layer was missing from the filename templates in the text about Derivatives (probably because they can't use the niftyMACROS___make_filename_template
construct), so I fixed that too.This pull request fixes all three problems.
I'm not sure if this pull request counts as a [FIX] or a [SCHEMA]: it feels to me like a bugfix, but technically it does touch the YAML files.
(This is my first contribution, but I'll wait until it's accepted before adding myself to the Recent Contributors page on the wiki.)