navis.bending_flow¶
- navis.bending_flow(x)[source]¶
Calculate synapse “bending” flow.
This is a variation of the algorithm for calculating synapse flow from Schneider-Mizell et al. (eLife, 2016).
The way this implementation works is by iterating over each branch point and counting the number of pre->post synapse paths that “flow” from one child branch to the other(s).
Notes
This is algorithm appears to be more reliable than synapse flow centrality for identifying the main branch point for neurons that have incompletely annotated synapses.
- Parameters:
x (TreeNeuron | MeshNeuron | NeuronList) – Neuron(s) to calculate bending flow for. Must have connectors!
parallel (bool) – If True and input is NeuronList, use parallel processing. Requires pathos.
n_cores (int, optional) – Numbers of cores to use if
parallel=True
. Defaults to half the available cores.progress (bool) – Whether to show a progress bar. Overruled by
navis.set_pbars
.omit_failures (bool) – If True will omit failures instead of raising an exception. Ignored if input is single neuron.
- Returns:
Adds “bending_flow” as column in the node table (for TreeNeurons) or as .bending_flow property (for MeshNeurons).
- Return type:
neuron
Examples
>>> import navis >>> n = navis.example_neurons(1) >>> n.reroot(n.soma, inplace=True) >>> _ = navis.bending_flow(n) >>> n.nodes.bending_flow.max() 785645
See also
synapse_flow_centrality()
Calculate synapse flow centrality after Schneider-Mizell et al.
segregation_index()
Calculate segregation score (polarity).
arbor_segregation_index()
Calculate the a by-arbor segregation index.
split_axon_dendrite()
Split the neuron into axon, dendrite and primary neurite.