Open yarikoptic opened 2 years ago
@yarikoptic Finally got around to this; see https://github.com/Lestropie/bids-specification/pull/5.
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 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.
Possibly this should have been a new thread, as it's a different proposal, but it seemed worth consolidating discussion for the moment. 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.
Okay. New issue created. Will hide these posts.
Follow up/continuation to https://github.com/bids-standard/bids-specification/pull/1003 as suggested/discussed in https://github.com/bids-standard/bids-specification/pull/1003#discussion_r940247739 . Extracting here:
For that latter case (e.g.
task-rest_bold.json
andacq-tricky_bold.json
) we could have removed this requirement ("subsequent ... is a strict superset ...") and require that for such cases of unclear ordering, order is arbitrary but metadata files MUST NOT have identical metadata fields overloaded (thus order would not matter).It would be up for validator to ensure adherence to such a principle. This would "relax" inheritance principle further and allow for arbitrary combinatorics if so desired for some studies, e.g. mix in of
_task-rest_bold.json
andses-pilot_bold.json
,_space-X
and_desc-Y
in https://github.com/bids-standard/bids-bep016/issues/32 etc.