bids-standard / bids-specification

Brain Imaging Data Structure (BIDS) Specification
https://bids-specification.readthedocs.io/
Creative Commons Attribution 4.0 International
277 stars 162 forks source link

aslcontext.tsv and inheritance #749

Closed noah10 closed 1 month ago

noah10 commented 3 years ago

The BIDS spec (v.1.5.0) has sections describing an aslcontext.tsv file for use with ASL scans, and also the inheritance principle, which says that instead of providing multiple identical metadata files you can provide a single one at a higher level whose contents will apply to lower levels.

Unfortunately, if you attempt to place a single aslcontext.tsv file at the top level of the dataset directory, the bids validator (v1.6.2) will tell you "Files with such naming scheme are not part of BIDS specification." (The same file, renamed sub-<label>_ses-<label>_aslcontext.tsv and placed in the sub/ses/perf directory with its corresponding nifti file, passes validation.)

Either this is a bug in the validator that should be fixed or the spec should be updated to explicitly say that the inheritance principle does not apply to the aslcontext.tsv file. (To me it looks like the former, but I'm no ASL expert.)

effigies commented 3 years ago

This seems like a good argument that ASL context files should be considered inheritable metadata, but I want to check in with @patsycle @HenkMutsaerts about whether this was already considered and rejected for some reason.

sappelhoff commented 3 years ago

Sounds like a good case for inheritance to me as well, but more ASL expert opinions would be appreciated.

Technical comment: This is the spot in bids-validator where aslcontext.tsv would need to be added: https://github.com/bids-standard/bids-validator/blob/5ee85764957b8b07681ac33c92b7d3052c01ce45/bids-validator/bids_validator/rules/top_level_rules.json#L1-L21

ericearl commented 1 month ago

I'm preparing some ASL data now and would like this inheritance feature for aslcontext.tsv. Is there any reason not to allow this, or at least add it as a feature in the schema-based validator?

effigies commented 1 month ago

They are inheritable in the schema-based validator.

source:

  aslcontext: {
    suffix: 'aslcontext',
    extensions: ['.tsv'],
    inherit: true,
ericearl commented 1 month ago

I'll try it there and let this issue here know what I find out.

ericearl commented 1 month ago

Tried and succeeded in the schema-based bids-validator version 1.14.13! Feel free to close this issue.