btorb / neuromac

Neuronal Morphologies & Circuits
GNU General Public License v3.0
10 stars 5 forks source link

Create NeuroML2 export from neuromac #2

Open pgleeson opened 8 years ago

pgleeson commented 8 years ago

This is a task which would be useful for the student of @ChristophMetzner, Usama Liaquat.

Steps:

to validate the generated files as you go along.

and

pynml-povray -scalez 4  demo_attraction.net.nml

To generate images of the nml files.

usama57 commented 8 years ago

neurocmac is installed now locally and example is also working. I also installed jNeuroML, libNeuroML and pyNeuroML. To create generate_NeuroML2.py in scripts do i have to copy "generate_SWC_data.py" code in it ? @pgleeson

pgleeson commented 8 years ago

@usama57 Yes, start from a copy of generate_SWC_data.py and update that to generate the NeuroML

usama57 commented 8 years ago

Validating: /home/usama/neuromac/examples/demo_attraction/demo_attraction.net.nml File: /home/usama/neuromac/examples/demo_attraction/demo_attraction.net.nml is not valid against the schema: /Schemas/NeuroML2/NeuroML_v2beta4.xsd!! Content is not allowed in prolog. Validated 1 files: 0 passed, 1 failed i am trying to dry run it but it is giving this error.

i copied this in examples demo_attraction/demo_attraction.net.nml. nml_file = 'tmp/net3d.nml' writers.NeuroMLWriter.write(nml_doc, nml_file) print("Written network file to: "+nml_file) in examples demo_attraction.

pgleeson commented 8 years ago

@usama57 Can you show the code you're getting these errors with? Add the generate_NeuroML2.py to your fork and use https://gist.github.com/ to show the generated nml file.

usama57 commented 8 years ago

@pgleeson what does "name" column in demo_attraction means like "cell_type_1__0", what does it represent? And the other thing, can I use .SWC file to write a morphology or do I have to write some functions to generate morphology using data in database. P.s .swc file contains data generated using database, right?

pgleeson commented 8 years ago

@usama57 You'll have to read the paper and have a look at the source code here to figure out what the entries in these files mean. Also, try to be more specific with questions, point to specific lines in committed files.

Regarding use of SWC, there should be no SWC files read/written in the final generate_NeuroML2.py (but there will be from statements like 'select * from swc_data'b to access the DB), just use generate_SWC_data.py as a starting point which shows how to access the database to get the points and alter this to generate a neuroml file from the database.

usama57 commented 8 years ago

@pgleeson initially i generated with soma and share the result through gist. Kindly check it

pgleeson commented 8 years ago

@usama57 Looks like a good start. Can you export the whole cell?

usama57 commented 8 years ago

@pgleeson did you mean to export in def run function or through syn db. i read different papers. how to export cell but didn't get any method how to do that. Kindly brief me. DB of demo_attraction only have cell types and i have to export neuroml cell !

pgleeson commented 8 years ago

I don't know what you mean by def run function.

generate_SWC_data.py produces 2 swc files, one for each cell present generate_NeuroML2.py should produce a single NML2 file containing 2 <cell>s, used inside populations in a network. The cells need to have all the correct end points for segments taken from the database