pymaid.predict_connectivity¶
- pymaid.predict_connectivity(source, target, method='possible_contacts', remote_instance=None, **kwargs)[source]¶
Calculate potential synapses from source onto target neurons.
Based on a concept by Alexander Bates.
- Parameters
source (CatmaidNeuron | CatmaidNeuronList) – Neuron(s) for which to compute potential connectivity. This is unidirectional: source -> target.
target (CatmaidNeuron | CatmaidNeuronList) – Neuron(s) for which to compute potential connectivity. This is unidirectional: source -> target.
method ('possible_contacts') – Method to use for calculations. See Notes.
**kwargs –
- For method ‘possible_contacts’:
dist
to set distance between connectors and nodes manually.n_irq
to set number of interquartile ranges of harmonic mean. Default = 2.
Notes
- Method
possible_contacts
: Calculating harmonic mean of distances
d
(connector->node) at which onnections between neurons A and neurons B occur.For all presynapses of neurons A, check if they are within
n_irq
(default=2) interquartile range ofd
of a neuron B node.
Neurons without cable or presynapses will be assigned a predicted connectivity of 0.
- Returns
Matrix holding possible synaptic contacts. Sources are rows, targets are columns:
target1 target2 target3 ... source1 5 1 0 source2 10 20 5 source3 4 3 15 ...
- Return type
pandas.DataFrame