bids-validator
bids-validator copied to clipboard
Checking participants against folder names
The participants.tsv file does not contain the same subject ID as the folder name. One may reasonably assume that the subjects are in the same order as the folder in the participants.tsv file. However, since this cannot be confirmed, this file should be processed with caution. It should probably not have passed the BIDS validator.
https://nemar.org/dataexplorer/detail?dataset_id=ds002712
the participant.tsv is not formatted according to BIDS (participant_id should be sub-something
), so I don't think this is a validator issue.
Well, isn't that an issue that we cannot reconcile participant ID with subject ID? @effigies this is the dataset we discussed 2 months ago on OpenNeuro support. You said you believed we should not assume that participants are listed in order.
Okay, here's the situation:
- This dataset does not validate with the current validator:
- The file format uses
\r
instead of\n
newlines, which is just weird since OSX came out. Either way, this caused an older version of the validator to treat it as a single header line, which only rated a warning:
-
Fixing up the
participants.tsv
to use newlines andsub-*
still does not show an error, so this issue is a valid one that needs resolving. -
It looks like we can reconstruct the subject IDs because they're still stored in the FIF files:
❯ grep 2399 sub-01/meg/sub-01_task-numbersletters_run-1_meg.fif || echo "Fail"
grep: sub-01/meg/sub-01_task-numbersletters_run-1_meg.fif: binary file matches
❯ grep 3117 sub-01/meg/sub-01_task-numbersletters_run-1_meg.fif || echo "Fail"
Fail