Page 1 of 1

Interpxyz.hoc interpolated segments not connecting

Posted: Fri Jun 13, 2014 2:08 am
by catubc
Hello everyone. I'm working on an LSA model which requires that I rebuild cell morphology from NEURON generated segments. I'm using Ted's interpxyz procedure. But it looks like small connecting sections are missing. Here's 2 pics of a cell which shows missing portions in the cell:

https://www.dropbox.com/s/nkrslrsfiwdydhh/1.png
https://www.dropbox.com/s/21y6xn00xexgmhw/2.png

Instead of looping over "l", I loop over nseg, but I don't think it makes a difference as I've checked and the "l" values are the same as the "ii" values over nseg.

Code: Select all

		for ii = 0, nseg-1 {

			xr = range.x[ii]+range.x[1]
			
			x_xtra(xr) = xint.x[ii]

			y_xtra(xr) = yint.x[ii]

			z_xtra(xr) = zint.x[ii]

			x_xtra(xr) = xint.x[ii+1]

			y_xtra(xr) = yint.x[ii+1]

			z_xtra(xr) = zint.x[ii+1]


		}   
Ted put a comment in the code, and I'm guessing that I'm trying to do what he was avoiding:

Code: Select all

// don't bother computing coords of the 0 and 1 ends
// also avoid writing coords of the 1 end into the last internal node's coords
I guess I just need to edit his code to save the end-points. Any advice on how to save complete interconnected geometry using NEURON segmentation?

Thanks for any advice, catubc

Re: Interpxyz.hoc interpolated segments not connecting

Posted: Fri Jun 13, 2014 4:24 pm
by ted
Only one of the figures was viewable, but it contains no clue as to what is happening. But before trying to debug whatever code is responsible for the figures, it would be good to consider whether interpolated segment center locations are at all relevant to line source approximation. interpxyz only finds the points along a neurite that correspond to (i-0.5)/nseg of the way along the neurite from its 0 to its 1 end, where i = 1..nseg. The locations of those points say absolutely nothing about the trajectory of the neurite between those points. That trajectory has to be of central importance to the line source approximation, and it is not disclosed by the locations of segment centers--it is contained in the pt3d data that define the geometry of each section.

Re: Interpxyz.hoc interpolated segments not connecting

Posted: Fri Jun 13, 2014 5:18 pm
by catubc
Thanks,Ted. I agree that the trajectory is of importance to the LSA, but I don't know how to get NEURON to compute currents between every single pair of connected 3d points?

Is there such a parameter? If not, then I'll need to write one up. I basically need i_membrane() and area() to be computed for every single segment between 3d points.

One way to do this is to take segment currents and "uninterpolate" them by dividing them up into fractions that project onto 3d point pairs. Would this be correct?

Earlier I was exporting the entire 3d point morphology but using currents between NEURONG generated segments. The LSA didn't look right, and now I understand why.

Re: Interpxyz.hoc interpolated segments not connecting

Posted: Fri Jun 13, 2014 7:37 pm
by ted
Your choices:
follow the lead of Gold et al.
or
invent your own program to do what they did

What you need to know if you choose the latter:
1. Current density is assumed to be constant along the length of a segment.
2. How NEURON turns 3D information (x,y,z,diam data) into a model. See
Hines, M.L. and Carnevale, N.T.
The NEURON simulation environment.
Neural Computation 9:1179-1209, 1997
which you can get from a link on this page http://www.neuron.yale.edu/neuron/nrnpubs,
and also
3-D specification of geometry at http://www.neuron.yale.edu/neuron/stati ... metry.html
3. Each adjacent pair of 3D data that lie within a single segment define a "line source". You need a policy for what to do about the (undoubtedly common) cases in which they lie in adjacent segments. Do you split into two line sources, each of which has the same current density as the segment in which it lies?

If you want to calculate the potential at more than one point, it is probably best to save all segment currents to a file and calculate the potentials _after_ the simulation has completed.

Re: Interpxyz.hoc interpolated segments not connecting

Posted: Fri Jun 13, 2014 11:30 pm
by catubc
Thanks Ted, much appreciate the advice. I've used Gold et al 2007 for a few months now, I'll take another look to see if this problem is solved and certainly read up on your references. I am surprised that NEURON doesn't have an option for generating currents between sequential 3d morphology points.

I will write my own code and perhaps post the result for vetting/review.

Catubc

Re: Interpxyz.hoc interpolated segments not connecting

Posted: Wed Jun 18, 2014 12:44 am
by catubc
Here's an update to anyone who's following this thread. I've been working on interpolating currents from nseg back to 3dpts and it's been quite a tricky endeavour. I'm getting close.

Here's some videos of full 3d point current propagation, the online resolution is ok, but you can download them to see the full segment resolution. The first one has about 6000 3dpoint pairs/cell, the second is about 15000 3dpoint pairs/cell.

https://www.dropbox.com/s/uc0scw558s8io ... e.Cell.avi
https://www.dropbox.com/s/12vkd0bgpbkfa ... leCell.avi

Thanks for all your advice Ted, it's been helpful and appreciated.

catubc