NeuroM icon indicating copy to clipboard operation
NeuroM copied to clipboard

Draft of composite type

Open eleftherioszisis opened this issue 2 years ago • 0 comments

Issue: When subtrees are considered, the neurites are broken into their homogeneous subtrees, increasing the tree cardinality. This can be problematic if this data is used for synthesis for instance because an entire tree is considered a subtree that can be as small as a single section.

Proposal This is a draft of adding a composite type without breaking the existing integer types of NeuriteType.

The following will hold true for neurites with composite types:

  1. The CompositeType behaves like an integer, plus an extra '_types' attribute, and is a NeuriteType.
  2. Equality with a single section type is determined by equality with one of its subtypes. For example, an axon_carrying_dendrite will pass from axon or basal_dendrite filters.
  3. Features that return values per neurite will maintain the neurite cardinality.
  4. Features that specify filters other than All will apply to the composite neurites according to (1). For example, if number_of_sections is called for an axon_carrying_dendrite, it will return a positive value for both neurite_type=NeuriteType.axon and neurite_type=NeuriteType.basal_dendrite
  5. Can be assigned only if use_subtrees is enabled. Otherwise, the simple type of the root node will be used.

Note There are sane alternatives to this implementation, but they will probably require sacrificing something, such as NeuriteType deriving from IntEnum, etc.

eleftherioszisis avatar Sep 20 '22 13:09 eleftherioszisis