-
Notifications
You must be signed in to change notification settings - Fork 57
Unsupported section type: 0 #1110
Comments
To reproduce the error, could you please attach or provide a link to the morphology? Thanks. |
I got the same error for several swc files.
I have attached a file. |
I downloaded the example swc file and tested. It also has this error since the node type could be 0.
It looks like this behavior is expected... NeuroM/tests/io/test_swc_reader.py Line 149 in 6705714
I changed my undefined type from 0 to 4, and it works. |
Thank you @xiuliren for the detailed example, which allowed me to reproduce the error with the following minimal example extracted from your data: from morphio import Morphology
m = Morphology(
"""
1 1 0.000000 1317316.000000 0.000000 188.000000 -1
2 0 188.000000 1317504.000000 0.000000 188.000000 1
3 0 188.000000 1317692.000000 0.000000 188.000000 2
"""
, "swc") MorphIO SWC reader explicitly checks for "0" point type and raises if present: Concerning whether the behavior is expected or not, it's unclear from the specification's point of view. After a closer look, I opened an issue describing the conflict in the definition of the field "Type" and its allowed values: I suggest we wait until an official clarification is given and then I can send a change to allow 0 types in the SWC reader. Is a 0 type produced automatically by a reconstruction tool or do you create these morphologies on your side, having control over the types that are assigned to the points? |
When I attempt to open a swc file from neuromorpho.org with the NEURON standard.

this is what the file looks like.
import neurom as nm
m = nm.load_morphology("C:\Users\David\Documents\NeuroComp\project\Soma_in_tectum_653519\3_mod_T_160621_F2M2_loom_02.swc")
Traceback (most recent call last):
File ~\anaconda3\envs\neurom\lib\site-packages\spyder_kernels\py3compat.py:356 in compat_exec
exec(code, globals, locals)
File c:\users\david\documents\neurocomp\project\morphology_function_clustering_project.py:10
m = nm.load_morphology("C:\Users\David\Documents\NeuroComp\project\Soma_in_tectum_653519\3_mod_T_160621_F2M2_loom_02.swc")
File ~\anaconda3\envs\neurom\lib\site-packages\neurom\io\utils.py:165 in load_morphology
return Morphology(morph, Path(morph).name)
File ~\anaconda3\envs\neurom\lib\site-packages\neurom\core\morphology.py:435 in init
super().init(filename)
RawDataError:
C:\Users\David\Documents\NeuroComp\project\Soma_in_tectum_653519\3_mod_T_160621_F2M2_loom_02.swc:2:error
Unsupported section type: 0
The text was updated successfully, but these errors were encountered: