-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Labels
T: bugType: bugType: bug
Description
Using the ExportSWC class to export NeuroML2 to SWC works, but it has some checks that aren't necessarily correct for all cell models.
For example, on valid cells like the HL23PYR cell, it throws this exception:
$ pynml -swc HL23PYR.cell.nml
pyNeuroML >>> INFO - Trying to convert HL23PYR.cell.nml to swc format...
pyNeuroML >>> INFO - Loading NeuroML2 file: HL23PYR.cell.nml
pyNeuroML >>> INFO - Loading NeuroML2 file: /home/asinha/Documents/02_Code/00_mine/NeuroML/software/pyNeuroML/tests/plot/L23-example/CaDynamics_E2_NML2.nml
pyNeuroML >>> INFO - Loading NeuroML2 file: /home/asinha/Documents/02_Code/00_mine/NeuroML/software/pyNeuroML/tests/plot/L23-example/channels/pas.channel.nml
pyNeuroML >>> INFO - Loading NeuroML2 file: /home/asinha/Documents/02_Code/00_mine/NeuroML/software/pyNeuroML/tests/plot/L23-example/channels/Ih.channel.nml
pyNeuroML >>> INFO - Loading NeuroML2 file: /home/asinha/Documents/02_Code/00_mine/NeuroML/software/pyNeuroML/tests/plot/L23-example/channels/SK.channel.nml
pyNeuroML >>> INFO - Loading NeuroML2 file: /home/asinha/Documents/02_Code/00_mine/NeuroML/software/pyNeuroML/tests/plot/L23-example/channels/K_T.channel.nml
pyNeuroML >>> INFO - Loading NeuroML2 file: /home/asinha/Documents/02_Code/00_mine/NeuroML/software/pyNeuroML/tests/plot/L23-example/channels/K_P.channel.nml
pyNeuroML >>> INFO - Loading NeuroML2 file: /home/asinha/Documents/02_Code/00_mine/NeuroML/software/pyNeuroML/tests/plot/L23-example/channels/Kv3_1.channel.nml
pyNeuroML >>> INFO - Loading NeuroML2 file: /home/asinha/Documents/02_Code/00_mine/NeuroML/software/pyNeuroML/tests/plot/L23-example/channels/Im.channel.nml
pyNeuroML >>> INFO - Loading NeuroML2 file: /home/asinha/Documents/02_Code/00_mine/NeuroML/software/pyNeuroML/tests/plot/L23-example/channels/NaTg/NaTg.channel.nml
pyNeuroML >>> INFO - Loading NeuroML2 file: /home/asinha/Documents/02_Code/00_mine/NeuroML/software/pyNeuroML/tests/plot/L23-example/channels/Ca_HVA.channel.nml
pyNeuroML >>> INFO - Loading NeuroML2 file: /home/asinha/Documents/02_Code/00_mine/NeuroML/software/pyNeuroML/tests/plot/L23-example/channels/Ca_LVA.channel.nml
pyNeuroML >>> INFO - Loading NeuroML2 file: /home/asinha/Documents/02_Code/00_mine/NeuroML/software/pyNeuroML/tests/plot/L23-example/channels/Nap.channel.nml
Traceback (most recent call last):
File "/home/asinha/.local/share/virtualenvs/neuroml-311-dev/bin/pynml", line 8, in <module>
sys.exit(main())
^^^^^^
File "/home/asinha/Documents/02_Code/00_mine/NeuroML/software/pyNeuroML/pyneuroml/pynml.py", line 971, in main
_evaluate_arguments(args)
File "/home/asinha/Documents/02_Code/00_mine/NeuroML/software/pyNeuroML/pyneuroml/pynml.py", line 866, in _evaluate_arguments
convert_count += 1 if convert_to_swc(f) else 0
^^^^^^^^^^^^^^^^^
File "/home/asinha/Documents/02_Code/00_mine/NeuroML/software/pyNeuroML/pyneuroml/swc/ExportSWC.py", line 174, in convert_to_swc
raise Exception(
Exception: The numbers of the segments in groups: soma_group+dendrite_group+axon_group (5818), is not the same as total number of segments (5840)! All bets are off!
I need to check why these numbers don't add up---where are the 22 segments? But I also see it with other cells, like this one from the Allen cells: https://github.com/OpenSourceBrain/AllenInstituteNeuroML/blob/master/CellTypesDatabase/models/NeuroML2/Cell_497232312.cell.nml
$ pynml -swc Cell_497232312.cell.nml
pyNeuroML >>> INFO - Trying to convert Cell_497232312.cell.nml to swc format...
pyNeuroML >>> INFO - Loading NeuroML2 file: Cell_497232312.cell.nml
pyNeuroML >>> INFO - Loading NeuroML2 file: /home/asinha/Documents/02_Code/00_mine/NeuroML/software/pyNeuroML/tests/plot/pas.channel.nml
pyNeuroML >>> INFO - Loading NeuroML2 file: /home/asinha/Documents/02_Code/00_mine/NeuroML/software/pyNeuroML/tests/plot/NaV.channel.nml
pyNeuroML >>> INFO - Loading NeuroML2 file: /home/asinha/Documents/02_Code/00_mine/NeuroML/software/pyNeuroML/tests/plot/K_T.channel.nml
pyNeuroML >>> INFO - Loading NeuroML2 file: /home/asinha/Documents/02_Code/00_mine/NeuroML/software/pyNeuroML/tests/plot/Kd.channel.nml
pyNeuroML >>> INFO - Loading NeuroML2 file: /home/asinha/Documents/02_Code/00_mine/NeuroML/software/pyNeuroML/tests/plot/Kv2like.channel.nml
pyNeuroML >>> INFO - Loading NeuroML2 file: /home/asinha/Documents/02_Code/00_mine/NeuroML/software/pyNeuroML/tests/plot/Kv3_1.channel.nml
pyNeuroML >>> INFO - Loading NeuroML2 file: /home/asinha/Documents/02_Code/00_mine/NeuroML/software/pyNeuroML/tests/plot/SK.channel.nml
pyNeuroML >>> INFO - Loading NeuroML2 file: /home/asinha/Documents/02_Code/00_mine/NeuroML/software/pyNeuroML/tests/plot/Ih.channel.nml
pyNeuroML >>> INFO - Loading NeuroML2 file: /home/asinha/Documents/02_Code/00_mine/NeuroML/software/pyNeuroML/tests/plot/Im_v2.channel.nml
pyNeuroML >>> INFO - Loading NeuroML2 file: /home/asinha/Documents/02_Code/00_mine/NeuroML/software/pyNeuroML/tests/plot/Ca_HVA.channel.nml
pyNeuroML >>> INFO - Loading NeuroML2 file: /home/asinha/Documents/02_Code/00_mine/NeuroML/software/pyNeuroML/tests/plot/Ca_LVA.channel.nml
pyNeuroML >>> INFO - Loading NeuroML2 file: /home/asinha/Documents/02_Code/00_mine/NeuroML/software/pyNeuroML/tests/plot/CaDynamics_all.nml
pyNeuroML >>> INFO - Loading NeuroML2 file: /home/asinha/Documents/02_Code/00_mine/NeuroML/software/pyNeuroML/tests/plot/CaDynamics.nml
Traceback (most recent call last):
File "/home/asinha/.local/share/virtualenvs/neuroml-311-dev/bin/pynml", line 8, in <module>
sys.exit(main())
^^^^^^
File "/home/asinha/Documents/02_Code/00_mine/NeuroML/software/pyNeuroML/pyneuroml/pynml.py", line 971, in main
_evaluate_arguments(args)
File "/home/asinha/Documents/02_Code/00_mine/NeuroML/software/pyNeuroML/pyneuroml/pynml.py", line 866, in _evaluate_arguments
convert_count += 1 if convert_to_swc(f) else 0
^^^^^^^^^^^^^^^^^
File "/home/asinha/Documents/02_Code/00_mine/NeuroML/software/pyNeuroML/pyneuroml/swc/ExportSWC.py", line 174, in convert_to_swc
raise Exception(
Exception: The numbers of the segments in groups: soma_group+dendrite_group+axon_group (1161), is not the same as total number of segments (3489)! All bets are off!
Metadata
Metadata
Assignees
Labels
T: bugType: bugType: bug
Type
Projects
Status
🏗 In progress