Exception: no child seg nor parent seg, with active channels, was found
asanin-epfl opened this issue · comments
Hi! I receive the topic error when do this:
from neuron import gui,h
import neuron_reduce
h.load_file('bAC_327962063.hoc')
complex_cell = h.bAC_327962063(0, '', '02583f52ff47b88961e4216e2972ee8c.swc')
neuron_reduce.subtree_reductor(complex_cell, [], [], reduction_frequency=0)
Traceback (most recent call last):
File "/sonata_network_reduction/reduce.py", line 21, in <module>
neuron_reduce.subtree_reductor(complex_cell, [], [], reduction_frequency=0)
File "/venv/lib/python3.6/site-packages/neuron_reduce/subtree_reductor_func.py", line 871, in subtree_reductor
mapping_type)
File "/venv/lib/python3.6/site-packages/neuron_reduce/subtree_reductor_func.py", line 352, in copy_dendritic_mech
mech_names_per_segment)
File "/venv/lib/python3.6/site-packages/neuron_reduce/subtree_reductor_func.py", line 387, in handle_orphan_segments
raise Exception("no child seg nor parent seg, with active channels, was found")
Exception: no child seg nor parent seg, with active channels, was found
Some details. There is no apic
SectionList. create_reduced_cell
creates 9 basals
/sections: {, model[0].dend[0], model[0].dend[1], model[0].dend[2], model[0].dend[3], model[0].dend[4], model[0].dend[5], model[0].dend[6], model[0].dend[7], model[0].dend[8]}
. Somehow the last of basals
(model[0].dend[8]
) is not in reduced_seg_to_original_seg
that returns create_seg_to_seg
, and because it is a section with a single segment in it => no parent/children to copy mechanisms from => error.
I've sent the files on your email.
Here is a fast fix:
1bad597
But I need will need to test it further to validate that the synaptic mapping is working correctly
Thank you! It works. I can continue with my work.