bids-validator icon indicating copy to clipboard operation
bids-validator copied to clipboard

Checking participants against folder names

Open arnodelorme opened this issue 11 months ago • 4 comments

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

arnodelorme avatar Feb 27 '24 23:02 arnodelorme

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.

image

Remi-Gau avatar Feb 28 '24 07:02 Remi-Gau

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.

arnodelorme avatar Feb 28 '24 15:02 arnodelorme

Okay, here's the situation:

  1. This dataset does not validate with the current validator:

image

  1. 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:

Screenshot from 2024-02-28 10-11-31

  1. Fixing up the participants.tsv to use newlines and sub-* still does not show an error, so this issue is a valid one that needs resolving.

  2. 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

effigies avatar Feb 28 '24 15:02 effigies