Morphology and AP generation

sohaib786
Posts: 13
Joined: Thu Feb 14, 2019 4:31 am

Morphology and AP generation

Post by sohaib786 » Sun Mar 10, 2019 6:16 am

Greetings all,
I am interested in finding out the difference, morphology could have on the generation of AP. In its perusal, I wrote a code using neuron GUI + python for exciting at distal synapses and generating AP. ( Action Potential)
The problem is that if we provide stimulus at different positions we get different AP frequency. So, how could/should we compare between the control and treated group morphology, to say for sure that the difference in frequency is due to the difference in treatment and not due to a spatial location of a particular synapse.

Thanks for your time.

ted
Site Admin
Posts: 5633
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Morphology and AP generation

Post by ted » Tue Mar 12, 2019 10:38 am

Your question is ill-posed, which may be why you can't answer it yourself. There are too many independent variables--stimulus location, morphology, treatment status and effect.

sohaib786
Posts: 13
Joined: Thu Feb 14, 2019 4:31 am

Re: Morphology and AP generation

Post by sohaib786 » Tue Mar 19, 2019 9:14 am

I am trying to study the effect of the altered structure on cell function caused due to REM sleep deprivation.
I have morphology for both control and treatment group, and I am using biophysical properties of the control group. I am exciting a single dendrite at its midpoint and checking voltage at the soma. This step is repeated for all the synapses in the cell and the average voltage, average spike count is calculated.
Does it seem viable to use this average voltage & spike count to comment on the excitability of the cell?

Thanks for the time and help.

ted
Site Admin
Posts: 5633
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Morphology and AP generation

Post by ted » Tue Mar 19, 2019 11:32 am

Depends on what you mean by "excitability." Do you mean "responsiveness to injected current" or do you mean "responsiveness to network activity"? Chop off all dendrites so that only the spike trigger zone remains, and you have a cell that is "most responsive to injected current" but is completely unresponsive to network activity because it has no synaptic inputs.

From the computational experiment you propose, it sounds like you're primarily interested in response to network activity.
I am exciting a single dendrite at its midpoint
What is the time course of "excitation"? A current step? a pulse? a current with time course and amplitude that mimics a single synaptic activation? a single activation of a conductance change synapse in which the conductance follows an experimentally determined time course and has an experimentally determined reversal potential?

What makes "midpoint" the most reasonable location for the input? Why not base the locations tested on the available literature regarding locations of excitatory synapses, or on the locations of excitatory synapses from axons in a particular afferent path? If some afferent pathway is particularly important, maybe the most relevant measure of the effect of dendritic remodeling would combine {what remodeling does to the amount of membrane in a region that is selectively innervated by those axons} with {the ability of synaptic inputs in that region to affect membrane potential at the spike trigger zone}. Why not test many locations over the surface of the cell, one location at a time? Why not use transfer impedance as the measure of coupling between the synaptic location and the soma (or other presumed spike trigger zone--see Jaffe and Carnevale, "Passive normalization of synaptic integration influenced by dendritic architecture." J Neurophysiol. 82:3268-85, 1999, and maybe also some of the experimental and theoretical papers that cite it, e.g. Winters et al. "Amplitude normalization of dendritic EPSPs at the soma of binaural coincidence detector neurons of the medial superior olive." J Neurosci. 37:3138-3149, 2017).

Transfer impedance or EPSP amplitude at the soma are plausible measures of synaptic efficacy. Why would spike count be useful? Presumably the aim of your study is to say something about the effects of activating individual synapses. Are these "detonator synapses", or are the targeted cells thought to be poised delicately just below spike threshold?

sohaib786
Posts: 13
Joined: Thu Feb 14, 2019 4:31 am

Re: Morphology and AP generation

Post by sohaib786 » Fri Mar 22, 2019 6:19 am

That was really insightful.

By Excitability, I meant that the cell may report a higher number of AP's by a reduction in the threshold, reduced spike interval, or increased amplitude of Vsoma.
The reason for this view is because REM sleep deprivation has been hypothesized to increase cell excitability. It has been found that Na-K ATPase is significantly increased in it. Also, from the study of siskova et al 2014 (Dendritic Structural Degeneration Is Functionally Linked to Cellular Hyperexcitability in a Mouse Model of Alzheimer’s Disease), is linked to neurodegeneration. Loss of dendritic arbors is a key observation in REM sleep deprivation also.

Increased Excitability would have been the result of the altered ionic concentration and morphology. So, I was trying to find out if only morphology itself had some role in it, as an increase in ions & their kinetics has not been taken into account presently.
What is the time course of "excitation"?
I used a current clamp with I ∈ [1,10] nA , dur ∈ [5,500] ms. expsyn & exp2syn with tau1=0.2 tau2=2 syn.i=5 and other values in literature.
What makes "midpoint" the most reasonable location for the input?

The aim was to record the potential at soma with an equal amount of inputs at all dendrites. Any point could have been chosen uniformly.
However, On choosing midpoint, the signal will always travel half the length of the particular dendrite which will take into account its morphological effects. Other points would have taken into consideration the previous effect in a disproportionate manner. Although this difference may be a minor one.

Distal and nearby dendrites provide a response in different ranges but averaging the whole value may provide a glimpse about an increased Vsoma in treated which would hint to an increased chance to generate AP.
Why not use transfer impedance as the measure of coupling between the synaptic location and the soma?
This seems to be a promising way through, which I had not known.


Thanks in advance.

ted
Site Admin
Posts: 5633
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Morphology and AP generation

Post by ted » Fri Mar 22, 2019 12:18 pm

Your problem actually involves three questions. The first is, what does the change of morphology do to the net excitation that the cell receives from synaptic inputs. The second is, what does it do to the likelihood that excitatory inputs that are electrically close to each other will elicit dendritic spikes. The third is, what does it do to the intrinsic excitability of the cell itself.

The third question can be addressed by determining what the change does to the cell's response to depolarizing current injected at or near the spike trigger zone. You can use a very brief pulse (0.1 ms) to discover the minimum amount of charge required to trigger a spike. That's probably all you need to do if your cell normally has a noisy resting potential and is only occasionally driven to fire a spike. If your cell is the target of axons that deliver prolonged volleys of spikes that elicit summating epsps, you'll probably need to examine your cell's response to prolonged depolarizing current injected at the soma--but how big should that current be, and how long should it last? Those are difficult questions, so let's skip them for the moment.

The second question requires many assumptions about channel distributions and the spatiotemporal structure of excitatory synaptic drive. Let's skip that too.

The first question is amenable to a computational experiment. You could do the following:

Code: Select all

discretize your model cell so that spatial error is acceptible (the d_lambda rule will work for this)
for each compartment in the model cell {
  at that location, attach a synaptic mechanism with parameters of a "unitary epsc"
  run a simulation and record the peak epsp amplitude at the soma
  detach the synaptic mechanism
}
use these results to calculate a measure of the "expected net excitatory drive seen at the soma"
A simple minded way to calculate such a measure is to just add up all of the somatically-observed peak epsp amplitudes. But a simple sum ignores the fact that the number of synapses attached to any particular compartment is proportional to compartment length (or surface area, depending on what experimental estimates you use), which varies from branch to branch. So a weighted sum would be more appropriate--

Code: Select all

sum = 0
for each compartment in the model cell {
  sum = sum + peak epsp amplitude * compartment length
  (or sum = sum + peak epsp amplitude * compartment area)
}
The only disadvantage of this approach is that it involves N simulations, where N = total number of compartments in the model. However, computer time is cheap.

sohaib786
Posts: 13
Joined: Thu Feb 14, 2019 4:31 am

Re: Morphology and AP generation

Post by sohaib786 » Sat Mar 23, 2019 1:30 pm

I tried doing a weighted compartment analysis. However, I checked some of the parameters of all the dendrites to get an idea and found this problem.
I took a dendrite randomly and enquired into its segments and their morphological parameters.

Code: Select all

x = h.dend[2]
for i in x.allseg():
    print(i, i.area(), i.diam)

Code: Select all

Output
dend[2](0) 0.0 2.5799999237060547
dend[2](0.5) 108.0738645400843 2.5799999237060547
dend[2](1) 0.0 2.5799999237060547
I found that all dendrites had 3 segments. Segments 0.0 & 1.0 had 0 area. However, they had a diameter which was the same.
I could not understand why the diameter would have to be the same and why the area of the two compartments is zero.

Sorry, If I am asking a very stupid question. Thanks for your time.

ted
Site Admin
Posts: 5633
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Morphology and AP generation

Post by ted » Sat Mar 23, 2019 5:46 pm

Your question is not stupid in the least. The problem is that the Programmer's Reference isn't as easy to navigate as it should be.

You probably already know that a section represents an unbranched neurite, which is mathematically equivalent to a piece of cable. You may also know that NEURON generates simulations by numerical integration of a family of equations that are created by spatial discretization of the cable equation. In the original conceptual model of the physical system (cell), membrane potential is a continuous function of position in space. Spatial discretization is an attempt to make the computational task of generating numerical simulations more tractable. It does this by approximating the continuous conceptual model with a discontinuous system that is described by a finite number of equations that govern the time course of membrane potential at discrete locations in space. These locations are called nodes. Each section is represented by one or more pieces called segments, and for each segment there is a corresponding ODE that governs membrane potential at the midpoint of the segment. Segment midpoints are the section's "internal nodes." A section also has nodes at its 0 and 1 locations. Unlike the internal nodes, the nodes at 0 and 1 are not associated with any membrane, so there is no membrane current at 0 or 1, and the equations that describe the membrane potential at 0 or 1 do not involve membrane capacitance or conductance. Instead, v(0) and v(1) are calculated by algebraic equations (the "voltage divider equation," i.e. the weighted sum of the potentials at internal nodes of the immediately adjacent segments, where each weight is 1/axial resistance between an internal node and the 0 or 1 node).

Here are two idioms for using Python to iterate over nodes:
for seg in secname.allseg()
iterates over ALL of secname's nodes, including the nodes at 0 and 1.
for seg in secname
iterates over the internal nodes of secname.

This iterates over all segments (internal nodes) of all sections

Code: Select all

for sec in h.allsec():
  for seg in sec:
    . . . [i]other statements[/i] . . .

sohaib786
Posts: 13
Joined: Thu Feb 14, 2019 4:31 am

Re: Morphology and AP generation

Post by sohaib786 » Sun Mar 24, 2019 12:55 pm

Two things happen when this command is run.

Code: Select all

for sec in h.allsec():
  for seg in sec:
     print(seg) 
It prints

Code: Select all

soma(0.5)
dend[0](0.5)
dend[1](0.5)
dend[2](0.5)
dend[3](0.5)
so on and so forth
But sometime it prints

Code: Select all

soma(0.5)
dend[0](0.1)
dend[0](0.3)
dend[0](0.5)
dend[0](0.9)
dend[1](0.1)
dend[1](0.3)
dend[1](0.5)
dend[1](0.9)
so on and so forth
The file remains same both the times. Is there a way in which it reads all the internal nodes every time.

ted
Site Admin
Posts: 5633
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Morphology and AP generation

Post by ted » Sun Mar 24, 2019 10:46 pm

I don't like the looks of that. What happens if, instead of printing seg, you try to print sec and seg.x? You should get something like this
soma 0.5
dend 0.1
dend 0.3
dend 0.5
dend 0.7
dend 0.9

and if you created sections by doing
soma = h.Section(name='soma')
dend = h.Section(name='dend')
then printing h.secname() and seg.x should produce something like this
_pysec.soma 0.5
_pysec.dend 0.1
_pysec.dend 0.3
_pysec.dend 0.5
_pysec.dend 0.7
_pysec.dend 0.9

sohaib786
Posts: 13
Joined: Thu Feb 14, 2019 4:31 am

Re: Morphology and AP generation

Post by sohaib786 » Mon Mar 25, 2019 4:53 am

You should get something like this
I do get like this. But intriguingly, sometimes it doesn't print all of them. Also sometimes, when i load a file such as this.

Code: Select all

from neuron import h
h.load_file('/home/sohaib/neuron/ASC Files/fmc3_1')
h.load_file('/home/sohaib/neuron/ASC Files/fmc3_1')
(fmc3_1 is a hoc file)
It loads the file successfully. But when I try to load another file in the same jupyter notebook without closing or interrupting it, it doesn't load the new file and fetches the data from the old one. (Although it shows that it has fetched the new file.)

ted
Site Admin
Posts: 5633
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Morphology and AP generation

Post by ted » Mon Mar 25, 2019 10:12 am

To diagnose this problem and provide advice, we'll have to reproduce it. Can you zip up the hoc, NMODL, Python, and whatever other code is necessary to reproduce it, and email that zip file to
ted dot carnevale at yale dot edu
?

hines
Site Admin
Posts: 1580
Joined: Wed May 18, 2005 3:32 pm

Re: Morphology and AP generation

Post by hines » Mon Mar 25, 2019 10:24 am

I'm guessing that sometimes nseg=1 and sometimes nseg=5 and somewhere in the jupyter notebook that request is sometimes executed and
sometimes not. I'd need to have the notebook and all the external files it is loading to diagnose why/how that is occurring. Also what version of
NEURON is being used by the notebook.

Note that h.load_file("filename") will load only once. To force load again you have to use h.load_file(1, "filename") but if a template is declared in
the file it will fail.

sohaib786
Posts: 13
Joined: Thu Feb 14, 2019 4:31 am

Re: Morphology and AP generation

Post by sohaib786 » Tue Mar 26, 2019 1:49 am

email that zip file
Thanks. Sure.
what version of
NEURON is being used by the notebook
Neuron Version : NEURON -- VERSION 7.5 master (6b4c19f) 2017-09-25
Anaconda: Version 5.2.0 , Build Channel- py36_3

ted
Site Admin
Posts: 5633
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Morphology and AP generation

Post by ted » Wed Mar 27, 2019 12:17 am

I'm not a Jupyter user, so I just ran some tests with Python.
After
h.load_file("fmc3_1")
I tried

Code: Select all

for sec in h.allsec():
  for seg in sec:
    print(seg)
several times and it worked correctly all times. Also tried printing sec and seg.x, and h.secname() and seg.x several times. Each of these produced the appropriate result (iterated over every segment to print the section name and the x location of the segment). Iteration never omitted any segment. This is with NEURON compiled from very recent github development code--specifically
NEURON -- VERSION 7.7.0-25-gb277896 master (b277896) 2019-03-14

This leaves several possibilities open. Maybe there's an obscure problem with the version of NEURON you're using. Or maybe there's some problem using NEURON via Python from Jupyter. Do you see a problem with iteration over segments when you just use Python from NEURON, without Jupyter? And when you are using Jupyter, are you also using any of NEURON's GUI tools?

Post Reply