diff --git a/bids-validator/bids_validator/rules/file_level_rules.json b/bids-validator/bids_validator/rules/file_level_rules.json index 360027e4a..291c4c6c2 100644 --- a/bids-validator/bids_validator/rules/file_level_rules.json +++ b/bids-validator/bids_validator/rules/file_level_rules.json @@ -141,6 +141,17 @@ "@@@_anat_ext_@@@": ["nii\\.gz", "nii", "json"] } }, + "anat_cont": { + "regexp": "^[\\/\\\\](sub-[a-zA-Z0-9]+)[\\/\\\\](?:(ses-[a-zA-Z0-9]+)[\\/\\\\])?anat[\\/\\\\]\\1(_\\2)?(?:_task-[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-(imag|mag|phase|real))?(?:_recording-[a-zA-Z0-9]+)?(?:_chunk-[0-9]+)?(?:@@@_cont_ext_@@@)$", + "tokens": { + "@@@_cont_ext_@@@": [ + "_physio\\.tsv\\.gz", + "_stim\\.tsv\\.gz", + "_physio\\.json", + "_stim\\.json" + ] + } + }, "behavioral": { "regexp": "^[\\/\\\\](sub-[a-zA-Z0-9]+)[\\/\\\\](?:(ses-[a-zA-Z0-9]+)[\\/\\\\])?beh[\\/\\\\]\\1(_\\2)?_task-[a-zA-Z0-9]+(?:_acq-[a-zA-Z0-9]+)?(?:_run-[0-9]+)?((?:@@@_behavioral_ext_@@@)|(?:_recording-[a-zA-Z0-9]+)?(?:@@@_cont_ext_@@@))$", diff --git a/bids-validator/utils/type.js b/bids-validator/utils/type.js index 98de0b88c..9a2315496 100644 --- a/bids-validator/utils/type.js +++ b/bids-validator/utils/type.js @@ -29,6 +29,7 @@ const anatMultiInv = buildRegExp(file_level_rules.anat_multiinv) const anatMP2RAGE = buildRegExp(file_level_rules.anat_mp2rage) const anatVFAMT = buildRegExp(file_level_rules.anat_vfa_mt) const anatMTR = buildRegExp(file_level_rules.anat_mtr) +const anatCont = buildRegExp(file_level_rules.anat_cont) const behavioralData = buildRegExp(file_level_rules.behavioral) const dwiData = buildRegExp(file_level_rules.dwi) const eegData = buildRegExp(file_level_rules.eeg) @@ -242,7 +243,8 @@ export default { conditionalMatch(anatMultiInv, path) || conditionalMatch(anatMP2RAGE, path) || conditionalMatch(anatVFAMT, path) || - conditionalMatch(anatMTR, path) + conditionalMatch(anatMTR, path) || + conditionalMatch(anatCont, path) ) },