hoc file conversion....
Moderator: tom_morse
-
- Posts: 11
- Joined: Tue Aug 11, 2009 12:54 pm
hoc file conversion....
Hey Ted,
I have been trying to load a neuron morphology in .hoc format. but i fail to do so. All the files that are available online are in the swc format. I tried to load it through import 3D but the geometry of the structure i lost. i have downloaded this morphology from Duke south hampston archive. i m sending the link of the mentioned site below:
http://neuron.duke.edu/cells/usage.html#formats
Also can u help me in-case there is way to download the hoc file for the structure n121 (CA1 NEURON) directly.I f you the way can you please lemme know the steps to do so or if at all you have a converted .hoc file with the geometry of the mentioned neuron ,can u mail me the folder.
Regrets for any inconvenience caused
Thanking You.
my email id is:
divyeshshah_89@yahoo.co.in
I have been trying to load a neuron morphology in .hoc format. but i fail to do so. All the files that are available online are in the swc format. I tried to load it through import 3D but the geometry of the structure i lost. i have downloaded this morphology from Duke south hampston archive. i m sending the link of the mentioned site below:
http://neuron.duke.edu/cells/usage.html#formats
Also can u help me in-case there is way to download the hoc file for the structure n121 (CA1 NEURON) directly.I f you the way can you please lemme know the steps to do so or if at all you have a converted .hoc file with the geometry of the mentioned neuron ,can u mail me the folder.
Regrets for any inconvenience caused
Thanking You.
my email id is:
divyeshshah_89@yahoo.co.in
-
- Site Admin
- Posts: 6352
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: hoc file conversion....
Have you worked through the Import3D tutorial on the Documentation page
http://www.neuron.yale.edu/neuron/docs
?
http://www.neuron.yale.edu/neuron/docs
?
-
- Posts: 11
- Joined: Tue Aug 11, 2009 12:54 pm
Re: hoc file conversion....
Sir, i tried to get the file in cell builder. but the dimensions are not being loaded into the cell builder.
I used the method mentioned in tutorial.then when in cell builder i tried to view the celll geometry it was not there & only the default values used to come like dia=1 & L=100micrometers.
I used the method mentioned in tutorial.then when in cell builder i tried to view the celll geometry it was not there & only the default values used to come like dia=1 & L=100micrometers.
-
- Posts: 11
- Joined: Tue Aug 11, 2009 12:54 pm
Re: hoc file conversion....
Sir.i got the structure in hoc form .but when one reads the hoc file in MS word there in no defined geometry like nseg,length & dia.they are lost .so how to retain it.divyeshsah_89 wrote:Sir, i tried to get the file in cell builder. but the dimensions are not being loaded into the cell builder.
I used the method mentioned in tutorial.then when in cell builder i tried to view the celll geometry it was not there & only the default values used to come like dia=1 & L=100micrometers.
-
- Site Admin
- Posts: 6352
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: hoc file conversion....
Now I understand why you were concerned. Excellent question!divyeshsah_89 wrote:Sir, i tried to get the file in cell builder. but the dimensions are not being loaded into the cell builder.
I used the method mentioned in tutorial.then when in cell builder i tried to view the celll geometry it was not there & only the default values used to come like dia=1 & L=100micrometers.
There are two ways to specify the geometry of a section. One is the stylized method, which uses L and diam. This is fine for simplified models ("stick figure" cells). The other is the 3D method, which is used for models based on detailed anatomical measurements. The 3D method uses a sequence of
(x, y, z, diameter)
values to capture the detailed structure of a section--every wiggle and every bulge or narrowing (or as many as the human being who does the measurements has the patience for!). When you import such data into NEURON, all of the values are stored inside the program, and they are used by the code that calculates solutions and displays graphs of the shape of the cell.
But the CellBuilder doesn't show all of these details, even though they're all in the CellBuilder's ses file. Instead it shows a simplified drawing of the cell (just the start and end of each section, with a straight line between them), and its Geometry page lists the sections when the "Specify Strategy" button has a check mark in it. If you click on that button to dismiss the check mark, you'll see that all of the section names simply vanish. That's because the CellBuilder doesn't have any way to allow you to change the 3D data.
If you go back to "Specify Strategy," select one of the sections (for example, soma), and then click on L and diam under "Constant value over subset", then clear the "Specify Strategy" checkbox, you will now see the name
soma: L. diam
in the grey column, and if you select that item you'll see L and diam in the right panel, with the values 100 and 1. But if you do this, you will tell NEURON to ignore the original anatomical data and treat the soma as an ordinary cylinder with this L and diam. Probably not a good idea.
I just tried this now with the pyramidal cell that is one of the models offered by the neurondemo example program. After selecting the pyramidal cell model, then importing it into a CellBuilder, I saved the CellBuilder to a ses file and exited NEURON. Next I started NEURON, loaded the ses file I had just saved, and saw the CellBuilder pop up. I clicked on Continuous Create and typed
soma psection()
at the oc> prompt in NEURON's xterm. This made NEURON print the following
Code: Select all
soma { nseg=1 L=37.101 Ra=35.4
/*location 0 attached to cell 0*/
/* First segment only */
insert morphology { diam=22.0682}
insert capacitance { cm=1}
}
Finally, I selected soma in the CellBuilder's Geometry page with "Specify Strategy" checked, clicked on the L and diam "Constant value over subset" buttons, and clicked on "Specify Strategy" to uncheck it, and then typed
soma psection()
again. Here's what NEURON told me:
Code: Select all
soma { nseg=1 L=100 Ra=35.4
/*location 0 attached to cell 0*/
/* First segment only */
insert morphology { diam=1}
insert capacitance { cm=1}
}
If there's a moral to this story, it is this: when you're dealing with models based on imported morphometric data, the only thing to change on the CellBuilder's Geometry page is the method for specifying the spatial grid. If you need to know about the anatomical properties of a section, you can use
sectionname psection()
to discover total length, but if you want to examine it in detail, you need to use the pt3d functions. I suggest reading about Geometry in the Programmer's Reference
http://www.neuron.yale.edu/neuron/stati ... metry.html
This little procedure reports all of a section's pt3d data:
Code: Select all
proc print3d() { local ii
print secname(), " is based on ", n3d(), "measurements"
for ii=0,n3d()-1 {
print ii, x3d(ii), y3d(ii), z3d(ii), diam3d(ii)
}
}
Code: Select all
oc>dendrite_1 print3d()
dendrite_1[0] is based on 4 measurements
0 0.25 -1.125 0 3.5
1 0.75 0.875 2 3.5
2 1.25 2.875 3.5 3.5
3 0.25 6.375 5 3.5
-
- Site Admin
- Posts: 6352
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: hoc file conversion....
If you're going to be doing much programming, you'll probably want to use a different tool to edit programs. For MSWin I like the free version of NoteTab (from http://www.notetab.com/), but there are many others to choose from, such as Programmer's Notepad (http://www.pnotepad.org/).divyeshsah_89 wrote:i got the structure in hoc form .but when one reads the hoc file in MS word
-
- Posts: 11
- Joined: Tue Aug 11, 2009 12:54 pm
Re: hoc file conversion....
thank you for the help.
i could almost understand what you replied except for using the pt3d functions. also could you please tell me how to save the save the geometry once i get using the psection()..please if you could tell me how to exactly retain the entire geometry cause i can only avail the geometry of the soma..also when i try to convert the geometry of the soma into .hoc format all the data is lost..
i could almost understand what you replied except for using the pt3d functions. also could you please tell me how to save the save the geometry once i get using the psection()..please if you could tell me how to exactly retain the entire geometry cause i can only avail the geometry of the soma..also when i try to convert the geometry of the soma into .hoc format all the data is lost..
-
- Site Admin
- Posts: 6352
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: hoc file conversion....
Read about them in the Programmer's Reference.divyeshsah_89 wrote:i could almost understand what you replied except for using the pt3d functions.
The CellBuilder can write a hoc file that contains a complete specification of geometry and biophysics. Click on the Management button, then on Export, then "Export to file"also could you please tell me how to save the save the geometry once i get using the psection()..please if you could tell me how to exactly retain the entire geometry
-
- Posts: 11
- Joined: Tue Aug 11, 2009 12:54 pm
Re: hoc file conversion....
Well sir i tried doing it thruogh the same but when u see the hoc code u will find the goemetry like nseg ,L and dia are lost .
sir can u please send me the hoc file directly through mail as i am facing time constraint to complete my project.I want the hoc file for n121 CA1 neuron.can u do that please if yes send me to divyeshshah_89@yahoo.co.in
sir can u please send me the hoc file directly through mail as i am facing time constraint to complete my project.I want the hoc file for n121 CA1 neuron.can u do that please if yes send me to divyeshshah_89@yahoo.co.in
-
- Site Admin
- Posts: 6352
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: hoc file conversion....
When you have time, please read the following, which is copied straight from the documentation here:divyeshsah_89 wrote:Well sir i tried doing it thruogh the same but when u see the hoc code u will find the goemetry like nseg ,L and dia are lost .
http://www.neuron.yale.edu/neuron/stati ... metry.html
"There are two ways to specify section geometry: 1) The stylized method simply specifies parameters for length and diameter. 2) The 3-D method specifies a section's shape, orientation, and location in three dimensions."
In the stylized method, one writes hoc statements that directly assign values to L and diam. But the hoc code for a model based on imported morphometric data will not contain any assignment statements of the form
L = this
or
diam = that
Instead, models based on detailed morphometric data specify section geometry with the 3-D method, in which there are statements that specify a series of points in space, along with a diameter at each point. NEURON uses those values (and each section's nseg) to calculate section L and the equivalent diameter of each segment.
As far as nseg is concerned--
Just because you don't see an assignment statement of the form
nseg = something
in a hoc file doesn't mean that sections don't have a value for nseg. Every section has its own nseg parameter, and by default its value will be 1.
Read through the hoc code exported from the CellBuilder and you will discover that it includes a procedure called geom_nseg(). This procedure sets the nseg value for each section, according to whatever rule you specified on the CellBuilder's Geometry/Specify Strategy page. If you don't specify any strategy, geom_nseg() will be empty and won't do anything at all, and each section will have nseg equal to 1.
You have everything you need to generate it yourself.can u please send me the hoc file directly through mail as i am facing time constraint to complete my project.I want the hoc file for n121 CA1 neuron.can u do that please if yes send me to divyeshshah_89@yahoo.co.in