Skip to content

Commit df46c50

Browse files
authored
Merge pull request #975 from marcocastellaro/bep005_asl
Bep005 asl
2 parents 1bcf51a + b2de83e commit df46c50

27 files changed

+5506
-4544
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ bids-validator-web/.next/
1616
# Only use global yarn.lock
1717
bids-validator/yarn.lock
1818
bids-validator-web/yarn.lock
19-
2019
.vscode/
2120

2221
*.swp

CODE_OF_CONDUCT.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@ In the interest of fostering an open and welcoming environment, we as contributo
88

99
Examples of behavior that contributes to creating a positive environment include:
1010

11-
* Using welcoming and inclusive language
12-
* Being respectful of differing viewpoints and experiences
13-
* Gracefully accepting constructive criticism
14-
* Focusing on what is best for the community
15-
* Showing empathy towards other community members
11+
- Using welcoming and inclusive language
12+
- Being respectful of differing viewpoints and experiences
13+
- Gracefully accepting constructive criticism
14+
- Focusing on what is best for the community
15+
- Showing empathy towards other community members
1616

1717
Examples of unacceptable behavior by participants include:
1818

19-
* The use of sexualized language or imagery and unwelcome sexual attention or advances
20-
* Trolling, insulting/derogatory comments, and personal or political attacks
21-
* Public or private harassment
22-
* Publishing others' private information, such as a physical or electronic address, without explicit permission
23-
* Other conduct which could reasonably be considered inappropriate in a professional setting
19+
- The use of sexualized language or imagery and unwelcome sexual attention or advances
20+
- Trolling, insulting/derogatory comments, and personal or political attacks
21+
- Public or private harassment
22+
- Publishing others' private information, such as a physical or electronic address, without explicit permission
23+
- Other conduct which could reasonably be considered inappropriate in a professional setting
2424

2525
## Our Responsibilities
2626

bids-validator-code.code-workspace

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"folders": [
3+
{
4+
"path": "."
5+
}
6+
],
7+
"settings": {}
8+
}

bids-validator/README.md

Lines changed: 38 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,27 @@
33
[![Codecov](https://codecov.io/gh/bids-standard/bids-validator/branch/master/graph/badge.svg)](https://codecov.io/gh/bids-standard/bids-validator)
44
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3688707.svg)](https://doi.org/10.5281/zenodo.3688707)
55

6-
76
# BIDS-Validator
87

9-
* [BIDS-Validator](#bids-validator)
10-
* [Quickstart](#quickstart)
11-
* [Support](#support)
12-
* [Maintainers and Contributors](#maintainers-and-contributors)
13-
* [Use](#use)
14-
* [API](#api)
15-
* [.bidsignore](#bidsignore)
16-
* [Configuration](#configuration)
17-
* [In the Browser](#in-the-browser)
18-
* [On the Server](#on-the-server)
19-
* [Through Command Line](#through-command-line)
20-
* [Docker image](#docker-image)
21-
* [Python Library](#python-library)
22-
* [Example](#example)
23-
* [Development](#development)
24-
* [Running Locally in a Browser](#running-locally-in-a-browser)
25-
* [Testing](#testing)
26-
* [Publishing](#publishing)
27-
* [Acknowledgments](#acknowledgments)
8+
- [BIDS-Validator](#bids-validator)
9+
- [Quickstart](#quickstart)
10+
- [Support](#support)
11+
- [Maintainers and Contributors](#maintainers-and-contributors)
12+
- [Use](#use)
13+
- [API](#api)
14+
- [.bidsignore](#bidsignore)
15+
- [Configuration](#configuration)
16+
- [In the Browser](#in-the-browser)
17+
- [On the Server](#on-the-server)
18+
- [Through Command Line](#through-command-line)
19+
- [Docker image](#docker-image)
20+
- [Python Library](#python-library)
21+
- [Example](#example)
22+
- [Development](#development)
23+
- [Running Locally in a Browser](#running-locally-in-a-browser)
24+
- [Testing](#testing)
25+
- [Publishing](#publishing)
26+
- [Acknowledgments](#acknowledgments)
2827

2928
## Quickstart
3029

@@ -47,7 +46,7 @@
4746
1. Python Library:
4847
1. Install [Python](https://www.python.org/) (works with python2 and python3)
4948
1. Install [Pip](https://pip.pypa.io/en/stable/installing/) package manager for python, if
50-
not already installed.
49+
not already installed.
5150
1. From a terminal run `pip install bids_validator` to acquire the
5251
[BIDS Validator PyPi package](https://pypi.org/project/bids-validator/)
5352
1. Open a Python terminal `python`
@@ -281,11 +280,12 @@ To use bids validator with [docker](https://www.docker.com/), you simply need to
281280
[install docker](https://docs.docker.com/install/) on your system.
282281

283282
And then from a terminal run:
284-
- `docker run -ti --rm bids/validator --version` to print the version of the
283+
284+
- `docker run -ti --rm bids/validator --version` to print the version of the
285285
docker image
286-
- `docker run -ti --rm bids/validator --help` to print the help
286+
- `docker run -ti --rm bids/validator --help` to print the help
287287
- `docker run -ti --rm -v /path/to/data:/data:ro bids/validator /data`
288-
to validate the dataset `/path/to/data` on your host machine
288+
to validate the dataset `/path/to/data` on your host machine
289289

290290
See here for a brief explanation of the commands:
291291

@@ -298,12 +298,12 @@ See here for a brief explanation of the commands:
298298
- the `-v` flag is adding your local data to the docker container
299299
([bind-mounts](https://docs.docker.com/storage/bind-mounts/)). Importantly,
300300
the input after the `-v` flag consists of three fields separated colons: `:`
301-
- the first field is the path to the directory on the host machine:
302-
`/path/to/data`
303-
- the second field is the path where the directory is mounted in the
304-
container
305-
- the third field is optional. In our case, we use `ro` to specify that the
306-
mounted data is *read only*
301+
- the first field is the path to the directory on the host machine:
302+
`/path/to/data`
303+
- the second field is the path where the directory is mounted in the
304+
container
305+
- the third field is optional. In our case, we use `ro` to specify that the
306+
mounted data is _read only_
307307

308308
## Python Library
309309

@@ -341,17 +341,17 @@ A note about OS X, the dependencies for the browser require a npm package called
341341
node-gyp which needs xcode to be installed in order to be compiled.
342342

343343
1. The browser version of `bids-validator` lives in the repo subdirectory
344-
`/bids-validator-web`. It is a [React.js](https://reactjs.org/) application
345-
that uses the [next.js](https://nextjs.org/) framework.
344+
`/bids-validator-web`. It is a [React.js](https://reactjs.org/) application
345+
that uses the [next.js](https://nextjs.org/) framework.
346346
2. To develop `bids-validator` and see how it will act in the browser, simply run
347-
`yarn web-dev` in the project root and navigate to `localhost:3000`.
347+
`yarn web-dev` in the project root and navigate to `localhost:3000`.
348348
3. In development mode, changes to the codebase will trigger rebuilds of the application
349-
automatically.
349+
automatically.
350350
4. Changes to the `/bids-validator` in the codebase will also be reflected in the
351-
web application.
351+
web application.
352352
5. Tests use the [Jest](https://jestjs.io/index.html) testing library and should be developed in `/bids-validator-web/tests`.
353-
We can always use more tests, so please feel free to contribute a test that reduces the chance
354-
of any bugs you fix!
353+
We can always use more tests, so please feel free to contribute a test that reduces the chance
354+
of any bugs you fix!
355355
6. To ensure that the web application compiles successfully in production, run `yarn web-export`
356356

357357
### Testing
@@ -383,6 +383,7 @@ below.
383383

384384
Development and contributions were supported through the following federally
385385
funded projects/grants:
386+
386387
- [BIDS Derivatives (NIMH: R24MH114705, PI: Poldrack)](http://grantome.com/grant/NIH/R24-MH114705-01)
387388
- [OpenNeuro (NIMH: R24MH117179, PI: Poldrack)](http://grantome.com/grant/NIH/R24-MH117179-01)
388389
- [Spokes: MEDIUM: WEST (NSF: 1760950, PI: Poldrack & Gorgolewski)](http://grantome.com/grant/NSF/IIS-1760950)

bids-validator/bids_validator/rules/file_level_rules.json

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,8 @@
106106
"magnitude2",
107107
"magnitude",
108108
"fieldmap",
109-
"epi"
109+
"epi",
110+
"m0scan"
110111
],
111112
"@@@_field_map_ext_@@@": ["nii\\.gz", "nii", "json"]
112113
}
@@ -168,6 +169,22 @@
168169
}
169170
},
170171

172+
"asl": {
173+
"regexp": "^[\\/\\\\](sub-[a-zA-Z0-9]+)[\\/\\\\](?:(ses-[a-zA-Z0-9]+)[\\/\\\\])?perf[\\/\\\\]\\1(_\\2)?(?:_acq-[a-zA-Z0-9]+)?(?:_rec-[a-zA-Z0-9]+)?(?:_dir-[a-zA-Z0-9]+)?(?:_run-[0-9]+)?_(?:@@@_asl_type_@@@)$",
174+
"tokens": {
175+
"@@@_asl_type_@@@": [
176+
"asl\\.nii\\.gz",
177+
"asl\\.nii",
178+
"asl\\.json",
179+
"m0scan\\.nii\\.gz",
180+
"m0scan\\.nii",
181+
"m0scan\\.json",
182+
"aslcontext\\.tsv",
183+
"asllabeling\\.jpg"
184+
]
185+
}
186+
},
187+
171188
"eeg": {
172189
"regexp": "^[\\/\\\\](sub-[a-zA-Z0-9]+)[\\/\\\\](?:(ses-[a-zA-Z0-9]+)[\\/\\\\])?eeg[\\/\\\\]\\1(_\\2)?(?:_task-[a-zA-Z0-9]+)?(?:_acq-[a-zA-Z0-9]+)?(?:_run-[0-9]+)?(?:_proc-[a-zA-Z0-9]+)?(?:_split-[0-9]+)?((_eeg\\.(@@@_eeg_type_@@@)|(@@@_eeg_ext_@@@))|(?:_recording-[a-zA-Z0-9]+)?(?:@@@_cont_ext_@@@))$",
173190
"tokens": {

bids-validator/bids_validator/rules/session_level_rules.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,18 @@
2020
}
2121
},
2222

23+
"asl_ses": {
24+
"regexp": "^\\/(sub-[a-zA-Z0-9]+)\\/(?:(ses-[a-zA-Z0-9]+)\\/)?\\1(_\\2)?(?:_acq-[a-zA-Z0-9]+)?(?:_rec-[a-zA-Z0-9]+)?(?:_run-[0-9]+)?(@@@_asl_ses_ext_@@@)$",
25+
"tokens": {
26+
"@@@_asl_ses_ext_@@@": [
27+
"_asl.json",
28+
"_aslcontext.tsv",
29+
"_m0scan.json",
30+
"_asllabeling.jpg"
31+
]
32+
}
33+
},
34+
2335
"anat_ses": {
2436
"regexp": "^[\\/\\\\](sub-[a-zA-Z0-9]+)[\\/\\\\](?:(ses-[a-zA-Z0-9]+)[\\/\\\\])?\\1(_\\2)?(?:_acq-[a-zA-Z0-9]+)?(?:_rec-[a-zA-Z0-9]+)?(?:_run-[0-9]+_)?(@@@_anat_ses_type_@@@).json$",
2537
"tokens": {

bids-validator/bids_validator/rules/subject_level_rules.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@
22
"subject_level": {
33
"regexp": "^[\\/\\\\](sub-[a-zA-Z0-9]+)[\\/\\\\]\\1(@@@_subject_level_ext_@@@)$",
44
"tokens": {
5-
"@@@_subject_level_ext_@@@": [
6-
"_sessions\\.tsv",
7-
"_sessions\\.json"
8-
]
5+
"@@@_subject_level_ext_@@@": ["_sessions\\.tsv", "_sessions\\.json"]
96
}
107
}
118
}

bids-validator/bids_validator/rules/top_level_rules.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,18 @@
3535
}
3636
},
3737

38+
"asl_top": {
39+
"regexp": "^\\/(?:ses-[a-zA-Z0-9]+_)?(?:_acq-[a-zA-Z0-9]+)?(?:_rec-[a-zA-Z0-9]+)?(?:_run-[0-9]+)?(@@@_asl_top_ext_@@@)$",
40+
"tokens": {
41+
"@@@_asl_top_ext_@@@": [
42+
"_asl\\.json",
43+
"_m0scan\\.json",
44+
"_aslcontext\\.tsv",
45+
"_labeling.jpg"
46+
]
47+
}
48+
},
49+
3850
"anat_top": {
3951
"regexp": "^[\\/\\\\](?:ses-[a-zA-Z0-9]+_)?(?:acq-[a-zA-Z0-9]+_)?(?:rec-[a-zA-Z0-9]+_)?(?:run-[0-9]+_)?(@@@_anat_suffixes_@@@)\\.json$",
4052
"tokens": {

bids-validator/bids_validator/tsv/non_custom_columns.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,6 @@
4242
"participants": ["participant_id"],
4343
"phenotype": ["participant_id"],
4444
"scans": ["acq_time", "filename"],
45-
"sessions": ["acq_time", "session_id"]
45+
"sessions": ["acq_time", "session_id"],
46+
"aslcontext": ["volume_type"]
4647
}
Submodule bids-examples updated 2829 files

0 commit comments

Comments
 (0)