R/genome_relevant_functions.R
get_edges_between_clones.RdFinds and returns the names of all edges in the path between two nodes in a phylogenetic tree, formatted as "parent_child" strings.
get_edges_between_clones(tree, upper_node, lower_node)A character vector containing edge names in the format "parent_child" for all edges in the path from upper_node to lower_node
The function:
Finds the shortest path between the two nodes
Identifies all edges along this path
Formats edge names as "parent_child"
Note: Assumes that the nodes are connected and upper_node is an ancestor of lower_node in the tree structure.
if (FALSE) { # \dontrun{
# For a tree with path A -> B -> C
edges <- get_edges_between_clones(tree, "A", "C")
# Returns: c("A_B", "B_C")
} # }