How to set biophysical properties for a template

Moderator: wwlytton

Post Reply
Qroid_montreal
Posts: 38
Joined: Sun Oct 16, 2011 1:58 pm

How to set biophysical properties for a template

Post by Qroid_montreal » Sun Sep 07, 2014 7:41 pm

Hi - I'm trying to implement a network of pretty complicated neurons (Mainen and Sejnowski's layer V pyramidal cell, http://senselab.med.yale.edu/ModelDB/Sh ... model=2488). I thought I was doing it right, but I now realise I'm having problems specifying the biophysics.

Following instructions from this post http://www.neuron.yale.edu/phpbb/viewto ... =12&t=1040, I xopen the neuron topology hoc file, then import it into Cell Builder. I believe this is when I should specify the biophysical properties. Is it possible to set these in the original hoc file that I xopen'd? That is, if the biophysics is already set when I hit "import" in the management tab, will they be "loaded" into Cell Builder? I'm trying this, but unfortunately all biophysics are absent from the template hoc file. I tried manually inserting the biophysics hoc code into the template file, or loading the template and then specifying the biophysics, but both of those screwed things up pretty fast...

Thank you so much for any help. I appreciate it!

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

Re: How to set biophysical properties for a template

Post by ted » Mon Sep 08, 2014 11:09 am

Qroid_montreal wrote:I xopen the neuron topology hoc file, then import it into Cell Builder. I believe this is when I should specify the biophysical properties. . . . if the biophysics is already set when I hit "import" in the management tab, will they be "loaded" into Cell Builder?
Unfortunately the answer is no. Note the comment on the CellBuilder's Management/Import page:
"From top level, imports: Topology, 3-D info."

I should mention that the voltage-gated mechanisms used in that particular model are highly temperature dependent, and indeed were designed to work at only a single temperature: 37 deg C. In your own hoc code, be sure to specify
celsius = 37

Qroid_montreal
Posts: 38
Joined: Sun Oct 16, 2011 1:58 pm

Re: How to set biophysical properties for a template

Post by Qroid_montreal » Mon Sep 08, 2014 11:40 am

Hi Ted - thanks so much. If I want to create a template with xopen -> Cell Builder -> Network Builder, what are my options for specifying the biophysics? Do I need to do it by hand in Cell Builder? Is it possible to modify the template hoc file with the appropriate lines of code? Like I said, I also tried creating a biophysics-less template, creating a few instances, and then setting the biophysics for each instance, but unfortunately that didn't work.

Qroid_montreal
Posts: 38
Joined: Sun Oct 16, 2011 1:58 pm

Re: How to set biophysical properties for a template

Post by Qroid_montreal » Mon Sep 08, 2014 11:43 am

p.s. Thanks for the warning. I checked and my hoc code does include "celsius = 37".

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

Re: How to set biophysical properties for a template

Post by ted » Tue Sep 09, 2014 10:31 am

Qroid_montreal wrote:options for specifying the biophysics
The GUI tools for model specification (CellBuilder, Network Builder, Channel Builder, Linear Circuit Builder) and simulation control (e.g. VariableStepControl), and hoc code exported from those tools, have several major advantages over user-written code. The most important of these are:
1. They make it easy for users to ensure that the computational implementation of a model is correct and bug-free.
2. They make it easy to accomplish tasks that would otherwise be very difficult for most users, e.g. taking advantage of subsets to create a correct and efficient model setup strategy, using the d_lambda rule for spatial discretization, specifying inhomogeneous distributions of channel densities.

So I generally advise users to avoid writing code as much as possible, on the principle that "a chance to write code is a chance to write buggy code."

That said, the hoc code exported from these tools is also well-organized, often easily understood to the point of having tutorial value. It is also reusable and modifiable, as long as you know what you're doing and test the results of any changes you make to make sure you didn't break anything.

Qroid_montreal
Posts: 38
Joined: Sun Oct 16, 2011 1:58 pm

Re: How to set biophysical properties for a template

Post by Qroid_montreal » Fri Oct 03, 2014 5:17 pm

Hi Ted - Thank you! That helps a lot.

I'm now doing my best to set the biophysics in Cell Builder. However I've hit a problem. I Imported the Mainen and Sejnowski 1996 L5 pyramidal cell model into Cell Builder, and I see the morphometric data looks right in the shape plot. I started setting the biophysics with the Biophysics tab following these instructions http://www.neuron.yale.edu/neuron/stati ... ophys.html. Unfortunately, I'm being asked to enter the parameters for all 176 sections individually. Is there a way around this?

For example, in the code all the dend sections are in the list 'dendritic', so parameter values for all dend section can be set with "forsec dendritic". Is there a way to do something similar in CellBuilder->Biophysics? I'm happy to spend a couple hours inputting data, but it would be nice (and less chance for mistakes!) if I could avoid it.

I tried searching for this in the archives but I didn't see it. Thank you so much.

Qroid_montreal
Posts: 38
Joined: Sun Oct 16, 2011 1:58 pm

Re: How to set biophysical properties for a template

Post by Qroid_montreal » Fri Oct 03, 2014 5:57 pm

Never mind! I just saw these instructions for creating subsets http://www.neuron.yale.edu/neuron/stati ... bsets.html, which I'm guessing is exactly what I'm describing.

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

Re: How to set biophysical properties for a template

Post by ted » Fri Oct 03, 2014 6:29 pm

Qroid_montreal wrote:I Imported the Mainen and Sejnowski 1996 L5 pyramidal cell model into Cell Builder
Actually, you have to be careful about that. The code in demofig1.hoc takes into account the contribution of spines to surface area by distorting cell morphology (the "folding factor" approach described by Jack et al (1989) and Major et al. (1994)). It's a perfectly legitimate way to make the equations work out, but if you then import that distored morphology into a CellBuilder, the result is a model cell in which none of the diamters or lengths is the same as the biological original.
the morphometric data looks right in the shape plot.
Appearances can be deceptive. Consider the L5 pyramidal cell. Using the original morophometric data, the long primary apical branch that bifurcates about midway between the soma and the apical tuft has these measurements
oc>dend11[22] print L, diam
398.28092 4.3886497
but after that neurite's "folding factor" is applied
oc>dend11[22] print L,diam
414.09084 5.058138

"I can live with that."

Maybe, but you have to realize that the contribution of spines to surface area has already been "baked into" the model, and you better be happy with the particular spine area contribution that they used.

For some time now, most modelers who are creating model cells based on detailed morphometric data aren't using the "folding factor" approach. Instead they're just multiplying specific membrane capacitance and channel densities by a factor that represents the fractional increase of surface area. Example: if you assume that a particular neurite's spine density is 1 spine/um2 and that average spine surface area is 1 um2, the effective total surface area of that neurite will be twice as large as one would calculate from L and diam (or the pt3d data), so multiply that section's cm and channel densities by 2.

If on the other hand you assume that spine density is best described in terms of spines per um length, the relative contribution of spines to surface area will depend on local neurite diameter.
area of a 1 um length of bare neurite with diameter diam = PI*diam
So if there is 1 spine/um, and average spine area is 1 um2, the total area of a 1 um length of neurite is 1 + PI*diam, so spines increase neurite area by the factor (1 + PI*diam)/(PI*diam) = 1 + 1/(PI*diam). This means that, after nseg has been specified, one must iterate over all dendrites (soma too if the same rule applies to soma membrane) and apply the appropriate factor to all density parameters. Example: assuming that the soma and dendrites all have spines, and have all been appended to a SectionList called spiny, one would
forsec spiny for (x,0) { // iterate over internal nodes only
factor = 1+1/(PI*diam(x))
cm(x) *= factor
gbar_naf(x) *= factor // assuming that mechanism with suffixes naf and kdr have been inserted
gbar_kdr(x) *= factor
. . . etc. . . .
}

To me, it makes more sense that spine density should be specified as spines per unit area, not per unit length.

Fortunately the source code for their model contains all of the original morphologies, free of any "corrections". Use NEURON to execute one of the hoc files in the cells subdirectory; the code for the L5 pyramid is in j4a.hoc, and it creates a model that imports nicely into the CellBuilder.
I started setting the biophysics with the Biophysics tab following these instructions http://www.neuron.yale.edu/neuron/stati ... ophys.html. Unfortunately, I'm being asked to enter the parameters for all 176 sections individually. Is there a way around this?

For example, in the code all the dend sections are in the list 'dendritic', so parameter values for all dend section can be set with "forsec dendritic". Is there a way to do something similar in CellBuilder->Biophysics?
An important question. In your excitement (or fatigue), you may have skipped over the part of the CellBuilder tutorial that addresses how to define subsets. It's step 2 in that tutorial.

And if you want to specify that some parameter varies systematically over the cell, e.g. as a function of distance from the soma, you'll want to look at the CellBuilder tutorial about
"Specifying parameterized variation of biophysical properties"--see
http://www.neuron.yale.edu/neuron/stati ... /main.html

Qroid_montreal
Posts: 38
Joined: Sun Oct 16, 2011 1:58 pm

Re: How to set biophysical properties for a template

Post by Qroid_montreal » Sun Oct 05, 2014 1:41 pm

Hi Ted - thank you very much. I loaded the j4a.hoc file after modifying it to include the axon, then imported this into Cell Builder. To be honest any spontaneously spiking pyramidal cell model will do for my purposes, so I didn't spend much energy worrying about the treatment of spines. That's just laziness/time management on my part, so thanks for drawing my attention to it.

And yes! I found the Subsets tutorial. Thanks again.

Post Reply