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

Formalize columns (MeasurementToolMetadata, Derivative) presence in phenotype/{tool}.json files

Open yarikoptic opened this issue 10 months ago • 1 comments

ATM we have

❯ git grep MeasurementToolMetadata
src/modality-agnostic-files.md:      "MeasurementToolMetadata": "OPTIONAL",
src/modality-agnostic-files.md:  "MeasurementToolMetadata": {
src/modality-agnostic-files.md:Please note that in this example `MeasurementToolMetadata` includes information
src/schema/objects/metadata.yaml:MeasurementToolMetadata:
src/schema/objects/metadata.yaml:  name: MeasurementToolMetadata

so there is only description (on https://bids-specification.readthedocs.io/en/stable/modality-agnostic-files.html#phenotypic-and-assessment-data) and definition of those fields within metadata files, but nowhere listing or rules to validate those attribute values within those

phenotype/
    <measurement_tool_name>.tsv
    <measurement_tool_name>.json

files.

Attn @bids-standard/bep036

yarikoptic avatar Feb 06 '25 17:02 yarikoptic

This would be a straightforward sidecar rule. We probably just failed to look at modality agnostic files when doing our mass conversion.

I would add a phenotype.yaml file to https://github.com/bids-standard/bids-specification/tree/master/src/schema/rules/sidecars. You could use events.yaml as a model.

You could then use

https://github.com/bids-standard/bids-specification/blob/0a8f9104dbf54bc4cb219852e1547e918f65dd1d/src/modality-specific-files/task-events.md?plain=1#L250-L258

as a model for constructing the sidecar table in modality-agnostic-files.md.

effigies avatar Feb 06 '25 17:02 effigies