reuse oc module to qualify software to parse .hoc data

Anything that doesn't fit elsewhere.
Post Reply
peter

reuse oc module to qualify software to parse .hoc data

Post by peter »

Hello,
I'm working on a 3D visualization tool which is
capable of rendering several kinds of geometric
structures. recently I get concened about rendering
neurophysiologic data in order to support
neurobiology faculty of my university.
Since neuron is used there for modeling purposes
nearly all data is specified in .hoc format.
My question is about if there is a way linking oc
module to other software for parsing reasons and
access the constructed data obj. structures afterwards
by a c /c++ interface.
I 've spent some time reading reference without
come across api definitions of this manner, putting
me in a position I can extract geometry data or
related attributes.
Maybe somebody with more comprehensive
knowledge on neuron may give me a clue on
feasibility and/or a starting point of my venture.

Thanks in advance

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

Re: reuse oc module to qualify software to parse .hoc data

Post by ted »

I don't understand the question, or even what you're trying to do.
Since neuron is used there for modeling purposes
nearly all data is specified in .hoc format.
Do you want to draw 3D renderings of physiological data?
(time series records of voltage, current, etc?)
Or anatomical data?
As far as I know, nobody uses hoc as a "primary" format for
any kind of experimental data. Any experimental data that gets
into hoc code starts out as some other format, either plain text
or some proprietary binary format. Why bother with an intermediate
format based on hoc?

Or do you want to make fancy renderings of simulation results?
If so, what's wrong with writing the numeric values fo plain text files
and postprocessing that?
yashavantha

rendering neurophysiologic data

Post by yashavantha »

As far as i have i have understood your question,


1.if you are interested in the simulation result data,

as Ted has said you can save the simulataion in -ascii format (window>print&filemanager>print>Ascii from NEURON gui giving whatever extention you like to give for the file) and you can use the numerical data obtained for your rendering.But ofcourse you have to remove the header and footer from the ascii file saved before using it. I myself have used MATLAB to give a better 3d visualisation to the volatage data obtained from simulataneous recording of 500 neuron network(using NEURON)obtained from my simulation. In neuron the simultaneous voltage recording from multiple neurons looks overlapped and it is difficult to visualise the details.

2. If you are interested in visualisation of the model structure embeded in the .hoc code,

you can use shape plot (graph>shapeplot)or model view(tools>modelview). Before that don't forget to give "access 'section' " command (if it is not stated in the .hoc code) ex. access soma , access cell[0].soma etc.

3.If your interest lies in the neuron structure data, it can be obtained from neurolucida tracing databases like,

http://neuron.duke.edu/cells/index/topindex.html
http://www.krasnow.gmu.edu/L-Neuron/database/index.html

have alook at this weblink too
http://microcircuit.epfl.ch/

You can use the cell viewer and editor CVAPP (written in JAVA), which i used for CA1 cell editing. It has an aditional feature of converting the structure (.swc) file in to NEURON (.hoc) or GENESIS usable file format. That may be of some use to you to develop a tool having better rendering than CVAPP.

http://neuron.duke.edu/cells/download.html

I hope this information will be of some help to you.
ted
Site Admin
Posts: 6299
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: rendering neurophysiologic data

Post by ted »

yashavantha wrote:As far as i have i have understood your question,
Very good suggestions. I have just a couple of things to add.
don't forget to give "access 'section' " command (if it is not stated in the .hoc code) ex. access soma , access cell[0].soma etc.
Many of NEURON's GUI tools expect a default section to exist. access is used
to specify which section is the default section, and it should only be asserted once
in a program or unexpected side-effects may occur (e.g. you may become
confused about which section's attributes you are referring to when you execute
a statement that doesn't explicitly specify the current section. You can read more
about access at
http://www.neuron.yale.edu/neuron/stati ... tml#access
You can use the cell viewer and editor CVAPP (written in JAVA), which i used for CA1 cell editing. It has an aditional feature of converting the structure (.swc) file in to NEURON (.hoc) or GENESIS usable file format.
I should mention that the latest standard release of NEURON has a tool for
importing morphometric data in NeuroLucida, Eutectic, and swc formats, so that
NEURON can use it--
NEURON Main Menu / Tools / Miscellaneous / Import3D
Morphometric data files frequently contain errors, and Import3D can automatically
fix many of the simpler kinds of errors. Some errors require human judgement and
intervention (manual editing of a copy of the original data file), and Import3D helps
you identify where these errors are and provide visual clues that may help you fix
them.

Finally, let me comment that this is an example of exactly the kind of exchange that
I hoped the NEURON Forum would make possible.
peter

reuse oc module to qualify software to parse .hoc data

Post by peter »

in the first place I want thank for your suggestions and apologise for let you puzzle on
my ambiguous questions such a long time .
Since I'm not an experienced user of neuron software it took my some time to work off
all the usefull tutorials and reference manual and qualifiy me to describe my needs more
precise.
So, the software tool I intend to create is a kind of CVAPP regarding its 3D rendering
features. But beneath a revised rendering/texturing engine, that will profit from usual hard-
ware acceleration on modern computers, I will start an attempt to visualize physiological
information(like: resistance,capacity, snapshots of ionic distribution,synapses,.. ).

>As far as I know, nobody uses hoc as a "primary" format for
>any kind of experimental data.
In my case .hoc is also used as intermediate higher level format, but the reason
why I want to access data from .hoc format is, that - besides this format is very popular and
widely used for a long time, it exactly meets the level of >data assembly< I need to
visually reconstruct a neuron. in my opinion there are two advantages :
There is no need to write a completely new parser to aquire and assemble all this needed
morphological and physiological data if there already is one.
furthermore I try to develop my software as convenient as possible for a (neuron) user,
so I dont want to force neurobiologists to bother with a new format and let it to them
transfering their data one more time if they wish it visualized by my software.
Now, as I learned something about neurons formated output routines I think it would be
just fine if one could simply call a command in neuron prompt (after reading in a file,
altering it until complete satisfaction and setting soma accessed) and my neuron routine
would than produce line-by-line ascii output in the following manner :
// my_out_file
#first block of lines:
1 sectionID, connectedToID, conn_offset, radius0/1, Len, x/y/z_coord 0/1, ohm ,
memb_cap, refines, inbuild_channel_type[hh/ pass/else]
.
.
n // (n number of sections)

#second block of lines:
1 ClampID, connectedTo_secID, offset
.
.
m // (m number of iclamps)
#third block of lines:
synapseID, connectedTo_secID, offset
...


My software woud just process this output and generate a plot.
So, my more exact question is, if neuron is able to produce this kind of output at all
(when soma is accessed) by a subroutine call, then someone may give me a hint on
neuron commands that woud be usefull to accomplish this task.
If there already exists familiar kind of public hoc code, dealing with output in this way,
I woud be grateful if someone could point this out.

Thanks in advance again

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

Post by hines »

For user defined formats for output files you will need to know about several idioms and classes that access NEURON's internal information about the simulated model. E.g.
forall for (x) print secname, x, v(x)
prints all voltages for all sections. See SectionRef, MechanismType, and MechanismStandard. For the latter
ttp://www.neuron.yale.edu/neuron/static/docs/ ... hstan.html
has an executable example that prints all names associated with POINT_PROCESS and SUFFIX mechanisms. The SectionRef provides the easiest way to determine the parent section of a section.

Run the NEURONDEMO, select the "Stylized" demo, the select NEURONMainMenu/Tools/ModelView and note that this tool has extracted all the information of the NEURON model into itself. Selecting the ModelView's File/WriteXML will print the morphology in MorphML format. This tool is in the process of being extended to print ChannelBuilder and channel distribution information but for that you would have to build the mview_xml branch of the cvs sources. See
http://www.neuron.yale.edu/viewcvs-bin/showdirs.cgi
rhussmann
Posts: 2
Joined: Tue Aug 30, 2005 11:08 pm

ModelView's File menu

Post by rhussmann »

hines wrote:Selecting the ModelView's File/WriteXML will print the morphology in MorphML format
I've been looking for information on how to write XML data for a while now. However, I'm still a little stumped. Following the instructions to launch ModelView, I can't find the file menu for ModelView itself. I'm using OSX 10.4 with NEURON 5.7. When I go to Tools->ModelView the hierachical display window is shown (gray with black text), but I can't find the file menu with the "Write XML" item.

I would really appreciate any help on this.
hines
Site Admin
Posts: 1687
Joined: Wed May 18, 2005 3:32 pm

Post by hines »

rhussmann
Posts: 2
Joined: Tue Aug 30, 2005 11:08 pm

Thanks

Post by rhussmann »

That did the trick. I appreciate the help.
Post Reply