Skip to content

Commit bec5fea

Browse files
authored
Merge pull request bids-standard#2165 from rwblair/legacy_fix_anat_physio
add continous regex for anatomical datatype to file_level_rules.json
2 parents b85c545 + b1d50c8 commit bec5fea

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

bids-validator/bids_validator/rules/file_level_rules.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,17 @@
141141
"@@@_anat_ext_@@@": ["nii\\.gz", "nii", "json"]
142142
}
143143
},
144+
"anat_cont": {
145+
"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_@@@)$",
146+
"tokens": {
147+
"@@@_cont_ext_@@@": [
148+
"_physio\\.tsv\\.gz",
149+
"_stim\\.tsv\\.gz",
150+
"_physio\\.json",
151+
"_stim\\.json"
152+
]
153+
}
154+
},
144155

145156
"behavioral": {
146157
"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_@@@))$",

bids-validator/utils/type.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ const anatMultiInv = buildRegExp(file_level_rules.anat_multiinv)
2929
const anatMP2RAGE = buildRegExp(file_level_rules.anat_mp2rage)
3030
const anatVFAMT = buildRegExp(file_level_rules.anat_vfa_mt)
3131
const anatMTR = buildRegExp(file_level_rules.anat_mtr)
32+
const anatCont = buildRegExp(file_level_rules.anat_cont)
3233
const behavioralData = buildRegExp(file_level_rules.behavioral)
3334
const dwiData = buildRegExp(file_level_rules.dwi)
3435
const eegData = buildRegExp(file_level_rules.eeg)
@@ -242,7 +243,8 @@ export default {
242243
conditionalMatch(anatMultiInv, path) ||
243244
conditionalMatch(anatMP2RAGE, path) ||
244245
conditionalMatch(anatVFAMT, path) ||
245-
conditionalMatch(anatMTR, path)
246+
conditionalMatch(anatMTR, path) ||
247+
conditionalMatch(anatCont, path)
246248
)
247249
},
248250

0 commit comments

Comments
 (0)