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

SCHEMA: Update DWI rules to check bval/bvec size in associations #1622

Merged
merged 2 commits into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/schema/meta/context.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ context:
n_cols:
description: 'Number of columns in bval file'
type: integer
n_rows:
description: 'Number of rows in bval file'
type: integer
bvec:
description: 'B vector file'
type: object
Expand All @@ -190,6 +193,9 @@ context:
n_cols:
description: 'Number of columns in bvec file'
type: integer
n_rows:
description: 'Number of rows in bvec file'
type: integer
channels:
description: 'Channels file'
type: object
Expand Down
10 changes: 6 additions & 4 deletions src/schema/rules/checks/dwi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ DWIBvalRows:
'.bval' files should contain exactly one row of values.
level: error
selectors:
- extension == ".bval"
- suffix == "dwi"
- '"bval" in associations'
checks:
- data.n_rows == 1
- associations.bval.n_rows == 1

# 31
DWIBvecRows:
Expand All @@ -37,9 +38,10 @@ DWIBvecRows:
'.bvec' files should contain exactly three rows of values.
level: error
selectors:
- extension == ".bvec"
- suffix == "dwi"
- '"bvec" in associations'
checks:
- data.n_rows == 3
- associations.bvec.n_rows == 1

# 32
DWIMissingBvec:
Expand Down
18 changes: 0 additions & 18 deletions src/schema/rules/errors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,24 +45,6 @@ GzNotGzipped:
selectors:
- match(extension, '\.gz$')

# BIDS Validator Original Issue Code #30
BvalMultipleRows:
code: BVAL_MULTIPLE_ROWS
message: |
.bval files should contain exactly one row of volumes.
level: error
selectors:
- extension == ".bval"

# BIDS Validator Original Issue Code #31
BvecNumberRows:
code: BVEC_NUMBER_ROWS
message: |
.bvec files should contain exactly three rows of volumes.
level: error
selectors:
- extension == ".bvec"

# BIDS Validator Original Issue Code #36
NiftiTooSmall:
code: NIFTI_TOO_SMALL
Expand Down