diff --git a/src/modality-specific-files/magnetic-resonance-imaging-data.md b/src/modality-specific-files/magnetic-resonance-imaging-data.md index 072410f528..30a17b000e 100644 --- a/src/modality-specific-files/magnetic-resonance-imaging-data.md +++ b/src/modality-specific-files/magnetic-resonance-imaging-data.md @@ -1254,6 +1254,7 @@ EPI scans with different phase encoding directions to estimate the distortion map corresponding to the nonuniformities of the *B0* field. These `*_epi.nii[.gz]` - or `*_m0scan.nii[.gz]` for arterial spin labeling perfusion data - files can be 3D or 4D -- in the latter case, all timepoints share the same scanning parameters. +Some 4D scans intended for correcting DWIs may have accompanying `*_epi.bval` and `*_epi.bvec` files. Examples of software tools using these kinds of images are FSL TOPUP and AFNI `3dqwarp`. diff --git a/src/schema/SCHEMA_VERSION b/src/schema/SCHEMA_VERSION index d182dc9160..b1e9d95105 100644 --- a/src/schema/SCHEMA_VERSION +++ b/src/schema/SCHEMA_VERSION @@ -1 +1 @@ -0.8.1-dev +0.8.2-dev diff --git a/src/schema/meta/associations.yaml b/src/schema/meta/associations.yaml index f7dafed919..b55f746bf3 100644 --- a/src/schema/meta/associations.yaml +++ b/src/schema/meta/associations.yaml @@ -59,7 +59,7 @@ magnitude1: bval: selectors: - - suffix == 'dwi' + - intersects([suffix], ['dwi', 'epi']) - match(extension, '\.nii(\.gz)?$') target: extension: .bval @@ -67,7 +67,7 @@ bval: bvec: selectors: - - suffix == 'dwi' + - intersects([suffix], ['dwi', 'epi']) - match(extension, '\.nii(\.gz)?$') target: extension: .bvec diff --git a/src/schema/meta/context.yaml b/src/schema/meta/context.yaml index 4404e390ea..7f9ca1259c 100644 --- a/src/schema/meta/context.yaml +++ b/src/schema/meta/context.yaml @@ -183,6 +183,11 @@ context: n_rows: description: 'Number of rows in bval file' type: integer + values: + description: 'B-values contained in bval file' + type: array + items: + type: number bvec: description: 'B vector file' type: object diff --git a/src/schema/rules/checks/dwi.yaml b/src/schema/rules/checks/dwi.yaml index d0b71d9a2a..d575dee6d0 100644 --- a/src/schema/rules/checks/dwi.yaml +++ b/src/schema/rules/checks/dwi.yaml @@ -9,7 +9,7 @@ DWIVolumeCount: associated '.bvec' and '.bval' files. level: error selectors: - - suffix == "dwi" + - intersects([suffix], ["dwi", "epi"]) - '"bval" in associations' - '"bvec" in associations' - type(nifti_header) != "null" @@ -25,7 +25,7 @@ DWIBvalRows: '.bval' files should contain exactly one row of values. level: error selectors: - - suffix == "dwi" + - intersects([suffix], ["dwi", "epi"]) - '"bval" in associations' checks: - associations.bval.n_rows == 1 @@ -38,7 +38,7 @@ DWIBvecRows: '.bvec' files should contain exactly three rows of values. level: error selectors: - - suffix == "dwi" + - intersects([suffix], ["dwi", "epi"]) - '"bvec" in associations' checks: - associations.bvec.n_rows == 3 diff --git a/src/schema/rules/checks/fmap.yaml b/src/schema/rules/checks/fmap.yaml index af042351d8..b6e8e621cc 100644 --- a/src/schema/rules/checks/fmap.yaml +++ b/src/schema/rules/checks/fmap.yaml @@ -49,3 +49,16 @@ MagnitudeFileWithTooManyDimensions: - nifti_header != null checks: - nifti_header.dim[0] == 3 + +EPISmallBVals: + issue: + code: EPI_WITH_BVALS_NEEDS_SMALL_BVALS + message: | + EPI field maps with b-values should include small (b<100) values. + level: error + selectors: + - datatype == "fmap" + - suffix == "epi" + - '"bval" in associations' + checks: + - min(associations.bval.values) < 100 diff --git a/src/schema/rules/files/deriv/preprocessed_data.yaml b/src/schema/rules/files/deriv/preprocessed_data.yaml index 5503b20050..fb9da23f39 100644 --- a/src/schema/rules/files/deriv/preprocessed_data.yaml +++ b/src/schema/rules/files/deriv/preprocessed_data.yaml @@ -104,6 +104,13 @@ fmap_pepolar_common: space: optional description: optional +fmap_pepolar_m0scan: + $ref: rules.files.raw.fmap.pepolar_m0scan + entities: + $ref: rules.files.raw.fmap.pepolar.entities + space: optional + description: optional + fmap_TB1DAM_common: $ref: rules.files.raw.fmap.TB1DAM entities: diff --git a/src/schema/rules/files/raw/fmap.yaml b/src/schema/rules/files/raw/fmap.yaml index 056ed1d67e..79d5944feb 100644 --- a/src/schema/rules/files/raw/fmap.yaml +++ b/src/schema/rules/files/raw/fmap.yaml @@ -24,6 +24,26 @@ fieldmaps: pepolar: suffixes: - epi + extensions: + - .nii.gz + - .nii + - .json + - .bval + - .bvec + datatypes: + - fmap + entities: + subject: required + session: optional + acquisition: optional + ceagent: optional + direction: required + run: optional + part: optional + chunk: optional + +pepolar_m0scan: + suffixes: - m0scan extensions: - .nii.gz