navis.synapse_flow_centrality¶
- navis.synapse_flow_centrality(x, mode='sum')[source]¶
Calculate synapse flow centrality (SFC).
From Schneider-Mizell et al. (2016): “We use flow centrality for four purposes. First, to split an arbor into axon and dendrite at the maximum centrifugal SFC, which is a preliminary step for computing the segregation index, for expressing all kinds of connectivity edges (e.g. axo-axonic, dendro-dendritic) in the wiring diagram, or for rendering the arbor in 3d with differently colored regions. Second, to quantitatively estimate the cable distance between the axon terminals and dendritic arbor by measuring the amount of cable with the maximum centrifugal SFC value. Third, to measure the cable length of the main dendritic shafts using centripetal SFC, which applies only to insect neurons with at least one output synapse in their dendritic arbor. And fourth, to weigh the color of each skeleton node in a 3d view, providing a characteristic signature of the arbor that enables subjective evaluation of its identity.”
Losely based on Alex Bates’ implemention in catnat.
- Parameters:
x (TreeNeuron | MeshNeuron | NeuronList) – Neuron(s) to calculate synapse flow centrality for. Must have connectors!
mode ('centrifugal' | 'centripetal' | 'sum', optional) –
- Type of flow centrality to calculate. There are three flavors::
centrifugal counts paths from proximal inputs to distal outputs
centripetal counts paths from distal inputs to proximal outputs
the sum of both - this is the original implementation
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 “synapse_flow_centrality” as column in the node table (for TreeNeurons) or as .synapse_flow_centrality property (for MeshNeurons).
- Return type:
neuron
Examples
>>> import navis >>> n = navis.example_neurons(2) >>> n.reroot(n.soma, inplace=True) >>> _ = navis.synapse_flow_centrality(n) >>> n[0].nodes.synapse_flow_centrality.max() 786969
See also
bending_flow()
Variation of synapse flow centrality: calculates bending flow.
arbor_segregation_index()
By-arbor segregation index.
segregation_index()
Calculates segregation score (polarity) of a neuron.
split_axon_dendrite()
Tries splitting a neuron into axon and dendrite.
flow_centrality()
Leaf-based version of flow centrality.