-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversion from swc to nml with custom types #67
Comments
Have a look here: neuroConstruct/src/ucl/physiol/neuroconstruct/cell/converters/SWCMorphReader.java Lines 451 to 488 in d94b86a
Only point types 0-7 are defined for the neuroConstruct import. Not sure if this is a limitation in the spec itself (documentation on SWC is limited), but if you can use just these values (i.e. not 8) then hopefully what comes out will be closer to what you need... |
Great, that helps, thank you! |
Actually, my segment groups are still not as I would expect. I have custom-1 and custom-2 now, but everything in custom-1 is also in custom-2. And custom-1 is still larger than 17 nodes. |
So the problem is a bit of a tricky one... the nC import of SWC breaks the list of points into unbranched Sections which are the list of points between where the dendrites split. This is required since these sections are what get mapped to the NEURON sections and the 3D points are added with the pt3d() functions in Neuron, and it's solved with the cable equation in Neuron. The problem is that some of the points in your swc inside a single unbranched section are 5 and some are 6, e.g. (from neuroConstruct, View cell in 3D and press Cell Info): so the sections get added to both groups, and so the exported NML has the segments in both segmentGroups The possible solutions:
|
That makes sense, thanks! |
So FYI for these options:
|
Yes indeed, likely useful in the long term, especially if we want to handle the 'continuous cable' directive in a way that allows for heterogeneous channel expression across different simulators. Thanks for your pointer above! |
@njhulst Ok. If you do plan to go the SWC->NML route via Python (option 3), please do consider making a general purpose one that can go in the pyNeuroML repo. It will be much more useful in the long run for others in the community, rather than the Java/neuroConstruct implementation. |
It is work in progress at the moment, another student has started working on it. We will indeed try and make it general purpose! |
i ran into this repo, which seems to be a start: https://github.com/WardDPeeters/Morphologies |
Has this ever been addressed? Perhaps we could look at enhancing the "SWCMorphReader.java" for handling custom types better.
|
Alternatively you could create a file "swc_to_nml.py" :
|
Hi @HussainAther , thanks for your note. We currently have a GSoC intern working on writing a SWC to NML converter and adding it to PyNeuroML. One can follow the progress here and in the PyNeuroML repo: |
Hi there,
I want to assign different parameter values to different regions of the dendrites and therefore want to split my dendrites into two groups: proximal dendrites and distal dendrites. I used type 8 to indicate proximal dendrites and type 7 to indicate distal dendrites in my swc file. Now if I use neuroConstruct to convert my swc file to an nml file, it seems to go wrong, as the nml file contains segment groups that I cannot identify as the ones I made. For example I have 17 nodes with ID 8 in my swc file, but the nml file contains no segment group that contain 17 nodes. Also, it creates a dendrite group, even though I did not make a dendrite group (none of the nodes has ID 3). My questions:
Am I allowed to split dendrites like this or is it invalid in neuroML?
If it is allowed, what might be going wrong here?
Both files can be found at:
https://github.com/njhulst/IO-temperature-dependence/tree/master/Morphology
The text was updated successfully, but these errors were encountered: