Importing SWC files and best practices
Posted: Thu Sep 05, 2024 6:20 pm
Hello everyone,
I'm working on converting some NML files created in Webknossos into a format that I can import into NEURON. I did not find any ready-made solutions that seemed to give me what I need, so I'm working on my own solution. My starting approach has been to try to convert to SWC format and use the approach detailed here: https://nrn.readthedocs.io/en/latest/gu ... d-tutorial
First of all, I should say that if there's a more straightforward way to import the structures into NEURON, I'd be happy to be pointed in the right direction.
But for now, I've been first experimenting with some simple dummy data to make sure I understand how import works, and I have a couple of easy questions. First, most of the time, I get the error window below, even if import seems to work (though there's no output to the terminal). I downloaded a SWC file from Neuromorpho.org and got the same error, so I wanted to ask whether this is something I should be concerned about or whether it may just be a quirk of parsing SWC files.
Error message:

Second, I'd like to request a sanity check on my preliminary results. I noticed gaps in the "Show Diam" view, and I wanted to find out if something is wrong with the file specification, or if this is a normal result.
The SWC data:
The result:

And in general, I'm trying to understand best practices for importing 3D morphology into NEURON. I've searched the forum and documents, but I'm still a little unsure about whether it's better to "over-specify" the morphology or stick to a simpler representation (does/can NEURON interpolate between nodes?). I'm making these skeletons myself, so I have flexibility over how coarse or fine they can be. It's also a little unclear to me how or whether I should be specifying the soma as a single point or a string of centroids with varying diameters--and if the latter, how to properly import that data.
Thanks in advance for your help, and I'm happy to continue to read if I'm pointed in the right direction.
I'm working on converting some NML files created in Webknossos into a format that I can import into NEURON. I did not find any ready-made solutions that seemed to give me what I need, so I'm working on my own solution. My starting approach has been to try to convert to SWC format and use the approach detailed here: https://nrn.readthedocs.io/en/latest/gu ... d-tutorial
First of all, I should say that if there's a more straightforward way to import the structures into NEURON, I'd be happy to be pointed in the right direction.
But for now, I've been first experimenting with some simple dummy data to make sure I understand how import works, and I have a couple of easy questions. First, most of the time, I get the error window below, even if import seems to work (though there's no output to the terminal). I downloaded a SWC file from Neuromorpho.org and got the same error, so I wanted to ask whether this is something I should be concerned about or whether it may just be a quirk of parsing SWC files.
Error message:
Second, I'd like to request a sanity check on my preliminary results. I noticed gaps in the "Show Diam" view, and I wanted to find out if something is wrong with the file specification, or if this is a normal result.
The SWC data:
Code: Select all
1 1 16.73500 11.93100 1.70300 1.0000 -1
2 3 16.31700 10.24200 1.68400 0.45222 1
3 3 17.12900 13.28800 1.68900 0.57844 1
4 3 17.48100 14.09500 1.65400 0.45323 3
5 3 17.67800 14.96200 1.63800 0.35511 4
6 3 16.00800 9.69100 1.65600 0.4826 2
7 3 15.44900 8.52900 1.64900 0.57844 6
8 3 15.05100 7.68400 1.65300 0.45323 7
And in general, I'm trying to understand best practices for importing 3D morphology into NEURON. I've searched the forum and documents, but I'm still a little unsure about whether it's better to "over-specify" the morphology or stick to a simpler representation (does/can NEURON interpolate between nodes?). I'm making these skeletons myself, so I have flexibility over how coarse or fine they can be. It's also a little unclear to me how or whether I should be specifying the soma as a single point or a string of centroids with varying diameters--and if the latter, how to properly import that data.
Thanks in advance for your help, and I'm happy to continue to read if I'm pointed in the right direction.