NeuroM
NeuroM copied to clipboard
Draft of composite type
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:
- The
CompositeType
behaves like an integer, plus an extra '_types' attribute, and is aNeuriteType
. - Equality with a single section type is determined by equality with one of its subtypes. For example, an
axon_carrying_dendrite
will pass fromaxon
orbasal_dendrite
filters. - Features that return values per neurite will maintain the neurite cardinality.
- Features that specify filters other than
All
will apply to the composite neurites according to (1). For example, ifnumber_of_sections
is called for anaxon_carrying_dendrite
, it will return a positive value for bothneurite_type=NeuriteType.axon
andneurite_type=NeuriteType.basal_dendrite
- 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.