From 43db9e93df14552711bc2a2199504516b3173144 Mon Sep 17 00:00:00 2001 From: Ross Blair Date: Wed, 24 Jun 2020 15:53:38 -0500 Subject: [PATCH 1/2] allow phsysio and stim tsvs and jsons in *eg directories fixes #990 --- .../rules/file_level_rules.json | 27 ++++++++++++++++--- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/bids-validator/bids_validator/rules/file_level_rules.json b/bids-validator/bids_validator/rules/file_level_rules.json index 63296b2ae..62f4e66a6 100644 --- a/bids-validator/bids_validator/rules/file_level_rules.json +++ b/bids-validator/bids_validator/rules/file_level_rules.json @@ -169,7 +169,11 @@ "_channels\\.tsv", "_eeg\\.json", "_coordsystem\\.json", - "_photo\\.jpg" + "_photo\\.jpg", + "_physio\\.tsv\\.gz", + "_physio\\.json", + "_stim\\.tsv\\.gz", + "_stim\\.json" ] } }, @@ -196,7 +200,11 @@ "_channels\\.tsv", "_ieeg\\.json", "_coordsystem\\.json", - "_photo\\.jpg" + "_photo\\.jpg", + "_physio\\.tsv\\.gz", + "_physio\\.json", + "_stim\\.tsv\\.gz", + "_stim\\.json" ] } }, @@ -204,7 +212,14 @@ "meg": { "regexp": "^[\\/\\\\](sub-[a-zA-Z0-9]+)[\\/\\\\](?:(ses-[a-zA-Z0-9]+)[\\/\\\\])?meg[\\/\\\\]\\1(_\\2)?(?:_task-[a-zA-Z0-9]+)?(?:_acq-[a-zA-Z0-9]+)?(?:_run-[0-9]+)?(?:_proc-[a-zA-Z0-9]+)?(?:_split-[0-9]+)?(_digitizer.txt|_meg(@@@_meg_type_@@@[\\/\\\\](.(?!\\.(sqd|con|fif|raw|raw\\.mhd|trg|kdf|chn)$))*|[\\/\\\\](.(?!\\.(sqd|con|fif|raw|raw\\.mhd|trg|kdf|chn)$))*)|(@@@_meg_ext_@@@))$", "tokens": { - "@@@_meg_type_@@@": ["\\.ds[\\/\\\\].*", "\\.(?:chn|kdf|trg)", "\\.(?:raw|raw\\.mhd)", "\\.fif", "\\.(?:con|sqd)", "\\.(?:kdf|chn|trg)"], + "@@@_meg_type_@@@": [ + "\\.ds[\\/\\\\].*", + "\\.(?:chn|kdf|trg)", + "\\.(?:raw|raw\\.mhd)", + "\\.fif", + "\\.(?:con|sqd)", + "\\.(?:kdf|chn|trg)" + ], "@@@_meg_ext_@@@": [ "_events\\.json", "_events\\.tsv", @@ -214,7 +229,11 @@ "_coordsystem\\.json", "_photo\\.jpg", "_headshape\\.pos", - "_markers\\.(?:mrk|sqd)" + "_markers\\.(?:mrk|sqd)", + "_physio\\.tsv\\.gz", + "_physio\\.json", + "_stim\\.tsv\\.gz", + "_stim\\.json" ] } }, From 3ebf050fe96b335cae9ad3c55864271e39202bfe Mon Sep 17 00:00:00 2001 From: Ross Blair Date: Mon, 29 Jun 2020 09:20:39 -0500 Subject: [PATCH 2/2] extend continous recordings to anat and dwi in file_level_rules.json --- .../rules/file_level_rules.json | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/bids-validator/bids_validator/rules/file_level_rules.json b/bids-validator/bids_validator/rules/file_level_rules.json index 62f4e66a6..eccc01e5a 100644 --- a/bids-validator/bids_validator/rules/file_level_rules.json +++ b/bids-validator/bids_validator/rules/file_level_rules.json @@ -1,6 +1,6 @@ { "anat": { - "regexp": "^[\\/\\\\](sub-[a-zA-Z0-9]+)[\\/\\\\](?:(ses-[a-zA-Z0-9]+)[\\/\\\\])?anat[\\/\\\\]\\1(_\\2)?(?:_acq-[a-zA-Z0-9]+)?(?:_ce-[a-zA-Z0-9]+)?(?:_rec-[a-zA-Z0-9]+)?(?:_run-[0-9]+)?_(?:@@@_anat_suffixes_@@@)\\.(@@@_anat_ext_@@@)$", + "regexp": "^[\\/\\\\](sub-[a-zA-Z0-9]+)[\\/\\\\](?:(ses-[a-zA-Z0-9]+)[\\/\\\\])?anat[\\/\\\\]\\1(_\\2)?(?:_acq-[a-zA-Z0-9]+)?(?:_ce-[a-zA-Z0-9]+)?(?:_rec-[a-zA-Z0-9]+)?(?:_run-[0-9]+)?(_(?:@@@_anat_suffixes_@@@)\\.(@@@_anat_ext_@@@)|(?:@@@_cont_ext_@@@))$", "tokens": { "@@@_anat_suffixes_@@@": [ "T1w", @@ -20,7 +20,13 @@ "PDmap", "photo" ], - "@@@_anat_ext_@@@": ["nii\\.gz", "nii", "json"] + "@@@_anat_ext_@@@": ["nii\\.gz", "nii", "json"], + "@@@_cont_ext_@@@": [ + "_physio\\.tsv\\.gz", + "_stim\\.tsv\\.gz", + "_physio\\.json", + "_stim\\.json" + ] } }, @@ -78,10 +84,16 @@ }, "dwi": { - "regexp": "^[\\/\\\\](sub-[a-zA-Z0-9]+)[\\/\\\\](?:(ses-[a-zA-Z0-9]+)[\\/\\\\])?dwi[\\/\\\\]\\1(_\\2)?(?:_acq-[a-zA-Z0-9]+)?(?:_rec-[a-zA-Z0-9]+)?(?:_dir-[a-zA-Z0-9]+)?(?:_run-[0-9]+)?_(?:@@@_dwi_type_@@@)\\.(@@@_dwi_ext_@@@)$", + "regexp": "^[\\/\\\\](sub-[a-zA-Z0-9]+)[\\/\\\\](?:(ses-[a-zA-Z0-9]+)[\\/\\\\])?dwi[\\/\\\\]\\1(_\\2)?(?:_acq-[a-zA-Z0-9]+)?(?:_rec-[a-zA-Z0-9]+)?(?:_dir-[a-zA-Z0-9]+)?(?:_run-[0-9]+)?(_(?:@@@_dwi_type_@@@)\\.(@@@_dwi_ext_@@@)|(?:@@@_cont_ext_@@@))$", "tokens": { "@@@_dwi_ext_@@@": ["nii\\.gz", "nii", "json", "bvec", "bval"], - "@@@_dwi_type_@@@": ["dwi", "sbref"] + "@@@_dwi_type_@@@": ["dwi", "sbref"], + "@@@_cont_ext_@@@": [ + "_physio\\.tsv\\.gz", + "_stim\\.tsv\\.gz", + "_physio\\.json", + "_stim\\.json" + ] } },