This function takes a gating tree object and constructs a graphical representation using the DiagrammeR package. It visually represents the enrichment, entropy, and optionally the average proportion of nodes in the gating tree.
Arguments
- root
The root node of the gating tree object, which must have properties like `isRoot`, `name`, `CurrentEnrichment`, `CurrentEntropy`, and optionally `AverageProportion`.
- size_factor
A multiplier for node sizes in the graph, allowing customization based on enrichment or average proportion values.
- average_proportion
A logical flag indicating whether to use the average proportion of nodes to adjust node sizes and color gradient based on enrichment values.
Value
Returns a DiagrammeR graph object representing the gating tree with nodes colored and sized according to specified metrics.
Details
The function recursively traverses the gating tree, starting from the root, adding nodes to the graph with labels that include relevant metrics. Node size and color are determined by either the enrichment or entropy values, depending on the `average_proportion` flag.
See also
Other GatingTree:
GatingTreeToDF()
,
PlotDeltaEnrichment()
,
PruneGatingTree()
,
addChildNode()
,
add_prune()
,
apply_gating_conditions()
,
baseline_entropy()
,
calculate_enrichment()
,
calculate_entropy()
,
collect_all_enrichment()
,
collect_all_entropy()
,
collect_history()
,
collect_leaf_enrichment()
,
collect_markers()
,
convertToDataTree()
,
count_nodes()
,
createChildNode()
,
createGatingTreeObject()
,
findNodeByPath()
,
find_and_update_nodes()
,
gating_entropy()
,
general_node_rule()
,
generate_marker_names()
,
getNode()
,
prune_tree()
,
recursiveAddChildNode()
Examples
if (FALSE) { # \dontrun{
# Assuming 'root' is your gating tree root node
graph <- convert_to_diagrammer(root, size_factor = 1, average_proportion = TRUE)
# To view the graph
DiagrammeR::render_graph(graph)
} # }