bids-standard / bids-validator

Validator for the Brain Imaging Data Structure
https://bids-standard.github.io/bids-validator/
MIT License
181 stars 109 forks source link

phenotype tsv file with multiple rows for same subject #1471

Open Moo-Marc opened 2 years ago

Moo-Marc commented 2 years ago

Hello,

As mentioned on Neuro Stars, the validator returns error [Code 51] PHENOTYPE_SUBJECTS_MISSING when a single subject appears multiple times (multiple rows). The error is misleading since the subject is not missing in the database. Furthermore, I don’t think multiple entries for a single subject is forbidden. E.g., a subject may fill a questionnaire on multiple sessions.

In case this question leads to thoughts that it should be forbidden, note that in my particular case (for the OMEGA repository), the repeated measures are mostly from a few participants that came for different studies. This is not a planned repeated measure. Thus it wouldn't make sense to have a second (3rd, etc) table or added columns for the additional entries for example.

Cheers, Marc

sappelhoff commented 2 years ago

Thanks for the report, I agree that this is a bug.

Furthermore, I don’t think multiple entries for a single subject is forbidden. E.g., a subject may fill a questionnaire on multiple sessions.

I agree that the spec does not forbid such a thing explicitly: source

slightly related and perhaps of interest to you: https://github.com/bids-standard/bids-specification/issues/914

ins0mniac2 commented 1 year ago

I am also seeing this with version 1.9.4. However, I also see this error even with single row per subject for some tsv files. For example, for a phenotype/demographics.tsv file, it throws this error listing as "evidence" 4 out of 447 subjects, even though they have a single row entry like the rest, and despite being included in particpants.tsv and having a sub-XX bds folder.

ins0mniac2 commented 10 months ago

Has there been any progress on this ? The latest validator 1.13 still throws the error.