Cell Builder Output --> Procedure too big

Managing anatomically complex model cells with the CellBuilder. Importing morphometric data with NEURON's Import3D tool or Robert Cannon's CVAPP. Where to find detailed morphometric data.
Post Reply
barbaratrattner

Cell Builder Output --> Procedure too big

Post by barbaratrattner »

Hello!

I am using Neuron to create a model of electroporated cells, which I have reconstructed using AMIRA software. I am loading the reconstructed neurones into the CellBuilder and assign different subsections and biophysical parameters. When I am trying to export the neurone to .hoc, I cannot execute the procedure because there is an error message that the procedure is too big. I read in this forum that in this case, the procedure must be broken up into several smaller procedures, however this is difficult to realise in the output code from the cell builder (at least I have not succeeded so far), because it is not so well structured. Is there a way to tell the Cell Builder to create several small procedures initially? This would save me so much work, going through each of these long .hoc files, trying to split them.

Thank you very much in advance for your answer.
Best wishes,
Barbara
ted
Site Admin
Posts: 6289
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Cell Builder Output --> Procedure too big

Post by ted »

Your choice is to work hard or to work smart.

If you prefer to work hard, you're stuck with breaking one or more giant procedures into multiple smaller chunks. A decent programmer's editor that displays line numbers may be helpful in deciding where to make the breaks. My guess is that you were quite fastidious in tracing out every last bump and wiggle of the cell's morphology; that speaks for a certain dogged persistence that will serve you well in the task that awaits you.

If you prefer to work smart, don't bother exporting a hoc file. Use the CellBuilder to create subsets, enable its d_lambda spatial discretization rule, and assign cm and Ra to all sections (because spatial discretization depends on cm and Ra). Then turn Continuous Create on, and save the CellBuilder to a session file. When it comes time to use the cell in a model,
load_file("cell.ses")
where cell.ses is the CellBuilder's session file. Then you can use your own hoc or Python statements to assign other properties to the model cell. Note that if you change cm or Ra you will need to verify that spatial discretization is still adequate (how? ask and I'll tell).

"But what if, after I specify all the biophysical properties, I accidentally tweak something in the CellBuilder--that would override all the biophysical assignments I made!"

That's easy to prevent. Instead of simply load_file("cell.ses"), do this:

Code: Select all

load_file("cell.ses")
objref cb
cb = CellBuild[0] // assuming you only loaded one CellBuilder
cb.continuous = 0 // turns Continuous Create off
"But this big CellBuilder thing will be taking up a lot of room on my desktop."

Hide it with the Print & File Window Manager. If your code starts with

Code: Select all

load_file("nrngui.hoc")
load_file("cell.ses")
objref cb
cb = CellBuild[0] // assuming you only loaded one CellBuilder
cb.continuous = 0 // turns Continuous Create off
just add this statement
PWManager[0].hide(2)
barbaratrattner

Re: Cell Builder Output --> Procedure too big

Post by barbaratrattner »

Thank you very much for your fast reply!
I will try this strategy!

All the best,
Barbara
ted
Site Admin
Posts: 6289
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Cell Builder Output --> Procedure too big

Post by ted »

I revised my previous message slightly, adding a couple of hoc statements that in my haste I had omitted.

Another reason to use the CellBuilder to manage your model cell's properties: it greatly simplifies assigning biophysical properties that vary with location throughout the cell, e.g. present or absent in certain subsets of neurites, or are functions of a distance metric--see the CellBuilder tutorials on NEURON's Documentation page http://www.neuron.yale.edu/neuron/docs for more information about this.
Post Reply