dbbs-lab / bsb-core

The Brain Scaffold Builder
https://bsb.readthedocs.io
GNU General Public License v3.0
21 stars 16 forks source link

Formalize linking between `ConnectionStrategy` output, and `ConnectivitySet` naming. #823

Closed Helveg closed 5 months ago

Helveg commented 5 months ago

Currently, the convention is to name a ConnectionSet after the ConnectionStrategy. If there are multiple cell types involved, and the ConnectionStrategy does not give a specific tag to name the set, a {base}_{pre_ct_name}_to_{post_ct_name} convention is used, where base is the conn strat name.

If we want to have a predictable link between a connection strategy and the connection sets it will produce, an optional output_naming attribute to the base ConnectionStrategy. The options are:

Examples

SIngle cell convention

wow:
  strategy: my_very_wow_strategy
  presynaptic:
    cell_types:
      - A
  postsynaptic:
    cell_types:
      - C

would allow the following connection set tags: wow.

Setting output_naming: different would yield different. Setting output_naming: [x, y] would yield [x, y]

Default convention

wow:
  strategy: my_very_wow_strategy
  presynaptic:
    cell_types:
      - A
      - B
  postsynaptic:
    cell_types:
      - C
      - D

would allow the following connection set tags: wow_A_to_C, wow_A_to_D, wow_B_to_C, wow_B_to_D.

Setting output_naming: different changes each occurence of wow in the above tags to different. Setting output_naming: [x, y] would yield 8 labels, 4 with x_* and 4 with y_*.

Others

wow:
  strategy: my_very_wow_strategy
  presynaptic:
    cell_types:
      - A
      - B
  postsynaptic:
    cell_types:
      - C
      - D
      - E
  output:
    - A:
      - C: wow_A_to_C
      - D: A_to_D
    - B:
      - C: ["B_to_C:type_1", "B_to_C:type_2", "anomalies"]
      - D: null

would allow the following connection set tags: wow_A_to_C, wow_A_to_D, wow_A_to_E (implicitly), B_to_C:type_1, B_to_C:type_2, anomalies, (B to D is disabled), wow_B_to_E (implicitly)