Synthesizes founder genomes for each clone in a cell lineage tree by traversing the tree from root to leaves, incorporating appropriate mutations and structural variants at each step.

synth_sc_tree_founder_genomes(
  tree,
  root_genome,
  seg_list,
  mutation_info,
  cell_info
)

Arguments

tree

An igraph object representing the cell lineage tree with vertices as clone types

root_genome

List containing the genome sequences for the root clone

seg_list

List structure containing segment information for all clones

mutation_info

Data frame containing mutation details for all cells

cell_info

Data frame containing cell lineage information

Value

A list containing four elements:

  • all_node_genomes: List of genome sequences for each clone in the tree

  • child_node_founders_df: Data frame containing information about the founder cells for each clone

  • child_node_founder_mutations: List of all mutations in founder cells, organized by clone

  • child_node_founder_mutations_filtered: List of mutations that occurred between parent and child nodes

Details

The function builds genomes sequentially following the evolutionary relationships defined in the tree structure, ensuring that each clone's genome properly inherits all modifications from its ancestors plus its unique changes.

Examples

if (FALSE) { # \dontrun{
# Assuming you have a cell lineage tree and other required objects
founder_genomes <- synth_sc_tree_founder_genomes(
  tree = clone_tree,
  root_genome = reference_genome,
  seg_list = all_segments,
  mutation_info = mutations,
  cell_info = cell_lineage
)} # }