segmentgraph | R Documentation |
Return a simplified segment graph for a neuron
segmentgraph(
x,
weights = TRUE,
segids = FALSE,
exclude.isolated = FALSE,
include.xyz = FALSE,
reverse.edges = FALSE
)
x |
neuron |
weights |
Whether to include the original segment lengths as edge weights in the graph. |
segids |
Whether to include the integer segment ids as an edge attribute in the graph |
exclude.isolated |
Whether to eliminate isolated nodes |
include.xyz |
Whether to include 3D location as vertex attribute |
reverse.edges |
Whether to reverse the direction of each edge in the
output graph to point towards (rather than away from) the root (default
|
The resultant graph will contain all branch and endpoints of the original neuron. This will be constructed from the SegList field, or where present, the SubTrees field (containing multiple SegLists for each isolated graph in the neuron). Each edge in the output graph will match one segment in the original SegList.
igraph
object containing only nodes of neuron keeping original
labels (x$d$PointNo
=> V(g)$label
) and vertex indices
(1:nrow(x$d)
=> V(g)$vid)
.
sg=segmentgraph(Cell07PNs[[1]])
str(sg)
library(igraph)
plot(sg, edge.arrow.size=.4, vertex.size=10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.