View source: R/hemibrain_cable.R
primary_neurite | R Documentation |
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 class 'neuron'
primary_neurite(x, neuron = TRUE, invert = FALSE, ...)
## S3 method for class 'neuprintneuron'
primary_neurite(x, neuron = TRUE, invert = FALSE, ...)
## S3 method for class 'catmaidneuron'
primary_neurite(x, neuron = TRUE, invert = FALSE, ...)
## S3 method for class 'neuronlist'
primary_neurite(x, neuron = TRUE, invert = FALSE, ...)
primary_branchpoint(x, primary_neurite = FALSE, first = FALSE, ...)
## S3 method for class 'neuron'
primary_branchpoint(x, primary_neurite = FALSE, first = FALSE, ...)
## S3 method for class '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
.
flow_centrality
# Get neuron
neuron = neuprintr::neuprint_read_neurons("451987038")
# Extract primary neurite
pnt = primary_neurite(neuron)
## Not run:
# Plot the primary neurite
nat::nopen3d()
plot3d(pnt, lwd = 2, col = "#C70E7B", soma = 1000)
plot3d(neuron, lwd = 2, col = "grey30")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.