Return a simplified segment graph for a neuron
segmentgraph(
x,
weights = TRUE,
segids = FALSE,
exclude.isolated = FALSE,
include.xyz = FALSE,
reverse.edges = FALSE
)
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)
.
neuron
Whether to include the original segment lengths as edge weights in the graph.
Whether to include the integer segment ids as an edge attribute in the graph
Whether to eliminate isolated nodes
Whether to include 3D location as vertex attribute
Whether to reverse the direction of each edge in the
output graph to point towards (rather than away from) the root (default
FALSE
)
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.
sg=segmentgraph(Cell07PNs[[1]])
str(sg)
library(igraph)
plot(sg, edge.arrow.size=.4, vertex.size=10)
Run the code above in your browser using DataLab