Can columns in index_columns be recommended (not required)?

I’ve noticed that, for BIDS schema tabular_data, if I specify

EMGElectrodes:
  selectors:
    - datatype == "emg"
    - suffix == "electrodes"
    - extension == ".tsv"
  initial_columns:
    - name__electrodes
    - x
    - y
  columns:
    name__electrodes: required
    x: required
    y: required
    z: optional
    group__emg: recommended
  index_columns: [name__electrodes, group__emg]
  additional_columns: allowed_if_defined

then group is treated as a required column, even though it’s listed as recommended. I’m assuming it’s because it’s one of the index_columns. Logically, it should be possible to validate based solely on name if group is missing, and if both are present, validate on the combination of columns. How can I make that happen?

We should also allow index_columns to be non-required. I’ll update the PR.

1 Like