childmindresearch / bids2table

Efficiently index large-scale BIDS neuroimaging datasets and derivatives
https://childmindresearch.github.io/bids2table/
MIT License
13 stars 5 forks source link

Extracting more metadata #21

Open clane9 opened 1 year ago

clane9 commented 1 year ago

Currently bids2table only extracts the JSON metadata from file-associated sidecars. But there are more kinds of metadata in BIDS that we might want to support. For example, there are tabular metadata files (e.g. participants.tsv, samples.tsv, *_sessions.tsv and *_scans.tsv), as well as modality-specific file-associated metadata (e.g. *.bval, *.bvec for diffusion MRI).

It would probably be good for bids2table to at least have some awareness of these files. But it's not clear to me exactly what the approach should be. Should these files be recorded in the table as separate rows? Should the contents be extracted at indexing time and associated with the relevant data files? Something else altogether?

In general, I think the challenge of handling these metadata files is a good test-case for whether the single-table-of-BIDS-files data model is flexible enough.