From 9df3941ed8d27231c8b3ed238b50bb9ee16b4b42 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Thu, 9 Nov 2023 16:26:01 -0500 Subject: [PATCH 1/4] SCHEMA: Check for three bvec rows --- src/schema/rules/checks/dwi.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/schema/rules/checks/dwi.yaml b/src/schema/rules/checks/dwi.yaml index 4183c51e74..d0b71d9a2a 100644 --- a/src/schema/rules/checks/dwi.yaml +++ b/src/schema/rules/checks/dwi.yaml @@ -41,7 +41,7 @@ DWIBvecRows: - suffix == "dwi" - '"bvec" in associations' checks: - - associations.bvec.n_rows == 1 + - associations.bvec.n_rows == 3 # 32 DWIMissingBvec: From 20b521442b97f26c95b208699d1bc1a09d64a880 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Thu, 9 Nov 2023 20:40:07 -0500 Subject: [PATCH 2/4] FIX: NIRS channels are recommended, not required --- src/schema/rules/checks/nirs.yaml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/schema/rules/checks/nirs.yaml b/src/schema/rules/checks/nirs.yaml index c6b8f74548..8acd3ed2fc 100644 --- a/src/schema/rules/checks/nirs.yaml +++ b/src/schema/rules/checks/nirs.yaml @@ -53,11 +53,15 @@ Component: checks: - columns.component != null -RequiredChannels: +RecommendedChannels: + issue: + code: NIRS_RECOMMENDED_CHANNELS + message: | + NIRS files SHOULD have an associated channels.tsv file. + level: warning selectors: - - datatype == "nirs" - - suffix == "optodes" - - extension == ".tsv" + - suffix == "nirs" + - extension == ".snirf" checks: - associations.channels != null From 02a6f85b7d0093a00d87c6d86a92a0e54eefac09 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Thu, 9 Nov 2023 21:51:29 -0500 Subject: [PATCH 3/4] FIX: Selectors to match required/optional conditions --- src/schema/rules/checks/nirs.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/schema/rules/checks/nirs.yaml b/src/schema/rules/checks/nirs.yaml index 8acd3ed2fc..3ec07ce1d2 100644 --- a/src/schema/rules/checks/nirs.yaml +++ b/src/schema/rules/checks/nirs.yaml @@ -23,24 +23,28 @@ NIRSChannelCount: ACCELChannelCountReq: selectors: - suffix == "nirs" + - count(associations.channels.type, "ACCEL") > 0 checks: - sidecar.ACCELChannelCount == count(associations.channels.type, "ACCEL") GYROChannelCountReq: selectors: - suffix == "nirs" + - count(associations.channels.type, "GYRO") > 0 checks: - sidecar.GYROChannelCount == count(associations.channels.type, "GYRO") MAGNChannelCountReq: selectors: - suffix == "nirs" + - count(associations.channels.type, "MAGN") > 0 checks: - sidecar.MAGNChannelCount == count(associations.channels.type, "MAGN") ShortChannelCountReq: selectors: - suffix == "nirs" + - '"ShortChannelCount" in sidecar' checks: - sidecar.ShortChannelCount == count(associations.channels.short_channel, "true") From 641a12b850e10b6c898d86ecc0625c1e29697b33 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Thu, 9 Nov 2023 21:55:27 -0500 Subject: [PATCH 4/4] FIX: Value of channel type is ACCEL, not ACC --- src/schema/rules/sidecars/nirs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/schema/rules/sidecars/nirs.yaml b/src/schema/rules/sidecars/nirs.yaml index 4870887c23..de84a85536 100644 --- a/src/schema/rules/sidecars/nirs.yaml +++ b/src/schema/rules/sidecars/nirs.yaml @@ -149,7 +149,7 @@ NirsRequired: # Following counts required conditions enforced in checks ACCELChannelCount: level: optional - level_addendum: required if any channel type is ACC + level_addendum: required if any channel type is ACCEL GYROChannelCount: level: optional level_addendum: required if any channel type is GYRO