BIDS datasets vs BIDS derivative folder and json overloading

11 views
Skip to first unread message

Cyril Pernet

unread,
Feb 11, 2026, 10:40:19 AM (13 days ago) Feb 11
to bids-di...@googlegroups.com, Granville Matheson, Martin Nørgaard

Hi all

many of the current BEPs are for derivatives - and I am wondering if/how to make json fields conditional (see e.g. https://github.com/bids-standard/bids-specification/issues/563).

The question is pertinent in relation to overloading jsons (relates to https://github.com/bids-standard/bids-specification/pull/1834). If making a BIDS derivative folder, then we do not need to carry over the information existing in the raw json files. If making a BIDS derivative dataset to be shared on it's own, while we may not want to carry all the raw information, some are useful because complementing the computational information done. 

1st, what do people think of exporting some raw json information into a  BIDS derivative dataset (ie raw is not directly available)

2nd, assuming this is reasonable to distinguish those two use cases, what about that conditional option 

Thx

Cyril


-- 
Dr Cyril Pernet, PhD, OHBM fellow, SSI fellow
Neurobiology Research Unit
Copenhagen University Hospital, Rigshospitalet
Building 8057, Blegdamsvej 9
DK-2100 Copenhagen, Denmark

cyril,per...@nru.dk
https://cpernet.github.io/
https://orcid.org/0000-0003-4010-4632

Chris Markiewicz

unread,
Feb 11, 2026, 11:03:50 AM (13 days ago) Feb 11
to bids-di...@googlegroups.com, Granville Matheson, Martin Nørgaard
Hi Cyril,

I don't think there's any explicit language around this, but I have always thought of BIDS dataset nesting as a convenience with no semantic meaning, so sidecar files in a superdataset should not infect subdatasets. I can't speak for all BIDS implementations, but for PyBIDS and the BIDS validator, the inheritance principle is implemented by walking back to the root of the current dataset only, which matches that intuition. I personally think this is a good state of affairs, so I would rather add language that makes this explicit than allow sidecars to be loaded from outside the immediate dataset.

> 1st, what do people think of exporting some raw json information into a  BIDS derivative dataset (ie raw is not directly available)

Any valid raw dataset is a valid derivative dataset, so it is valid to include metadata from a raw dataset in a derivative dataset. The spec states (https://bids-specification.readthedocs.io/en/stable/derivatives/introduction.html#metadata-conventions):
  • Unless specified otherwise, individual sidecar JSON files and all metadata fields within are OPTIONAL. However, the appropriate use of these files and pertinent fields is very valuable and thus encouraged. Moreover, for some types of files, there may be one or more required metadata fields, in which case at least one metadata file containing that field must be located somewhere within the file's hierarchy (per the Inheritance Principle).

  • When chaining derivative pipelines, any JSON fields that were specified as mandatory in the input files SHOULD be propagated forward in the output file's JSON provided they remain valid. Non-required JSON fields MAY be propagated, and are highly useful, but it is the pipeline's responsibility to ensure that the values are still relevant and appropriate to the type of output data.

I think that covers the question?

> 2nd, assuming this is reasonable to distinguish those two use cases, what about that conditional option

I think this is moot, if we agree that sidecars do not infect subdatasets, but conditional rules are possible under the schema. For example, NonLinearGradientCorrection is required for all MRI files if PET data is present in a dataset. In general, making conditional rules requires being able to express a property of the dataset in the schema expression language (https://bidsschematools.readthedocs.io/en/latest/description.html#expressions).

Best,
Chris


--
We are all colleagues working together to shape brain imaging for tomorrow, please be respectful, gracious, and patient with your fellow group members.
---
You received this message because you are subscribed to the Google Groups "bids-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bids-discussi...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/bids-discussion/7afef307-820a-477b-a349-ce7c3697bb2b%40nru.dk.
Reply all
Reply to author
Forward
0 new messages