when I run skeletonization code, the problem was spotted by an assertion:
the closest segment is a terminal segment, merge the root segment of the other net
need to break the closest segment and rebuild connectivity matrix
ERROR: LoadError: AssertionError: length(parentSegmentIdList) == 1
Stacktrace:
[1] get_parent_segment_id(::SparseArrays.SparseMatrixCSC{Bool,Int64}, ::Int64) at /usr/people/jingpe
ng/.julia/dev/RealNeuralNetworks/src/Neurons.jl:589
[2] get_parent_segment_id at /usr/people/jingpeng/.julia/dev/RealNeuralNetworks/src/Neurons.jl:579 [
inlined]
[3] Array{RealNeuralNetworks.SWCs.PointObjs.PointObj,1}(::Neuron) at /usr/people/jingpeng/.julia/dev
/RealNeuralNetworks/src/Neurons.jl:1432
[4] #trace#3(::String, ::UInt32, ::String, ::Tuple{Int64,Int64,Int64}, ::String, ::Function, ::Int64
) at /usr/people/jingpeng/.julia/dev/RealNeuralNetworks/scripts/skeletonize.jl:45
[5] (::getfield(Main, Symbol("#kw##trace")))(::NamedTuple{(:swcDir, :mip, :meshName, :voxelSize, :se
gmentationLayer),Tuple{String,UInt32,String,Tuple{Int64,Int64,Int64},String}}, ::typeof(trace), ::Int
64) at ./none:0
[6] macro expansion at ./logging.jl:314 [inlined]
[7] main() at /usr/people/jingpeng/.julia/dev/RealNeuralNetworks/scripts/skeletonize.jl:102
[8] top-level scope at none:0
[9] include at ./boot.jl:317 [inlined]
[10] include_relative(::Module, ::String) at ./loading.jl:1038
[11] include(::Module, ::String) at ./sysimg.jl:29
[12] exec_options(::Base.JLOptions) at ./client.jl:239
[13] _start() at ./client.jl:432
in expression starting at /usr/people/jingpeng/.julia/dev/RealNeuralNetworks/scripts/skeletonize.jl:1
36
this is not really a problem! Because the assertion is testing
length(parentSegmentIdList) == 1
but the root segment do not have any parent, the assertion should be:
length(parentSegmentIdList) <= 1
when I run skeletonization code, the problem was spotted by an assertion:
such as neuron 79951