I’m trying to use the BIDS schema for generating BIDS datasets, with a good amount of metadata stored in an electronic lab notebook… For this, I need to know “in which BIDS tsv file(s) should a given metadata field go?”, and I’d like to do this with the BIDS schema…
After some (heavy ) thinking, I think this would be solved if I get the answer to the following question: in the BIDS specs available on the website (let’s say here for the data summary files: Data summary files - Brain Imaging Data Structure 1.10.1), for each tsv file, there is a table listing the metadata fields (~columns) that go into that tsv file. How could I access (or reconstruct) such table from the BIDS schema?
(I’ve looked here and there in the schema, as well as in bidsschematools, but I didn’t manage to get the answer)
I guess the overall challenge to use the bids schema is its intrinsic complexity, which makes the information somehow difficult to find; but the doc you all wrote seems really good, it’s just vast! Here, in this particular case, I think that:
in the schema itself, I could have found the info myself by looking a bit better…
in the doc (that you linked), I have to admit that the title “Valid fields for definitions” may be a bit too vague… but I’m not sure I can provide a good suggestion at this point (I have to digest its content )
Other than that, I have one question: why is there a capital letter in the schema at the beginning of the category in rules.tabular_data.<category> (Participants, Samples, Scans etc.), whereas everything seems to be fully in lowercase everywhere else…? Is there a purpose / a function / a match with something else where this capitalization exists?
Thanks for the feedback! Please feel free to open issues/PRs with any suggestions you have and tag them with schema. I’ll also see updates to this thread.
Generally, under rules, you have <path>.<rulename>.<rule>. path is snake case, rulename is CamelCase, and rule contents are (I think) snake case.
I think this arose because the schema started as what is now objects.metadata, which are JSON fields that BIDS uses CamelCase for. So when we started writing other files, we kept doing the same thing. This isn’t universal, though; since columns are snake_case in BIDS, the entries in objects.columns are, too.
That said, you shouldn’t attach a semantic meaning to the capitalization. It’s just a name for the rule object.