Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Use specificaiton schemas to generate regex. #1126

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions bids-validator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"hed-validator": "^2.0.1",
"ignore": "^4.0.2",
"is-utf8": "^0.2.1",
"js-yaml": "^3.14.0",
"jshint": "^2.9.6",
"lerna": "^3.15.0",
"minimatch": "3.0.4",
Expand Down
9 changes: 9 additions & 0 deletions bids-validator/schemas/associated_data.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
- code/:
- required: false
- derivatives/:
- required: false
- sourcedata/:
- required: false
- stimuli/:
- required: false
16 changes: 16 additions & 0 deletions bids-validator/schemas/auxdatatypes/channels.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
- datatypes:
- meg
- eeg
- ieeg
suffixes:
- channels
extensions:
- .json
- .tsv
entities:
sub: required
ses: optional
task: required
acq: optional
run: optional
14 changes: 14 additions & 0 deletions bids-validator/schemas/auxdatatypes/electrodes.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
- datatypes:
- eeg
- ieeg
suffixes:
- electrodes
extensions:
- .json
- .tsv
entities:
sub: required
ses: optional
acq: optional
space: optional
16 changes: 16 additions & 0 deletions bids-validator/schemas/auxdatatypes/events.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
- datatypes:
- meg
- eeg
- ieeg
suffixes:
- events
extensions:
- .json
- .tsv
entities:
sub: required
ses: optional
task: required
acq: optional
run: optional
13 changes: 13 additions & 0 deletions bids-validator/schemas/auxdatatypes/photo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
- datatypes:
- meg
- eeg
- ieeg
suffixes:
- photo
extensions:
- .jpg
entities:
sub: required
ses: optional
acq: optional
173 changes: 173 additions & 0 deletions bids-validator/schemas/datatypes/anat.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
---
# First group
- suffixes:
- T1w
- T2w
- PDw
- T2starw
- FLAIR
- inplaneT1
- inplaneT2
- PDT2
- angio
extensions:
- .nii.gz
- .nii
- .json
entities:
subject: required
session: optional
run: optional
acquisition: optional
ceagent: optional
reconstruction: optional
part: optional
# Second group
- suffixes:
- T1map
- T2map
- T2starmap
- R1map
- R2map
- R2starmap
- PDmap
- MTRmap
- MTsat
- UNIT1
- T1rho
- MWFmap
- MTVmap
- PDT2map
- Chimap
- TB1map
- RB1map
- S0map
- M0map
extensions:
- .nii.gz
- .nii
- .json
entities:
subject: required
session: optional
run: optional
acquisition: optional
ceagent: optional
reconstruction: optional
# Third group
- suffixes:
- defacemask
extensions:
- .nii.gz
- .nii
- .json
entities:
subject: required
session: optional
run: optional
acquisition: optional
ceagent: optional
reconstruction: optional
modality: optional
# Fourth group
- suffixes:
- MESE
- MEGRE
extensions:
- .nii.gz
- .nii
- .json
entities:
subject: required
session: optional
run: optional
acquisition: optional
ceagent: optional
reconstruction: optional
echo: required
part: optional
# Fifth group
- suffixes:
- VFA
extensions:
- .nii.gz
- .nii
- .json
entities:
subject: required
session: optional
run: optional
acquisition: optional
ceagent: optional
reconstruction: optional
flip: required
part: optional
# Sixth group
- suffixes:
- IRT1
extensions:
- .nii.gz
- .nii
- .json
entities:
subject: required
session: optional
run: optional
acquisition: optional
ceagent: optional
reconstruction: optional
inversion: required
part: optional
# Seventh group
- suffixes:
- MP2RAGE
extensions:
- .nii.gz
- .nii
- .json
entities:
subject: required
session: optional
run: optional
acquisition: optional
ceagent: optional
reconstruction: optional
echo: optional
flip: required
inversion: required
part: optional
# Eighth group
- suffixes:
- MPM
- MTS
extensions:
- .nii.gz
- .nii
- .json
entities:
subject: required
session: optional
run: optional
acquisition: optional
ceagent: optional
reconstruction: optional
echo: optional
flip: required
mtransfer: required
part: optional
# Nineth group
- suffixes:
- MTR
extensions:
- .nii.gz
- .nii
- .json
entities:
subject: required
session: optional
run: optional
acquisition: optional
ceagent: optional
reconstruction: optional
mtransfer: required
part: optional
28 changes: 28 additions & 0 deletions bids-validator/schemas/datatypes/beh.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
# First group
- suffixes:
- stim
- physio
extensions:
- .tsv.gz
- .json
entities:
subject: required
session: optional
task: required
acquisition: optional
run: optional
recording: optional
# Second group
- suffixes:
- events
- beh
extensions:
- .tsv
- .json
entities:
subject: required
session: optional
task: required
acquisition: optional
run: optional
31 changes: 31 additions & 0 deletions bids-validator/schemas/datatypes/dwi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
# First group
- suffixes:
- dwi
extensions:
- .nii.gz
- .nii
- .json
- .bvec
- .bval
entities:
subject: required
session: optional
acquisition: optional
direction: optional
run: optional
part: optional
# Second group
- suffixes:
- sbref
extensions:
- .nii.gz
- .nii
- .json
entities:
subject: required
session: optional
acquisition: optional
direction: optional
run: optional
part: optional
66 changes: 66 additions & 0 deletions bids-validator/schemas/datatypes/eeg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
- suffixes:
- eeg
extensions:
- .json
- .edf
- .vhdr
- .vmrk
- .eeg
- .set
- .fdt
- .bdf
entities:
subject: required
session: optional
task: required
acquisition: optional
run: optional
- suffixes:
- channels
extensions:
- .json
- .tsv
entities:
subject: required
session: optional
task: required
acquisition: optional
run: optional
- suffixes:
- coordsystem
extensions:
- .json
entities:
subject: required
session: optional
acquisition: optional
- suffixes:
- electrodes
extensions:
- .json
- .tsv
entities:
subject: required
session: optional
acquisition: optional
space: optional
- suffixes:
- events
extensions:
- .json
- .tsv
entities:
subject: required
session: optional
task: required
acquisition: optional
run: optional
- suffixes:
- photo
extensions:
- .jpg
entities:
subject: required
session: optional
acquisition: optional
Loading