Description
From previous discussions, there does not seem to be clear consensus on either relaxing or tightening up the inheritance principle. I can report, however, a practical difficulty with the current rule and derivatives as written. Example:
sub-01/
anat/
sub-01_desc-preproc_T1w.json
sub-01_desc-preproc_T1w.nii.gz
sub-01_space-MNI_desc-preproc_T1w.json
sub-01_space-MNI_desc-preproc_T1w.nii.gz
According to the current rule, both JSON files apply to the MNI-space T1w.nii.gz, which violates
- There MUST NOT be multiple metadata files applicable to a data file at one level of the directory hierarchy.
One way of relaxing (or clarifying) this would be:
- Multiple metadata files may not apply to a data file at a single level of the directory hierarchy. If multiple applicable metadata files exist at the same level of the hierarchy and one file shares all entities with the data file, then only that metadata file that shares all entities with the data file applies to the data file at that level of the hierarchy.
This is what is implemented in https://github.com/bids-standard/bids-validator/pull/1773, which is needed to handle fMRIPrep derivatives right now. The alternative is to clarify derivatives to figure out what fMRIPrep should be doing differently. We have been trying to avoid inheritance principle ambiguities, and yet we ran into this.
For what it's worth, the proposal above comports with PyBIDS' current behavior, which was intended to support the current reading of inheritance, and has not changed for several years.
Related issues: