Network of cells using gap jucntion

Moderator: wwlytton

Post Reply
nianwosuh
Posts: 39
Joined: Tue Jul 27, 2010 11:00 pm

Network of cells using gap jucntion

Post by nianwosuh »

Please, could you explain to me why this code generates error;

load_file ("Rod.tem") // load template for Rod cells

rodx = 4 // number of horizontal layers of cells
rody = 5 // number of vertical layers of cells

ncells = rodx * rody // Total number of Rod cells to create

objref Rod[rodx][rody] // create 2 dimesional array of rod cells

for i=0, rodx-1 {
for j=0, rody-1 {
Rod[j] = new Rodcell() // create Rod cels from template

}
}
-----------------------------------------------------------------------------------------There is no error in the codes above -----------------------------------------------------------------------
// create connections

for i=0, rodx-1 {
for j=0, rody-2 {

objref GapRod[2] // Gap connection among rods
for k=0, 1 {
GapRod[k] = new gap()


Rod[j] GapRod[0].loc(0.95) // just inside the distal end of first cell
Rod[j+1] GapRod[1].loc(0.05) // just inside the proximal end of the second cell
setpointer GapRod[0].vgap, Rod[j+1].v(0.05)
setpointer GapRod[1].vgap, Rod[j].v(0.95)

}
}

}
-----------------------------------------------------------------------------The error is between the first horizontal line and this -----------------------------------------------
The error generated is "nrniv: GapRod not an array variable
in /cygdrive/C/Documents and Settings/_Irene_/My Documents/Research at WFUMC/Peer review papers/Diencephalon/Retina/Network_Retina_Cells/Rod_Network/Create_Cells.hoc near line 28
GapRod[k] = new gap()"

Thank you
Irene
shailesh
Posts: 104
Joined: Thu Mar 10, 2011 12:11 am

Re: Network of cells using Gap Junctions

Post by shailesh »

Hi Irene,

I believe you have adapted the gap junction modeling technique provided in The NEURON Book. That example (page 272, Topic 10.1.2.1) was meant for modeling a single gap junction between two cells. Your model involves a 2-Dimensional array of cells and hence the code would require certain tweaking to fit the gap junctions.


Errors / Issues
-------------------
Your error: "GapRod not an array variable" is because you are trying to define the same pair of point processes for all the cells, at every run of the for loops. You would need to define separate point processes for each of the gap junction connections. This can be achieved by making a 2-dimensional array of point processes. I have elaborated below.

Another change that would be needed is:
GapRod[....] = new gap(0.5)

You can read more here:
https://www.neuron.yale.edu/phpBB2/view ... tion#p6012
- "an actual location must be specified when a point process is created"


Model
-------------------
[]-[]-[]-[]-[]
[]-[]-[]-[]-[]
[]-[]-[]-[]-[]
[]-[]-[]-[]-[]

Your model has 20 cells arranged as 4 rows (rodx) * 5 columns (rody).
The gap junctions are implemented only between the horizontal neighbors and NOT the vertical neighbors.
Thus we have a total of 16 gap junctions. In more general terms: [rodx * (rody-1)] gap junctions.
As we need to have a pair of point processes for implementing a single gap junction, here we will need a total of 32 point processes. In more general terms: [rodx * (2*(rody-1))] point processes.
This we create as:
objref GapRod[rodx][2*(rody-1)]

The rest of the working is pretty similar.


Updated Code
-------------------
rodx = 4 // number of horizontal layers of cells
rody = 5 // number of vertical layers of cells

create Rod[rodx][rody]

forall {
//Specify Cell Parameters Here
}

objref GapRod[rodx][2*(rody-1)] // Gap connection among rods

for i=0, rodx-1 {
for j=0, ((2*(rody-1))-1) {
GapRod[j] = new gap(0.5)
GapRod[j].r = 20
}
}

for i=0, rodx-1 {
for j=0, rody-2 {
Rod[j] GapRod[(2*j)].loc(0.95) // just inside the distal end of first cell
Rod[j+1] GapRod[(2*j)+1].loc(0.05) // just inside the proximal end of the second cell
setpointer GapRod[(2*j)].vgap, Rod[j+1].v(0.05)
setpointer GapRod[(2*j)+1].vgap, Rod[j].v(0.95)
}
}


Hope that helps out :)
I am an amateur myself at NEURON programming and hence please do correct me wherever I have erred. Posting here because I had been working on a very similar model a few months back and so thought I could help.

Cheers,

Shailesh Appukuttan
Post Reply