Call hemibrain_reroot
on neurons read from
the hemibrain neuprintr project, that have no marked soma, and
hemibrain_remove_bad_synapses
on all neurons. Does not prune synapses
from soma positions / along the primary neurite, but does remove synapses outside
of the hemibrain volume.
hemibrain_skeleton_check( x, meshes = hemibrainr::hemibrain.surf, min.nodes.from.soma = 100, min.nodes.from.pnt = 5, OmitFailures = FALSE, ... )
x | a |
---|---|
meshes | a list/a single object of class |
min.nodes.from.soma | the minimum number of nodes (geodesic distance) a
synapse can be from the soma. Synapses closes than this will be removed.
For comparable results across neurons, recommended to use
|
min.nodes.from.pnt | the minimum number of nodes (geodesic distance) a synapse can be from a point along the primary neurite. Synapses closes than this will be removed. |
OmitFailures | Whether to omit neurons for which FUN gives an error. The default value (NA) will result in nlapply stopping with an error message the moment there is an error. |
... | methods sent to |
a nat::neuronlist
or nat::neuron
object
# \donttest{ # Choose some known trouble makers ids = c("5813056323", "579912201", "5813015982", "973765182", "885788485", "915451074", "5813032740", "1006854683", "5813013913", "5813020138", "853726809", "916828438", "5813078494", "420956527", "486116439", "573329873", "5813010494", "5813040095", "514396940", "665747387", "793702856", "451644891", "482002701", "391631218", "390948259", "390948580", "452677169", "511262901", "422311625", "451987038" ) # just use a subset for documentation purposes ids=ids[1:3] # Read in these neurons neurons = neuprintr::neuprint_read_neurons(ids) if (FALSE) { # Get all the roi meshes hemibrain.rois = hemibrain_roi_meshes() ## Using this as the argument for 'meshes' will also ## give you the ROI for each point and synapse in a neuron's skeleton!! # Re-root neurons.checked = hemibrain_skeleton_check(neurons, meshes = hemibrain.rois) } # Alternatively, we can do this faster using a single surface model for the # whole hemibrain neurons.checked = hemibrain_skeleton_check(neurons, meshes = hemibrain.surf)#>#>#> Warning: invalid factor level, NA generated#> Warning: invalid factor level, NA generated#> Warning: invalid factor level, NA generated#> Warning: invalid factor level, NA generated