
Recompute the layout of a Bonsai tree
relayout_bonsai.RdLays the finished tree out again without searching. The tree is renumbered on the Rust side, so the inferred ancestors can come back with different node numbers; the leaves, and so the cells, keep theirs.
Usage
relayout_bonsai(
x,
layout = c("equal_angle", "equal_daylight", "dendrogram"),
hyperbolic = FALSE
)Examples
# the same tree as a dendrogram
sc <- demo_single_cells(
prepped = FALSE,
syn_data_params = params_sc_synthetic_data(n_cells = 200L, n_genes = 50L)
)
tree <- bonsai_sc(sc, .verbose = FALSE)
tree <- relayout_bonsai(tree, layout = "dendrogram")
plot(tree)
unlink(sc@dir_data, recursive = TRUE, force = TRUE)