-
Notifications
You must be signed in to change notification settings - Fork 161
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 YAML tables for DWI/ASL/(i)EEG/micr/beh metadata #1029
Merged
tsalo
merged 12 commits into
bids-standard:schema/sidecar_validation
from
tsalo:more-sidecar-sections
Apr 7, 2022
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
cbaa52a
Draft ASL and DWI metadata table rules.
tsalo 07bad02
Add description addendum.
tsalo 344e698
Define metadata for the behavioral modality.
tsalo 0f552ee
Whoops, separate beh and continuous data.
tsalo 1b82991
Add EEG.
tsalo 820be5d
Add iEEG.
tsalo 6530dd9
Fix.
tsalo 8da721f
Add microscopy.
tsalo f5c5969
Split up the existing sidecars file.
tsalo b7f4636
Fix issues.
tsalo 88c8d1a
Update micr.yaml
tsalo 4ea83e8
Update entities.yaml
tsalo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# | ||
# Groups of related metadata fields | ||
# | ||
# Assumptions: never need disjunction of selectors | ||
# Assumptions: top-to-bottom overrides is sufficient logic | ||
|
||
|
||
--- | ||
# Anatomy imaging data | ||
|
||
MRIAnatomyCommonMetadataFields: | ||
selectors: | ||
- modality == "MRI" | ||
- datatype == "anat" | ||
fields: | ||
ContrastBolusIngredient: OPTIONAL | ||
RepetitionTimeExcitation: OPTIONAL | ||
RepetitionTimePreparation: OPTIONAL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,197 @@ | ||
# | ||
# Groups of related metadata fields | ||
# | ||
# Assumptions: never need disjunction of selectors | ||
# Assumptions: top-to-bottom overrides is sufficient logic | ||
|
||
|
||
--- | ||
# Fields described in text, but not in tables | ||
MRIASLTextOnly: | ||
selectors: | ||
- modality == "MRI" | ||
- datatype == "perf" | ||
- suffix == "asl" | ||
fields: | ||
MagneticFieldStrength: REQUIRED | ||
MRAcquisitionType: REQUIRED | ||
EchoTime: REQUIRED | ||
SliceTiming: | ||
level: RECOMMENDED | ||
level_addendum: REQUIRED if `MRAcquisitionType` is defined as `2D` | ||
RepetitionTimePreparation: REQUIRED | ||
FlipAngle: | ||
level: RECOMMENDED | ||
level_addendum: REQUIRED if `LookLocker` is `true` | ||
|
||
MRIASLTextOnlySliceTiming: | ||
selectors: | ||
- modality == "MRI" | ||
- datatype == "perf" | ||
- suffix == "asl" | ||
- sidecar.MRAcquisitionType == "2D" | ||
fields: | ||
SliceTiming: REQUIRED | ||
|
||
MRIASLTextOnlyFlipAngle: | ||
selectors: | ||
- modality == "MRI" | ||
- datatype == "perf" | ||
- suffix == "asl" | ||
- sidecar.LookLocker == true | ||
fields: | ||
FlipAngle: REQUIRED | ||
|
||
# Common metadata fields applicable to both (P)CASL and PASL | ||
MRIASLCommonMetadataFields: | ||
selectors: | ||
- modality == "MRI" | ||
- datatype == "perf" | ||
- suffix == "asl" | ||
fields: | ||
ArterialSpinLabelingType: REQUIRED | ||
PostLabelingDelay: REQUIRED | ||
BackgroundSuppression: REQUIRED | ||
M0Type: REQUIRED | ||
TotalAcquiredPairs: REQUIRED | ||
VascularCrushing: RECOMMENDED | ||
AcquisitionVoxelSize: RECOMMENDED | ||
M0Estimate: | ||
level: OPTIONAL | ||
level_addendum: REQUIRED if `M0Type` is `Estimate` | ||
BackgroundSuppressionNumberPulses: | ||
level: OPTIONAL | ||
level_addendum: RECOMMENDED if `BackgroundSuppression` is `true` | ||
BackgroundSuppressionPulseTime: | ||
level: OPTIONAL | ||
level_addendum: RECOMMENDED if `BackgroundSuppression` is `true` | ||
VascularCrushingVENC: | ||
level: OPTIONAL | ||
level_addendum: RECOMMENDED if `VascularCrushing` is `true` | ||
LabelingOrientation: RECOMMENDED | ||
LabelingDistance: RECOMMENDED | ||
LabelingLocationDescription: RECOMMENDED | ||
LookLocker: OPTIONAL | ||
LabelingEfficiency: OPTIONAL | ||
|
||
MRIASLCommonMetadataFieldsM0Type: | ||
selectors: | ||
- modality == "MRI" | ||
- datatype == "perf" | ||
- suffix == "asl" | ||
- sidecar.M0Type == "Estimate" | ||
fields: | ||
M0Estimate: REQUIRED | ||
|
||
MRIASLCommonMetadataFieldsBackgroundSuppression: | ||
selectors: | ||
- modality == "MRI" | ||
- datatype == "perf" | ||
- suffix == "asl" | ||
- sidecar.BackgroundSuppression == true | ||
fields: | ||
BackgroundSuppressionNumberPulses: RECOMMENDED | ||
BackgroundSuppressionPulseTime: RECOMMENDED | ||
|
||
MRIASLCommonMetadataFieldsVascularCrushing: | ||
selectors: | ||
- modality == "MRI" | ||
- datatype == "perf" | ||
- suffix == "asl" | ||
- sidecar.VascularCrushing == true | ||
fields: | ||
VascularCrushingVENC: RECOMMENDED | ||
|
||
MRIASLPCASLSpecific: | ||
selectors: | ||
- modality == "MRI" | ||
- datatype == "perf" | ||
- suffix == "asl" | ||
- sidecar.ArterialSpinLabelingType in ["CASL", "PCASL"] | ||
fields: | ||
LabelingDuration: REQUIRED | ||
LabelingPulseAverageGradient: RECOMMENDED | ||
LabelingPulseMaximumGradient: RECOMMENDED | ||
LabelingPulseAverageB1: RECOMMENDED | ||
LabelingPulseDuration: RECOMMENDED | ||
LabelingPulseFlipAngle: RECOMMENDED | ||
LabelingPulseInterval: RECOMMENDED | ||
|
||
MRIASLPCASLSpecific2: | ||
selectors: | ||
- modality == "MRI" | ||
- datatype == "perf" | ||
- suffix == "asl" | ||
- sidecar.ArterialSpinLabelingType == "PCASL" | ||
fields: | ||
PCASLType: RECOMMENDED | ||
|
||
MRIASLCASLSpecific: | ||
selectors: | ||
- modality == "MRI" | ||
- datatype == "perf" | ||
- suffix == "asl" | ||
- sidecar.ArterialSpinLabelingType == "CASL" | ||
fields: | ||
CASLType: RECOMMENDED | ||
|
||
MRIASLPASLSpecific: | ||
selectors: | ||
- modality == "MRI" | ||
- datatype == "perf" | ||
- suffix == "asl" | ||
- sidecar.ArterialSpinLabelingType == "PASL" | ||
fields: | ||
BolusCutOffFlag: REQUIRED | ||
PASLType: RECOMMENDED | ||
LabelingSlabThickness: RECOMMENDED | ||
BolusCutOffDelayTime: | ||
level: OPTIONAL | ||
level_addendum: REQUIRED if `BolusCutOffFlag` is `true` | ||
BolusCutOffTechnique: | ||
level: OPTIONAL | ||
level_addendum: REQUIRED if `BolusCutOffFlag` is `true` | ||
|
||
MRIASLPASLSpecificBolusCutOffFlag: | ||
selectors: | ||
- modality == "MRI" | ||
- datatype == "perf" | ||
- suffix == "asl" | ||
- sidecar.ArterialSpinLabelingType == "PASL" | ||
- sidecar.BolusCutOffFlag == true | ||
fields: | ||
BolusCutOffDelayTime: REQUIRED | ||
BolusCutOffTechnique: REQUIRED | ||
|
||
# m0scan metadata fields | ||
MRIASLM0ScanTextOnly: | ||
selectors: | ||
- modality == "MRI" | ||
- datatype == "perf" | ||
- suffix == "m0scan" | ||
fields: | ||
EchoTime: REQUIRED | ||
RepetitionTimePreparation: REQUIRED | ||
FlipAngle: | ||
level: RECOMMENDED | ||
level_addendum: REQUIRED if `LookLocker` is `true` | ||
|
||
MRIASLM0ScanTextOnlyFlipAngle: | ||
selectors: | ||
- modality == "MRI" | ||
- datatype == "perf" | ||
- suffix == "m0scan" | ||
- sidecar.LookLocker == true | ||
fields: | ||
FlipAngle: REQUIRED | ||
|
||
MRIASLM0Scan: | ||
selectors: | ||
- modality == "MRI" | ||
- datatype == "perf" | ||
- suffix == "m0scan" | ||
fields: | ||
IntendedFor: | ||
level: REQUIRED | ||
addendum: This is used to refer to the ASL time series for which the `*_m0scan.nii[.gz]` is intended. | ||
AcquisitionVoxelSize: RECOMMENDED |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# | ||
# Groups of related metadata fields | ||
# | ||
# Assumptions: never need disjunction of selectors | ||
# Assumptions: top-to-bottom overrides is sufficient logic | ||
|
||
|
||
--- | ||
# Metadata for either beh or events files | ||
BEHTabularData: | ||
selectors: | ||
- suffix in ["beh", "events"] | ||
fields: | ||
TaskName: RECOMMENDED | ||
Instructions: RECOMMENDED | ||
TaskDescription: RECOMMENDED | ||
CogAtlasID: RECOMMENDED | ||
CogPOID: RECOMMENDED | ||
InstitutionName: RECOMMENDED | ||
InstitutionAddress: RECOMMENDED | ||
InstitutionalDepartmentName: RECOMMENDED |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# | ||
# Groups of related metadata fields | ||
# | ||
# Assumptions: never need disjunction of selectors | ||
# Assumptions: top-to-bottom overrides is sufficient logic | ||
|
||
|
||
--- | ||
# Metadata for either physio or stim files | ||
Continuous: | ||
selectors: | ||
- suffix in ["physio", "stim"] | ||
fields: | ||
SamplingFrequency: REQUIRED | ||
StartTime: REQUIRED | ||
Columns: REQUIRED | ||
|
||
# Other RECOMMENDED metadata for physiological data | ||
Physio: | ||
selectors: | ||
- suffix == "physio" | ||
fields: | ||
Manufacturer: RECOMMENDED | ||
ManufacturersModelName: RECOMMENDED | ||
SoftwareVersions: RECOMMENDED | ||
DeviceSerialNumber: RECOMMENDED |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# | ||
# Groups of related metadata fields | ||
# | ||
# Assumptions: never need disjunction of selectors | ||
# Assumptions: top-to-bottom overrides is sufficient logic | ||
|
||
|
||
--- | ||
# Multipart (split) DWI schemes | ||
# NOTE: I don't think this can be schemafied, since it depends on owner intent. | ||
MRIDiffusionMultipart: | ||
selectors: | ||
- modality == "MRI" | ||
- datatype == "dwi" | ||
fields: | ||
MultipartID: REQUIRED | ||
|
||
# Other RECOMMENDED metadata | ||
MRIDiffusionOtherMetadata: | ||
selectors: | ||
- modality == "MRI" | ||
- datatype == "dwi" | ||
fields: | ||
PhaseEncodingDirection: RECOMMENDED | ||
TotalReadoutTime: RECOMMENDED |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I'm not sure how we should handle MultipartID, since its requirement level depends on owner knowledge, rather than any validatable elements of the dataset.