From 84b4410fa4fde5785c1239d2fa76d65270065e8f Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Tue, 11 Oct 2022 00:20:35 +0200 Subject: [PATCH 01/12] add basic rule for mp2rage json in top dir --- .../bids_validator/rules/top_level_rules.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/bids-validator/bids_validator/rules/top_level_rules.json b/bids-validator/bids_validator/rules/top_level_rules.json index c1ea1f053..f7c7110f2 100644 --- a/bids-validator/bids_validator/rules/top_level_rules.json +++ b/bids-validator/bids_validator/rules/top_level_rules.json @@ -82,6 +82,16 @@ } }, + + "mp2rage_top": { + "regexp": "^[\\/\\\\](?:ses-[a-zA-Z0-9]+_)?(?:acq-[a-zA-Z0-9]+_)?(?:ce-[a-zA-Z0-9]+_)?(?:rec-[a-zA-Z0-9]+_)?(?:run-[0-9]+_)?(?:echo-[0-9]+_)?(?:flip-[0-9]+_)?(?:inv-[0-9]+_)(?:part-(mag|phase|real|imag)_)?(@@@_mp2rage_suffixes_@@@)\\.json$", + "tokens": { + "@@@_mp2rage_suffixes_@@@": [ + "MP2RAGE" + ] + } + }, + "dwi_top": { "regexp": "^[\\/\\\\](?:ses-[a-zA-Z0-9]+_)?(?:acq-[a-zA-Z0-9]+_)?(?:rec-[a-zA-Z0-9]+_)?(?:run-[0-9]+_)?(dwi\\.(?:@@@_dwi_top_ext_@@@)|sbref\\.json)$", "tokens": { From 55f483645c7c1763de384adff176934a43dae8a3 Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Fri, 21 Oct 2022 10:58:53 +0200 Subject: [PATCH 02/12] add ce entity in those allowed in root dir for anat --- bids-validator/bids_validator/rules/top_level_rules.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bids-validator/bids_validator/rules/top_level_rules.json b/bids-validator/bids_validator/rules/top_level_rules.json index f7c7110f2..43438fefa 100644 --- a/bids-validator/bids_validator/rules/top_level_rules.json +++ b/bids-validator/bids_validator/rules/top_level_rules.json @@ -59,7 +59,7 @@ }, "anat_top": { - "regexp": "^[\\/\\\\](?:ses-[a-zA-Z0-9]+_)?(?:acq-[a-zA-Z0-9]+_)?(?:rec-[a-zA-Z0-9]+_)?(?:run-[0-9]+_)?(@@@_anat_suffixes_@@@)\\.json$", + "regexp": "^[\\/\\\\](?:ses-[a-zA-Z0-9]+_)?(?:acq-[a-zA-Z0-9]+_)?(?:ce-[a-zA-Z0-9]+_)?(?:rec-[a-zA-Z0-9]+_)?(?:run-[0-9]+_)?(@@@_anat_suffixes_@@@)\\.json$", "tokens": { "@@@_anat_suffixes_@@@": [ "T1w", From 739668589eb2d6a91f832d0b52a22ba018176475 Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Fri, 21 Oct 2022 11:04:16 +0200 Subject: [PATCH 03/12] add MTR --- bids-validator/bids_validator/rules/top_level_rules.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bids-validator/bids_validator/rules/top_level_rules.json b/bids-validator/bids_validator/rules/top_level_rules.json index 43438fefa..2d4b62efc 100644 --- a/bids-validator/bids_validator/rules/top_level_rules.json +++ b/bids-validator/bids_validator/rules/top_level_rules.json @@ -82,6 +82,14 @@ } }, + "mtr_top": { + "regexp": "^[\\/\\\\](?:ses-[a-zA-Z0-9]+_)?(?:acq-[a-zA-Z0-9]+_)?(?:ce-[a-zA-Z0-9]+_)?(?:rec-[a-zA-Z0-9]+_)?(?:run-[0-9]+_)?mt-(on|off)_(?:part-(mag|phase|real|imag)_)?(@@@_mp2rage_suffixes_@@@)\\.json$", + "tokens": { + "@@@_mp2rage_suffixes_@@@": [ + "MTR" + ] + } + }, "mp2rage_top": { "regexp": "^[\\/\\\\](?:ses-[a-zA-Z0-9]+_)?(?:acq-[a-zA-Z0-9]+_)?(?:ce-[a-zA-Z0-9]+_)?(?:rec-[a-zA-Z0-9]+_)?(?:run-[0-9]+_)?(?:echo-[0-9]+_)?(?:flip-[0-9]+_)?(?:inv-[0-9]+_)(?:part-(mag|phase|real|imag)_)?(@@@_mp2rage_suffixes_@@@)\\.json$", From 1e9c9eca0e3e38a4045cb9da3f4d5c0c544ba1f1 Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Fri, 21 Oct 2022 11:30:32 +0200 Subject: [PATCH 04/12] add MTS --- .../bids_validator/rules/top_level_rules.json | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/bids-validator/bids_validator/rules/top_level_rules.json b/bids-validator/bids_validator/rules/top_level_rules.json index 2d4b62efc..ed96368b9 100644 --- a/bids-validator/bids_validator/rules/top_level_rules.json +++ b/bids-validator/bids_validator/rules/top_level_rules.json @@ -82,10 +82,19 @@ } }, + "mts_top": { + "regexp": "^[\\/\\\\](?:ses-[a-zA-Z0-9]+_)?(?:acq-[a-zA-Z0-9]+_)?(?:ce-[a-zA-Z0-9]+_)?(?:rec-[a-zA-Z0-9]+_)?(?:run-[0-9]+_)?(?:echo-[0-9]+_)?flip-[0-9]+_mt-(on|off)_(?:part-(mag|phase|real|imag)_)?(@@@_mts_suffixes_@@@)\\.json$", + "tokens": { + "@@@_mts_suffixes_@@@": [ + "MTR" + ] + } + }, + "mtr_top": { - "regexp": "^[\\/\\\\](?:ses-[a-zA-Z0-9]+_)?(?:acq-[a-zA-Z0-9]+_)?(?:ce-[a-zA-Z0-9]+_)?(?:rec-[a-zA-Z0-9]+_)?(?:run-[0-9]+_)?mt-(on|off)_(?:part-(mag|phase|real|imag)_)?(@@@_mp2rage_suffixes_@@@)\\.json$", + "regexp": "^[\\/\\\\](?:ses-[a-zA-Z0-9]+_)?(?:acq-[a-zA-Z0-9]+_)?(?:ce-[a-zA-Z0-9]+_)?(?:rec-[a-zA-Z0-9]+_)?(?:run-[0-9]+_)?mt-(on|off)_(?:part-(mag|phase|real|imag)_)?(@@@_mtr_suffixes_@@@)\\.json$", "tokens": { - "@@@_mp2rage_suffixes_@@@": [ + "@@@_mtr_suffixes_@@@": [ "MTR" ] } From a86d7ef0de2a3fe940e6ed944637840266d5e89f Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Fri, 21 Oct 2022 11:33:46 +0200 Subject: [PATCH 05/12] add MPM --- .../bids_validator/rules/top_level_rules.json | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/bids-validator/bids_validator/rules/top_level_rules.json b/bids-validator/bids_validator/rules/top_level_rules.json index ed96368b9..c784560b2 100644 --- a/bids-validator/bids_validator/rules/top_level_rules.json +++ b/bids-validator/bids_validator/rules/top_level_rules.json @@ -82,11 +82,20 @@ } }, + "mpm_top": { + "regexp": "^[\\/\\\\](?:ses-[a-zA-Z0-9]+_)?(?:acq-[a-zA-Z0-9]+_)?(?:ce-[a-zA-Z0-9]+_)?(?:rec-[a-zA-Z0-9]+_)?(?:run-[0-9]+_)?(?:echo-[0-9]+_)?(?:flip-[0-9]+_)?mt-(on|off)_(?:part-(mag|phase|real|imag)_)?(@@@_mpm_suffixes_@@@)\\.json$", + "tokens": { + "@@@_mpm_suffixes_@@@": [ + "MPM" + ] + } + }, + "mts_top": { "regexp": "^[\\/\\\\](?:ses-[a-zA-Z0-9]+_)?(?:acq-[a-zA-Z0-9]+_)?(?:ce-[a-zA-Z0-9]+_)?(?:rec-[a-zA-Z0-9]+_)?(?:run-[0-9]+_)?(?:echo-[0-9]+_)?flip-[0-9]+_mt-(on|off)_(?:part-(mag|phase|real|imag)_)?(@@@_mts_suffixes_@@@)\\.json$", "tokens": { "@@@_mts_suffixes_@@@": [ - "MTR" + "MTS" ] } }, From 26573642ca9f573e0423139c4635b7ed5b2f5247 Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Fri, 21 Oct 2022 11:36:36 +0200 Subject: [PATCH 06/12] add IRT1 --- .../bids_validator/rules/top_level_rules.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/bids-validator/bids_validator/rules/top_level_rules.json b/bids-validator/bids_validator/rules/top_level_rules.json index c784560b2..710b3e270 100644 --- a/bids-validator/bids_validator/rules/top_level_rules.json +++ b/bids-validator/bids_validator/rules/top_level_rules.json @@ -82,6 +82,16 @@ } }, + + "irt1_top": { + "regexp": "^[\\/\\\\](?:ses-[a-zA-Z0-9]+_)?(?:acq-[a-zA-Z0-9]+_)?(?:ce-[a-zA-Z0-9]+_)?(?:rec-[a-zA-Z0-9]+_)?(?:run-[0-9]+_)?inv-[0-9]+_(?:part-(mag|phase|real|imag)_)?(@@@_irt1_suffixes_@@@)\\.json$", + "tokens": { + "@@@_irt1_suffixes_@@@": [ + "IRT1" + ] + } + }, + "mpm_top": { "regexp": "^[\\/\\\\](?:ses-[a-zA-Z0-9]+_)?(?:acq-[a-zA-Z0-9]+_)?(?:ce-[a-zA-Z0-9]+_)?(?:rec-[a-zA-Z0-9]+_)?(?:run-[0-9]+_)?(?:echo-[0-9]+_)?(?:flip-[0-9]+_)?mt-(on|off)_(?:part-(mag|phase|real|imag)_)?(@@@_mpm_suffixes_@@@)\\.json$", "tokens": { From 6fb5f030f7ab851bab782b90fd556c3156807dc2 Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Fri, 21 Oct 2022 11:46:58 +0200 Subject: [PATCH 07/12] add MESE and MEGRE --- .../bids_validator/rules/top_level_rules.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/bids-validator/bids_validator/rules/top_level_rules.json b/bids-validator/bids_validator/rules/top_level_rules.json index 710b3e270..177862e49 100644 --- a/bids-validator/bids_validator/rules/top_level_rules.json +++ b/bids-validator/bids_validator/rules/top_level_rules.json @@ -83,6 +83,16 @@ }, + "megre_mese_top": { + "regexp": "^[\\/\\\\](?:ses-[a-zA-Z0-9]+_)?(?:acq-[a-zA-Z0-9]+_)?(?:ce-[a-zA-Z0-9]+_)?(?:rec-[a-zA-Z0-9]+_)?(?:run-[0-9]+_)?echo-[0-9]+_(?:part-(mag|phase|real|imag)_)?(@@@_mese_megre_suffixes_@@@)\\.json$", + "tokens": { + "@@@_mese_megre_suffixes_@@@": [ + "MEGRE", + "MESE" + ] + } + }, + "irt1_top": { "regexp": "^[\\/\\\\](?:ses-[a-zA-Z0-9]+_)?(?:acq-[a-zA-Z0-9]+_)?(?:ce-[a-zA-Z0-9]+_)?(?:rec-[a-zA-Z0-9]+_)?(?:run-[0-9]+_)?inv-[0-9]+_(?:part-(mag|phase|real|imag)_)?(@@@_irt1_suffixes_@@@)\\.json$", "tokens": { From 1e43b97042b72827649e6fd3c47cac2a81e88ddf Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Fri, 21 Oct 2022 11:49:26 +0200 Subject: [PATCH 08/12] add VFA --- bids-validator/bids_validator/rules/top_level_rules.json | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/bids-validator/bids_validator/rules/top_level_rules.json b/bids-validator/bids_validator/rules/top_level_rules.json index 177862e49..7fa41e987 100644 --- a/bids-validator/bids_validator/rules/top_level_rules.json +++ b/bids-validator/bids_validator/rules/top_level_rules.json @@ -83,6 +83,15 @@ }, + "VFA_top": { + "regexp": "^[\\/\\\\](?:ses-[a-zA-Z0-9]+_)?(?:acq-[a-zA-Z0-9]+_)?(?:ce-[a-zA-Z0-9]+_)?(?:rec-[a-zA-Z0-9]+_)?(?:run-[0-9]+_)?(?:echo-[0-9]+_)?flip-[0-9]+_(?:part-(mag|phase|real|imag)_)?(@@@_mese_megre_suffixes_@@@)\\.json$", + "tokens": { + "@@@_mese_megre_suffixes_@@@": [ + "VFA" + ] + } + }, + "megre_mese_top": { "regexp": "^[\\/\\\\](?:ses-[a-zA-Z0-9]+_)?(?:acq-[a-zA-Z0-9]+_)?(?:ce-[a-zA-Z0-9]+_)?(?:rec-[a-zA-Z0-9]+_)?(?:run-[0-9]+_)?echo-[0-9]+_(?:part-(mag|phase|real|imag)_)?(@@@_mese_megre_suffixes_@@@)\\.json$", "tokens": { From ce3d94357c1067384dfb9b69d5a2f4dbfc4c3a7d Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Fri, 21 Oct 2022 12:07:09 +0200 Subject: [PATCH 09/12] add qmri fmap --- .../bids_validator/rules/top_level_rules.json | 51 ++++++++----------- 1 file changed, 21 insertions(+), 30 deletions(-) diff --git a/bids-validator/bids_validator/rules/top_level_rules.json b/bids-validator/bids_validator/rules/top_level_rules.json index 7fa41e987..aa57fe752 100644 --- a/bids-validator/bids_validator/rules/top_level_rules.json +++ b/bids-validator/bids_validator/rules/top_level_rules.json @@ -17,6 +17,13 @@ "phase1\\.json", "phase2\\.json", "fieldmap\\.json", + "TB1DAM\\.json", + "TB1EPI\\.json", + "TB1AFI\\.json", + "TB1TFL\\.json", + "TB1RFM\\.json", + "TB1SRGE\\.json", + "RB1COR\\.json", "events\\.json", "scans\\.json", "samples\\.json", @@ -82,70 +89,54 @@ } }, - "VFA_top": { "regexp": "^[\\/\\\\](?:ses-[a-zA-Z0-9]+_)?(?:acq-[a-zA-Z0-9]+_)?(?:ce-[a-zA-Z0-9]+_)?(?:rec-[a-zA-Z0-9]+_)?(?:run-[0-9]+_)?(?:echo-[0-9]+_)?flip-[0-9]+_(?:part-(mag|phase|real|imag)_)?(@@@_mese_megre_suffixes_@@@)\\.json$", "tokens": { - "@@@_mese_megre_suffixes_@@@": [ - "VFA" - ] + "@@@_mese_megre_suffixes_@@@": ["VFA"] } - }, + }, "megre_mese_top": { "regexp": "^[\\/\\\\](?:ses-[a-zA-Z0-9]+_)?(?:acq-[a-zA-Z0-9]+_)?(?:ce-[a-zA-Z0-9]+_)?(?:rec-[a-zA-Z0-9]+_)?(?:run-[0-9]+_)?echo-[0-9]+_(?:part-(mag|phase|real|imag)_)?(@@@_mese_megre_suffixes_@@@)\\.json$", "tokens": { - "@@@_mese_megre_suffixes_@@@": [ - "MEGRE", - "MESE" - ] + "@@@_mese_megre_suffixes_@@@": ["MEGRE", "MESE"] } - }, + }, "irt1_top": { "regexp": "^[\\/\\\\](?:ses-[a-zA-Z0-9]+_)?(?:acq-[a-zA-Z0-9]+_)?(?:ce-[a-zA-Z0-9]+_)?(?:rec-[a-zA-Z0-9]+_)?(?:run-[0-9]+_)?inv-[0-9]+_(?:part-(mag|phase|real|imag)_)?(@@@_irt1_suffixes_@@@)\\.json$", "tokens": { - "@@@_irt1_suffixes_@@@": [ - "IRT1" - ] + "@@@_irt1_suffixes_@@@": ["IRT1"] } - }, + }, "mpm_top": { "regexp": "^[\\/\\\\](?:ses-[a-zA-Z0-9]+_)?(?:acq-[a-zA-Z0-9]+_)?(?:ce-[a-zA-Z0-9]+_)?(?:rec-[a-zA-Z0-9]+_)?(?:run-[0-9]+_)?(?:echo-[0-9]+_)?(?:flip-[0-9]+_)?mt-(on|off)_(?:part-(mag|phase|real|imag)_)?(@@@_mpm_suffixes_@@@)\\.json$", "tokens": { - "@@@_mpm_suffixes_@@@": [ - "MPM" - ] + "@@@_mpm_suffixes_@@@": ["MPM"] } - }, + }, "mts_top": { "regexp": "^[\\/\\\\](?:ses-[a-zA-Z0-9]+_)?(?:acq-[a-zA-Z0-9]+_)?(?:ce-[a-zA-Z0-9]+_)?(?:rec-[a-zA-Z0-9]+_)?(?:run-[0-9]+_)?(?:echo-[0-9]+_)?flip-[0-9]+_mt-(on|off)_(?:part-(mag|phase|real|imag)_)?(@@@_mts_suffixes_@@@)\\.json$", "tokens": { - "@@@_mts_suffixes_@@@": [ - "MTS" - ] + "@@@_mts_suffixes_@@@": ["MTS"] } - }, + }, "mtr_top": { "regexp": "^[\\/\\\\](?:ses-[a-zA-Z0-9]+_)?(?:acq-[a-zA-Z0-9]+_)?(?:ce-[a-zA-Z0-9]+_)?(?:rec-[a-zA-Z0-9]+_)?(?:run-[0-9]+_)?mt-(on|off)_(?:part-(mag|phase|real|imag)_)?(@@@_mtr_suffixes_@@@)\\.json$", "tokens": { - "@@@_mtr_suffixes_@@@": [ - "MTR" - ] + "@@@_mtr_suffixes_@@@": ["MTR"] } - }, + }, "mp2rage_top": { "regexp": "^[\\/\\\\](?:ses-[a-zA-Z0-9]+_)?(?:acq-[a-zA-Z0-9]+_)?(?:ce-[a-zA-Z0-9]+_)?(?:rec-[a-zA-Z0-9]+_)?(?:run-[0-9]+_)?(?:echo-[0-9]+_)?(?:flip-[0-9]+_)?(?:inv-[0-9]+_)(?:part-(mag|phase|real|imag)_)?(@@@_mp2rage_suffixes_@@@)\\.json$", "tokens": { - "@@@_mp2rage_suffixes_@@@": [ - "MP2RAGE" - ] + "@@@_mp2rage_suffixes_@@@": ["MP2RAGE"] } - }, + }, "dwi_top": { "regexp": "^[\\/\\\\](?:ses-[a-zA-Z0-9]+_)?(?:acq-[a-zA-Z0-9]+_)?(?:rec-[a-zA-Z0-9]+_)?(?:run-[0-9]+_)?(dwi\\.(?:@@@_dwi_top_ext_@@@)|sbref\\.json)$", From a82055fb1a621f32ec84802d42de57ea522fc831 Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Mon, 2 Jan 2023 15:35:00 +0100 Subject: [PATCH 10/12] test on bids example and update --- .../bids_validator/rules/top_level_rules.json | 10 ++++++++- bids-validator/utils/type.js | 21 +++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/bids-validator/bids_validator/rules/top_level_rules.json b/bids-validator/bids_validator/rules/top_level_rules.json index aa57fe752..1afefcf10 100644 --- a/bids-validator/bids_validator/rules/top_level_rules.json +++ b/bids-validator/bids_validator/rules/top_level_rules.json @@ -84,7 +84,15 @@ "T2star", "FLASH", "PDmap", - "photo" + "photo", + "VFA", + "MEGRE", + "MESE", + "IRT1", + "MPM", + "MTS", + "MTR", + "MP2RAGE" ] } }, diff --git a/bids-validator/utils/type.js b/bids-validator/utils/type.js index d0d3c5467..37d64ee12 100644 --- a/bids-validator/utils/type.js +++ b/bids-validator/utils/type.js @@ -84,6 +84,13 @@ const rootTop = buildRegExp(top_level_rules.root_top) const funcTop = buildRegExp(top_level_rules.func_top) const aslTop = buildRegExp(top_level_rules.asl_top) const anatTop = buildRegExp(top_level_rules.anat_top) +const vfaTop = buildRegExp(top_level_rules.VFA_top) +const megreTop = buildRegExp(top_level_rules.megre_mese_top) +const irt1Top = buildRegExp(top_level_rules.irt1_top) +const mpmTop = buildRegExp(top_level_rules.mpm_top) +const mtsTop = buildRegExp(top_level_rules.mts_top) +const mtrTop = buildRegExp(top_level_rules.mtr_top) +const mp2rageTop = buildRegExp(top_level_rules.mp2rage_top) const dwiTop = buildRegExp(top_level_rules.dwi_top) const eegTop = buildRegExp(top_level_rules.eeg_top) const ieegTop = buildRegExp(top_level_rules.ieeg_top) @@ -141,6 +148,13 @@ export default { aslTop.test(path) || dwiTop.test(path) || anatTop.test(path) || + vfaTop.test(path) || + megreTop.test(path) || + irt1Top.test(path) || + mpmTop.test(path) || + mtsTop.test(path) || + mtrTop.test(path) || + mp2rageTop.test(path) || multiDirFieldmap.test(path) || otherTopFiles.test(path) || megTop.test(path) || @@ -157,6 +171,13 @@ export default { aslTop.test(path) || dwiTop.test(path) || anatTop.test(path) || + vfaTop.test(path) || + megreTop.test(path) || + irt1Top.test(path) || + mpmTop.test(path) || + mtsTop.test(path) || + mtrTop.test(path) || + mp2rageTop.test(path) || multiDirFieldmap.test(path) || otherTopFiles.test(path) || megTop.test(path) || From f684ba24f681c49cb73aada6b4d3406ff178ca02 Mon Sep 17 00:00:00 2001 From: Ross Blair Date: Wed, 22 Feb 2023 12:34:12 -0600 Subject: [PATCH 11/12] make all entities optional at top level for new qmri buddies --- .../bids_validator/rules/top_level_rules.json | 22 ++++++------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/bids-validator/bids_validator/rules/top_level_rules.json b/bids-validator/bids_validator/rules/top_level_rules.json index 1afefcf10..4dbbc92e7 100644 --- a/bids-validator/bids_validator/rules/top_level_rules.json +++ b/bids-validator/bids_validator/rules/top_level_rules.json @@ -84,56 +84,48 @@ "T2star", "FLASH", "PDmap", - "photo", - "VFA", - "MEGRE", - "MESE", - "IRT1", - "MPM", - "MTS", - "MTR", - "MP2RAGE" + "photo" ] } }, "VFA_top": { - "regexp": "^[\\/\\\\](?:ses-[a-zA-Z0-9]+_)?(?:acq-[a-zA-Z0-9]+_)?(?:ce-[a-zA-Z0-9]+_)?(?:rec-[a-zA-Z0-9]+_)?(?:run-[0-9]+_)?(?:echo-[0-9]+_)?flip-[0-9]+_(?:part-(mag|phase|real|imag)_)?(@@@_mese_megre_suffixes_@@@)\\.json$", + "regexp": "^[\\/\\\\](?:ses-[a-zA-Z0-9]+_)?(?:acq-[a-zA-Z0-9]+_)?(?:ce-[a-zA-Z0-9]+_)?(?:rec-[a-zA-Z0-9]+_)?(?:run-[0-9]+_)?(?:echo-[0-9]+_)?(?:flip-[0-9]+_)?(?:part-(mag|phase|real|imag)_)?(@@@_mese_megre_suffixes_@@@)\\.json$", "tokens": { "@@@_mese_megre_suffixes_@@@": ["VFA"] } }, "megre_mese_top": { - "regexp": "^[\\/\\\\](?:ses-[a-zA-Z0-9]+_)?(?:acq-[a-zA-Z0-9]+_)?(?:ce-[a-zA-Z0-9]+_)?(?:rec-[a-zA-Z0-9]+_)?(?:run-[0-9]+_)?echo-[0-9]+_(?:part-(mag|phase|real|imag)_)?(@@@_mese_megre_suffixes_@@@)\\.json$", + "regexp": "^[\\/\\\\](?:ses-[a-zA-Z0-9]+_)?(?:acq-[a-zA-Z0-9]+_)?(?:ce-[a-zA-Z0-9]+_)?(?:rec-[a-zA-Z0-9]+_)?(?:run-[0-9]+_)?(?:echo-[0-9]+_)?(?:part-(mag|phase|real|imag)_)?(@@@_mese_megre_suffixes_@@@)\\.json$", "tokens": { "@@@_mese_megre_suffixes_@@@": ["MEGRE", "MESE"] } }, "irt1_top": { - "regexp": "^[\\/\\\\](?:ses-[a-zA-Z0-9]+_)?(?:acq-[a-zA-Z0-9]+_)?(?:ce-[a-zA-Z0-9]+_)?(?:rec-[a-zA-Z0-9]+_)?(?:run-[0-9]+_)?inv-[0-9]+_(?:part-(mag|phase|real|imag)_)?(@@@_irt1_suffixes_@@@)\\.json$", + "regexp": "^[\\/\\\\](?:ses-[a-zA-Z0-9]+_)?(?:acq-[a-zA-Z0-9]+_)?(?:ce-[a-zA-Z0-9]+_)?(?:rec-[a-zA-Z0-9]+_)?(?:run-[0-9]+_)?(?:inv-[0-9]+_)?(?:part-(mag|phase|real|imag)_)?(@@@_irt1_suffixes_@@@)\\.json$", "tokens": { "@@@_irt1_suffixes_@@@": ["IRT1"] } }, "mpm_top": { - "regexp": "^[\\/\\\\](?:ses-[a-zA-Z0-9]+_)?(?:acq-[a-zA-Z0-9]+_)?(?:ce-[a-zA-Z0-9]+_)?(?:rec-[a-zA-Z0-9]+_)?(?:run-[0-9]+_)?(?:echo-[0-9]+_)?(?:flip-[0-9]+_)?mt-(on|off)_(?:part-(mag|phase|real|imag)_)?(@@@_mpm_suffixes_@@@)\\.json$", + "regexp": "^[\\/\\\\](?:ses-[a-zA-Z0-9]+_)?(?:acq-[a-zA-Z0-9]+_)?(?:ce-[a-zA-Z0-9]+_)?(?:rec-[a-zA-Z0-9]+_)?(?:run-[0-9]+_)?(?:echo-[0-9]+_)?(?:flip-[0-9]+_)?(?:mt-(on|off)_)(?:part-(mag|phase|real|imag)_)?(@@@_mpm_suffixes_@@@)\\.json$", "tokens": { "@@@_mpm_suffixes_@@@": ["MPM"] } }, "mts_top": { - "regexp": "^[\\/\\\\](?:ses-[a-zA-Z0-9]+_)?(?:acq-[a-zA-Z0-9]+_)?(?:ce-[a-zA-Z0-9]+_)?(?:rec-[a-zA-Z0-9]+_)?(?:run-[0-9]+_)?(?:echo-[0-9]+_)?flip-[0-9]+_mt-(on|off)_(?:part-(mag|phase|real|imag)_)?(@@@_mts_suffixes_@@@)\\.json$", + "regexp": "^[\\/\\\\](?:ses-[a-zA-Z0-9]+_)?(?:acq-[a-zA-Z0-9]+_)?(?:ce-[a-zA-Z0-9]+_)?(?:rec-[a-zA-Z0-9]+_)?(?:run-[0-9]+_)?(?:echo-[0-9]+_)?(?:flip-[0-9]+_mt-(on|off)_)?(?:part-(mag|phase|real|imag)_)?(@@@_mts_suffixes_@@@)\\.json$", "tokens": { "@@@_mts_suffixes_@@@": ["MTS"] } }, "mtr_top": { - "regexp": "^[\\/\\\\](?:ses-[a-zA-Z0-9]+_)?(?:acq-[a-zA-Z0-9]+_)?(?:ce-[a-zA-Z0-9]+_)?(?:rec-[a-zA-Z0-9]+_)?(?:run-[0-9]+_)?mt-(on|off)_(?:part-(mag|phase|real|imag)_)?(@@@_mtr_suffixes_@@@)\\.json$", + "regexp": "^[\\/\\\\](?:ses-[a-zA-Z0-9]+_)?(?:acq-[a-zA-Z0-9]+_)?(?:ce-[a-zA-Z0-9]+_)?(?:rec-[a-zA-Z0-9]+_)?(?:run-[0-9]+_)?(?:mt-(on|off)_)?(?:part-(mag|phase|real|imag)_)?(@@@_mtr_suffixes_@@@)\\.json$", "tokens": { "@@@_mtr_suffixes_@@@": ["MTR"] } From 957d7ee0334a59ca6d6290032977f2de802c6bd3 Mon Sep 17 00:00:00 2001 From: Ross Blair Date: Thu, 23 Feb 2023 12:32:11 -0600 Subject: [PATCH 12/12] make mprage2 top level entity optional --- bids-validator/bids_validator/rules/top_level_rules.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bids-validator/bids_validator/rules/top_level_rules.json b/bids-validator/bids_validator/rules/top_level_rules.json index 4dbbc92e7..034b60b5a 100644 --- a/bids-validator/bids_validator/rules/top_level_rules.json +++ b/bids-validator/bids_validator/rules/top_level_rules.json @@ -132,7 +132,7 @@ }, "mp2rage_top": { - "regexp": "^[\\/\\\\](?:ses-[a-zA-Z0-9]+_)?(?:acq-[a-zA-Z0-9]+_)?(?:ce-[a-zA-Z0-9]+_)?(?:rec-[a-zA-Z0-9]+_)?(?:run-[0-9]+_)?(?:echo-[0-9]+_)?(?:flip-[0-9]+_)?(?:inv-[0-9]+_)(?:part-(mag|phase|real|imag)_)?(@@@_mp2rage_suffixes_@@@)\\.json$", + "regexp": "^[\\/\\\\](?:ses-[a-zA-Z0-9]+_)?(?:acq-[a-zA-Z0-9]+_)?(?:ce-[a-zA-Z0-9]+_)?(?:rec-[a-zA-Z0-9]+_)?(?:run-[0-9]+_)?(?:echo-[0-9]+_)?(?:flip-[0-9]+_)?(?:inv-[0-9]+_)?(?:part-(mag|phase|real|imag)_)?(@@@_mp2rage_suffixes_@@@)\\.json$", "tokens": { "@@@_mp2rage_suffixes_@@@": ["MP2RAGE"] }