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

false positive errors on a beh.json file #1364

Closed
Remi-Gau opened this issue Oct 13, 2021 · 3 comments · Fixed by #1367
Closed

false positive errors on a beh.json file #1364

Remi-Gau opened this issue Oct 13, 2021 · 3 comments · Fixed by #1367

Comments

@Remi-Gau
Copy link
Contributor

Remi-Gau commented Oct 13, 2021

Some colleagues tries to use a beh folder to organize their data and has been getting some errors on the json content that look like false positive.

I have been able to reproduce the error here:

Here I copied an events.tsv and its side car and renamed it into beh.tsv

Apparently the specifications says nothing of how the content of beh.json should be organized.

So it looks like the validator is complaining as soon as one puts anything in the json file (an empty {} is ok though).

Also note that the validator is not picking up that the beh.tsv has both onset and duration and should then probably be an events.tsv - though see this case in the bids-example.

sub-01_task-TEST_beh.json
0.215 KB | application/json
Location:

dummy_beh_ds/sub-01/beh/sub-01_task-TEST_beh.json
Reason:

Invalid JSON file. The file is not formatted according the schema.
Evidence:

should NOT have additional properties

Suggestions:

  • lenient: do not put any restriction on how the content of beh.json files should be organized
  • strict and more "agressive": assume that beh.json files should have the same structure as events.json (will require an update of the spec)
@sappelhoff
Copy link
Member

without having cross-checked this:

  • I thought beh.tsv is a tabular file where you write whatever columns you need to represent your behavioral experiment data
  • By extension, I thought beh.json is the dictionary, where all columns from beh.tsv are described, following the standard BIDS convention of Description, Levels, etc.

So I think your example should definitely pass.

+1 for being lenient (your 1st suggestion)

I think a check for onset+duration in beh.tsv and a contingent recommendation (warning) that beh.tsv might actually be an events.tsv sounds like a potential (low priority) enhancement 🤔

@Remi-Gau
Copy link
Contributor Author

Actually how about this change: we recommend in the spec that beh.json should be organized as events.json but do not make it required? This way it at least gives users some "guidance".

@sappelhoff
Copy link
Member

Yeah 👍 ... as of now, beh.json is not even explicitly mentioned: https://bids-specification.readthedocs.io/en/latest/04-modality-specific-files/07-behavioral-experiments.html

making a comparison that "similar to events tsv+json, the beh tsv should have a (similar) json file" ... and that that's where all the metadata (cited at the bottom of the page) can/should be reported

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants