Split a neuron at a particular node and return the 'downstream' section as a new neuron object

split_neuron_local(skid = NULL, neuron = NULL, node,
  return = c("downstream", "upstream"))

Arguments

skid

Required unless neuron is provided; the skeleton ID of the neuron to split (passed on to catmaid_skids)

neuron

Required unless skid is provided; a neuron object to split

node

Required; the ID of the node where the neuron should be split (or a string naming a tag)

return

Which part of the split neuron to return (downstream or upstream). Defaults to downstream.

Value

A neuron object representing the specified portion of the split neuron

Details

This does not actually split the neuron in CATMAID; split is only performed on the local neuron object. If a string is used to specify the split node (rather than the CATMAID node id), it is matched against named tags present in the input neuron. There will be an error if this does not resolve to a single unique node.

Examples

# \donttest{ DL4.LH=split_neuron_local("glomerulus DL4 right", "SCHLEGEL_LH")
#> Error in split_neuron_local("glomerulus DL4 right", "SCHLEGEL_LH"): argument "node" is missing, with no default
plot(DL4.LH)
#> Error in plot(DL4.LH): object 'DL4.LH' not found
# }