R/hemibrain_cable.R
primary_neurite.Rd
Extract the cell body fibre for an insect neuron,
assuming that this neuron has a soma and that the soma is the neuron's root.
Based on the nat::simplify_neuron
neuron function.
Alternatively, extract the primary branch point by a different method that
counts the numbers of leaf nodes downstream of each branch from a branch point.
The primary branchpoint is chosen as the branchpoint where
(number of leaf nodes/synapses on branch one)*(number on branch two) is the greatest.
Synapses are used when available, leaf nodes if not.
primary_neurite(x, neuron = TRUE, invert = FALSE, ...) # S3 method for neuron primary_neurite(x, neuron = TRUE, invert = FALSE, ...) # S3 method for neuprintneuron primary_neurite(x, neuron = TRUE, invert = FALSE, ...) # S3 method for catmaidneuron primary_neurite(x, neuron = TRUE, invert = FALSE, ...) # S3 method for neuronlist primary_neurite(x, neuron = TRUE, invert = FALSE, ...) primary_branchpoint(x, primary_neurite = FALSE, first = FALSE, ...) # S3 method for neuron primary_branchpoint(x, primary_neurite = FALSE, first = FALSE, ...) # S3 method for neuronlist primary_branchpoint(x, primary_neurite = FALSE, first = FALSE, ...)
x | a |
---|---|
neuron | logical, whether to return a neuron/neuronlist object ( |
invert | logical, whether to return the primary neurite ( |
... | methods sent to |
primary_neurite | logical, if |
first | if a number between 0-1, then the first branchpoint from the root that meets the requirement of
|
a neuron
or neuronlist
when using primary neurite
.
# \donttest{ # Get neuron neuron = neuprintr::neuprint_read_neurons("451987038") # Extract primary neurite pnt = primary_neurite(neuron) if (FALSE) { # Plot the primary neurite nat::nopen3d() plot3d(pnt, lwd = 2, col = "#C70E7B", soma = 1000) plot3d(neuron, lwd = 2, col = "grey30") }# }