View source: R/graph_endpoint_geometry.R
| detect.graph.endpoints | R Documentation |
Detects terminal arm tips in a graph by:
computing graph endpoint scores from the 3D embedding,
optionally smoothing those scores on the graph using
fit.rdgraph.regression() and refit.rdgraph.regression(),
finding graph-local maxima with detect.local.extrema(),
retaining only maxima that persist across neighborhood scales.
The function works with terminal regions in an embedding; returned endpoints need not be degree-1 vertices.
detect.graph.endpoints(
adj.list,
weight.list,
layout.3d,
neighborhood = c("geodesic_k", "geodesic_radius"),
k = c(10L, 20L, 30L),
radius = NULL,
q = 0.1,
neighbor.weighting = c("uniform", "inverse_distance", "gaussian"),
gaussian.sigma = NULL,
min.neighborhood.size = 3L,
scale.aggregate = c("mean", "median", "min", "max"),
score.metric = c("score", "m", "s.q", "s.min"),
smooth = FALSE,
fitted.model = NULL,
smooth.fit.args = NULL,
smooth.refit.args = NULL,
detect.max.radius = 2,
detect.min.neighborhood.size = 2L,
scale.stability.radius = NULL,
min.scale.stability = 0.5,
min.score.quantile = 0.8,
max.endpoints = NULL,
verbose = FALSE
)
adj.list |
Graph adjacency list (1-based vertex indices). |
weight.list |
Edge-length list aligned with |
layout.3d |
Numeric matrix or data frame with 3 columns giving the 3D embedding coordinates for graph vertices. |
neighborhood |
Character string. Either |
k |
Integer vector of geodesic neighborhood sizes used when
|
radius |
Positive numeric vector of geodesic radii used when
|
q |
Quantile used for |
neighbor.weighting |
Character string controlling neighbor weights for
|
gaussian.sigma |
Optional positive numeric scale used when
|
min.neighborhood.size |
Minimum number of usable neighbors required after removing zero-length embedding vectors. |
scale.aggregate |
How to aggregate scores across multiple neighborhood
scales. One of |
score.metric |
Which score to maximize. One of |
smooth |
Logical; if |
fitted.model |
Optional fitted graph smoother from
|
smooth.fit.args |
Optional named list of arguments passed to
|
smooth.refit.args |
Optional named list of arguments passed to
|
detect.max.radius |
Maximum radius passed to |
detect.min.neighborhood.size |
Minimum neighborhood size passed to
|
scale.stability.radius |
Optional non-negative geodesic radius used when
translating per-scale local maxima into multiscale support. If |
min.scale.stability |
Minimum fraction of scales for which a vertex must
be a local maximum of the per-scale detection score to be retained as an
endpoint. Default is |
min.score.quantile |
Quantile filter applied to the final detection
score before returning endpoints. Default is |
max.endpoints |
Optional positive integer cap on returned endpoints. |
verbose |
Logical; if |
A list with endpoint vertices, score diagnostics, optional smoothed scores, scale stability summaries, and the local-extrema fit used for endpoint calling.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.