Page 1 of 1

Connect multiple cells using connection probabilities

Posted: Sat Mar 03, 2018 10:15 am
by ekkya
I'm trying to connect multiple neuron cells using the Blue Brain Project neuron models. I need to take into account the connection probabilities between the cells. So I was thinking of multiplying the connection probability by the number of dendrites in the post synaptic cell. Is the number of dendrites present in the expression dend[number_of_dendrites?

Re: Connect multiple cells using connection probabilities

Posted: Mon Sep 14, 2020 7:36 am
by gladonias
Let's say you instantiated a model of a neuron into a variable named cell, you can get the total number of dendritic compartments with len(cell.dend).

Re: Connect multiple cells using connection probabilities

Posted: Mon Sep 14, 2020 1:46 pm
by ted
gladonias wrote: Mon Sep 14, 2020 7:36 am Let's say you instantiated a model of a neuron into a variable named cell, you can get the total number of dendritic compartments with len(cell.dend).
Interesting. Can you provide a working example?

Re: Connect multiple cells using connection probabilities

Posted: Mon Sep 14, 2020 1:47 pm
by ted
ekkya wrote:I'm trying to connect multiple neuron cells . . . I need to take into account the connection probabilities between the cells. So I was thinking of multiplying the connection probability by the number of dendrites in the post synaptic cell.
Why would that be useful?
Is the number of dendrites present in the expression dend[number_of_dendrites?
Try it and see.

Re: Connect multiple cells using connection probabilities

Posted: Thu Sep 17, 2020 11:26 am
by gladonias
ted wrote: Mon Sep 14, 2020 1:46 pm
gladonias wrote: Mon Sep 14, 2020 7:36 am Let's say you instantiated a model of a neuron into a variable named cell, you can get the total number of dendritic compartments with len(cell.dend).
Interesting. Can you provide a working example?
Here's a snippet of one of my scripts where preSyn is the pre-synaptic neuron, and postSyn is the post-synaptic one:

Code: Select all

def establishSynapses(preSyn, postSyn, thres=10, w=.04):

	# Calculate the number of connections between preSyn and postSyn.
	numConnections = int(round((getConnectionProbability(preSyn, postSyn) / 100) * len(postSyn.dend), 0))

	for i in range(numConnections):
		syn = neuron.h.ExpSyn(0.5, sec = postSyn.dend[i])
		syns.append(syn)
		nc = neuron.h.NetCon(preSyn.soma[0](0.5)._ref_v, syn, sec=preSyn.soma[0])
		nc.weight[0] = w
		nc.delay = 0
		nc.threshold = thres
		nclist.append(nc)
The Blue Brain Project's NMC Portal also provides information on connection probabilities between different combinations of models of neurons. Because I was trying to create a network of one hundred-ish neurons, I didn't want to scrape their website to get each pair of connection probability, so I got every pair I needed and saved to a local file. Then, I use the function getConnectionProbability only to get the specific probability value from the file.

Then I divided it by 100 because, in the website, the probability is given in percentage, and I multiple it by the number of dendritic compartments, which I round it to zero decimal places and convert it to integer so I can use it in the for loop, one for the number of connection and other for the number of synapses per connection.

The variable numConnections is the fraction of dendritic compartments based on the connection probability of that specific pair of neurons. Thus, my for loop will run for numConnections times and in each time, it is going to establish one synapse per connection. NMC Portal provides the number of synapses per connection as well, in this case I'd say the best approach would be to code a nested for loop.

The variables for h.ExpSyn and h.NetStim follow the same nomenclature as the ones in the NEURON+Python Tutorial.