Gathers 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)

Arguments

mutation_table

A data frame containing mutation information with columns:

  • edge_name - Tree edge identifier in format "parent_child"

  • other mutation-specific columns

tree

An igraph object representing the phylogenetic tree structure

Value

A list where:

  • Names are clone names (excluding root)

  • Values are data frames containing all mutations affecting each clone, including those inherited from ancestors

Details

The function:

  1. Identifies the root node and all other clones in the tree

  2. 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

Examples

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
} # }