diff --git a/bids-validator/bids_validator/rules/top_level_rules.json b/bids-validator/bids_validator/rules/top_level_rules.json index cac6df858..e2d140606 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,6 +89,55 @@ } }, + "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": { + "@@@_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"] + } + }, + + "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_@@@": ["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"] + } + }, + + "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": { 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) ||