natverse / neuprintr

R client utilities for interacting with the neuPrint connectome analysis service
http://natverse.org/neuprintr
3 stars 3 forks source link

improve heal skeleton option #32

Closed jefferis closed 4 years ago

jefferis commented 4 years ago

@alexanderbates although I haven't checked in detail, the heal skeleton option looks a bit too simple to be doing the right thing. @SridharJagannathan has a new implementation that we should be able to use.

jefferis commented 4 years ago

See https://github.com/natverse/neuprintr/blob/bf672085176e27faa065fcf85dbf99552f4b89f2/R/neurons.R#L183-L198

SridharJagannathan commented 4 years ago

@alexanderbates It is available here: https://github.com/natverse/nat/blob/feature/elmr_features/R/neuron.R#L1107 and will be merged to master after review by @jefferis next week.

jefferis commented 4 years ago

An example off a neuron that is split into 5 separate parts, 1 of which seems to be pathological. Would be good to think about giving stitch_neurons_mst an edge length threshold.

n5813054304=neuprint_read_neuron_simple(5813054304, heal = F)
SridharJagannathan commented 4 years ago

Hmm, just attaching the figure with the latest implementation of nat::stitch_neurons_mst where the pathological part is also connected (which needs to be fixed)

Screenshot 2020-01-29 at 12 08 39
SridharJagannathan commented 4 years ago

I have made a new implementation in nat::stitch_neurons_mst which has a parameter thresh_el that has the edge length threshold. Only edges below this threshold will be added (currently fixed at 1000 microns). See test below (the green is the current output, overlayed on top of blue previous ouput)

Screenshot 2020-01-29 at 14 48 17
jefferis commented 4 years ago

Just a note that we are getting close to having a fast/robust implementation of the new healing code in https://github.com/natverse/nat/pull/424. There was also a separate change in as.seglist.igraph that offers significant speed-ups.

jefferis commented 4 years ago

Closed by #76