R/sanity_check_functions.R
acquire_clone_mutations.RdGathers all mutations that occur along the evolutionary path from root to each clone in the phylogenetic tree. This includes mutations from all ancestral branches.
acquire_clone_mutations(mutation_table, tree)A list where:
Names are clone names (excluding root)
Values are data frames containing all mutations affecting each clone, including those inherited from ancestors
The function:
Identifies the root node and all other clones in the tree
For each clone:
Finds all edges in the path from root to clone
Collects mutations occurring on these edges
Returns mutations in their original table format
if (FALSE) { # \dontrun{
# For a tree with path Root -> A -> B
clone_muts <- acquire_clone_mutations(mutation_table, tree)
# clone_muts$B will contain mutations from both Root->A and A->B edges
} # }