Connect multiple cells using connection probabilities

When Python is the interpreter, what is a good
design for the interface to the basic NEURON
concepts.

Moderator: hines

Post Reply
ekkya
Posts: 1
Joined: Thu Mar 01, 2018 1:06 pm

Connect multiple cells using connection probabilities

Post 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?
gladonias
Posts: 6
Joined: Thu Feb 28, 2019 5:24 am
Location: Waterford Institute of Technology

Re: Connect multiple cells using connection probabilities

Post 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).
ted
Site Admin
Posts: 5795
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Connect multiple cells using connection probabilities

Post 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?
ted
Site Admin
Posts: 5795
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Connect multiple cells using connection probabilities

Post 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.
gladonias
Posts: 6
Joined: Thu Feb 28, 2019 5:24 am
Location: Waterford Institute of Technology

Re: Connect multiple cells using connection probabilities

Post 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.
Post Reply