NeuroBox3D/NeuGen

UGX export for simulating Neurons

RABuijse opened this issue · 18 comments

I am exploring the limits for simulating neurons for my masters thesis. The simulation runs with neuron grids saved as ugx files and the generated neurons in NeuGen would easily be implemented into my research if I somehow could access them as .ugx files.
Is there any way to export or transfer files to ugx?

Do you mostly need single neurons or networks of neurons?

Currently there is no .ugx export in NeuGen 2.0. If there is a substantial body of interest one might think of adding this to the roadmap for NeuGen 2.1.

For my limit testing i will mainly need sets of 3-6 neurons in which i will increase the number of synapses. Other limits that i intend to test are the amount of neurons i can simulate(larger network of neurons) and also how far i can refine one single neuron.

There is a SynapseDistributor cable_neuron plugin in ug4 which can read a text-based file format exported from NeuGen. Could you see if you can use this? Nevertheless I'll put the .ugx export on the roadmap towards NeuGen 2.1.

There already is a way to convert NeuGen geometries to UGX format:

  1. In NeuGen, export the cell / network to .txt format. Do not use compression if asked. This should create four files.
  2. These can be converted to .ugx using an import mechanism that is part of the cable_neuron plugin. There even is a script to do that. If your four files are named "cell_*", then execute the script from the directory where they are located with ugshell -ex cable_neuron_app/util/neti_import.lua -name cell -method txt. This should create a file "cell.ugx" in the same directory.

Thank you @bsumirak to add the relevant details.

Thank you for the fast responses. However when exporting to .txt file i get an error notification.
Let me see if i can attach a screenshot.

TxtFile

I'm running NeuGen on a windows computer by using an Ubuntu 20.04 LTS shell, in case that causes any interferences,

Could you try a NeuGen Neocortex project? I'm not sure if we had implemented .txt export also for hippocampal networks.

Thanks for all the replies and sorry for the delayed response.
I tried a Neocortex project and the txt extraction worked. However when trying to use the
ugshell -ex cable_neuron_app/util/neti_import.lua -name cell -method txt
command from bsumirak I got a nil value error as shown in the screenshot:
nilValue

Any ideas what causes this or how to avoid the error?

Did you enable the neuro_collection and cable_neuron with cmake? I presume cable_neuron might be enough.

It should be enabled but i'll recheck as my windows-ubuntu setup likes to have some issues.

Yeah check it, the functionality/class should be in cable_neuron IIRC.

As expected my shell somehow messed the rights up. after some chmodding I managed to fix it(ofc i also cleaned and built it again), but there still are some exceptions which pop up:
celltxt

To me it seems like it can't find 'cell.txt' which should be no surprise as i expected the program to create it. Maybe something got switched up with the parameters?

Oh, this exception message is somewhat imprecise. What the profram is actually looking for (and without success) is the file "cell_secs.txt". Is that file in the same directory you execute ugshell from? If so, maybe check permissions for the NeuGen-exported files as well. If not, please provide the full file path

Sorry, accidentally hit the wrong button. :)
I was going to conclude my latest instruction with "... for the name argument when calling the ugshell command."

Smart as I am, I exported the files under the name "test" which lead to the files being called "test_secs" etc.
I imagine running the command like this should work anyway?
ugshell -ex cable_neuron_app/util/neti_import.lua -name test -method txt

However when doing so i get another error. This time it doesn't know the network type and fails to read the identifier file.
UnknownNetworkType

The rights should be fine btw as they all seem to be 644

If I remember correctly there was a checkbox "cell type" in the NeuGen export: I think three files are required:

someFile_identifier.txt
someFile_secs.txt
someFile_synapses.txt

Can you export the network with the checkbox "cell type" filled?

When exporting the network with cell type filled it seems to work.
Thank you for the answers!

Actually this should be the default I think (checkbox filled).