-
Notifications
You must be signed in to change notification settings - Fork 163
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
[SCHEMA] Define common derivatives rules #1072
[SCHEMA] Define common derivatives rules #1072
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## schema-sprint #1072 +/- ##
==============================================
Coverage 71.50% 71.50%
==============================================
Files 9 9
Lines 930 930
==============================================
Hits 665 665
Misses 265 265 ☔ View full report in Codecov by Sentry. |
…cation into schema/common_derivatives
…cation into schema/common_derivatives
…pecification into schema/common_derivatives
anat_parametric:
$ref: schema.rules.datatypes.anat.parametric
entities:
$ref: schema.rules.datatypes.anat.parametric.entities
space: OPTIONAL
desc: OPTIONAL |
…es. Add anatomical volumetric, mask and segmentation derivatives
@@ -0,0 +1,413 @@ | |||
--- | |||
anat_nonparametric_common: | |||
$ref: schema.rules.datatypes.anat.nonparametric |
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.
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.
No, the names weren't unique, but we could make them unique if we reorganize. I think fully-qualified is fine as long as we update the paths when things get moved.
desc: OPTIONAL | ||
|
||
anat_parametric_common: | ||
$ref: schema.rules.datatypes.anat.parametric |
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.
Since the group has an entities field, will it conflict with the entities defined below when the ref is filled out?
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.
The idea is that the below entities
will override the original. To make it a patch, we pull in the original entities and patch that. So we go from:
anat_parametric_common:
$ref: schema.rules.datatypes.anat.parametric
entities:
$ref: schema.rules.datatypes.anat.parametric.entities
space: OPTIONAL
desc: OPTIONAL
to
anat_parametric_common:
$ref: schema.rules.datatypes.anat.parametric
entities:
subject: required
session: optional
run: optional
acquisition: optional
ceagent: optional
reconstruction: optional
space: optional
desc: optional
to
anat_parametric_common:
suffixes:
- T1map
- T2map
- T2starmap
- R1map
- R2map
- R2starmap
- PDmap
- MTRmap
- MTsat
- UNIT1
- T1rho
- MWFmap
- MTVmap
- PDT2map
- Chimap
- S0map
- M0map
extensions:
- .nii.gz
- .nii
- .json
datatypes:
- anat
entities:
subject: required
session: optional
run: optional
acquisition: optional
ceagent: optional
reconstruction: optional
space: optional
desc: optional
Co-authored-by: Taylor Salo <tsalo006@fiu.edu>
…cation into schema/common_derivatives
…cation into schema/common_derivatives
src/schema/rules/tabular_data/derivatives/common_derivatives.yaml
Outdated
Show resolved
Hide resolved
SpatialReferenceNoEntity: | ||
selectors: | ||
- dataset.DatasetType == "derivative" | ||
- not(entities contains "space") | ||
fields: | ||
SpatialReference: REQUIRED |
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.
Might be an inconsistency in the spec. I believe that a missing "space" entity is assumed to be space-orig
.
src/schema/rules/datatypes/derivatives/common_imaging_derivatives.yaml
Outdated
Show resolved
Hide resolved
src/schema/rules/datatypes/derivatives/common_imaging_derivatives.yaml
Outdated
Show resolved
Hide resolved
src/schema/rules/datatypes/derivatives/common_imaging_derivatives.yaml
Outdated
Show resolved
Hide resolved
src/schema/rules/datatypes/derivatives/common_imaging_derivatives.yaml
Outdated
Show resolved
Hide resolved
…g derivatives add missing comma in tabular common_derivatives
@@ -0,0 +1,413 @@ | |||
--- | |||
anat_nonparametric_common: | |||
$ref: schema.rules.datatypes.anat.nonparametric |
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.
Quick FYI as I browsing the several schema related PRs
starting those keys with a $
will for sure not play nice with MATLAB in the end, unless I change them to something else when converting from yaml to json in the bids-matlab repo but I would prefer to avoid having different flavor of the schema.
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.
_ref
would presumably work in all languages and be unlikely to collide with valid keys anywhere we might use this construct.
This reverts commit d9e38fa.
…cation into schema/common_derivatives
cherry-picked commits from schema/derivatives branch