Remove synapse-less branches from axons and dendrites, and clean up the primary neurite and primary dendrite (linker) of a neuron. Given neurons must have been split by either flow_centrality or hemibrain_flow_centrality. hemibrain_flow_centrality to re-root and split neurons into putative axons and dendrites. Optionally, it may also convert neurons from their raw voxel space (as they are stored in NeuPrint) to microns.

hemibrain_clean_skeleton(x, rval = c("pruned", "neuron", "points"), ...)

Arguments

x

a nat::neuronlist or nat::neuron object

rval

whether to return a pruned neuron, a neuron with the synapse-less branches set to Label = 0 or the PointNo for those branches.

...

methods passed to nat::nlapply.

Value

the neuron or neuron list object inputted, with centripetal flow centrality information added to neuron$d and a segregation index score. The neuron$d$Label now gives the compartment, where axon is Label = 2, dendrite Label = 3, primary dendrite Label = 4 and primary neurite Label = 7. Soma is Label = 1.

See also

Examples

# \donttest{ # Choose neurons ## In this case some antennal lobe local neurons al.local.neurons = c("1702323386", "2068966051", "2069311379", "1702305987", "5812996027", "1702336197", "1793744512", "1976565858", "2007578510", "2101339904", "5813003258", "2069647778", "1947192569", "1883788812", "1916485259", "1887177026", "2101348562", "2132375072", "2256863785", "5813002313", "5813054716", "5813018847", "5813055448", "1763037543", "2101391269", "1794037618", "5813018729", "2013333009") # Only use first three neurons for documentation purposes al.local.neurons=al.local.neurons[1:3] # Get neurons neurons = neuprintr::neuprint_read_neurons(al.local.neurons) # Split neurons neurons = hemibrain_flow_centrality(neurons)
#> Warning: 2 neurons cropped, split likely to be inaccurate for: 2068966051, 2069311379
#> Warning: 3 neurons have no soma tagged, split could be inaccurate for: 1702323386, 2068966051, 2069311379
# Clean neurons neurons.cleaned = hemibrain_clean_skeleton(neurons) if (FALSE) { # Plot the split to check it nat::nopen3d() nlscan_split(neurons.cleaned, WithConnectors = TRUE) }# }