R/genome_relevant_functions.R
synth_sc_founder_genome.RdIncorporates structural variants (deletions, duplications) into a genome during the transition from parent to child clone in a cell lineage tree.
synth_sc_founder_genome(child_node, parent_node, pre_child_genome, seg_list)A list containing the modified genome with structural variants incorporated
This function applies structural variants to a genome during clone evolution by:
Starting with a genome that already has SNVs incorporated (pre_child_genome)
Identifying segments that are associated with the specific transition edge between parent and child clones
Processing each relevant segment based on its copy number change (CN_change):
For deletions (CN_change = -1): Replaces the original sequence with "N" characters
For duplications (CN_change >= 1): Copies the sequence and adds it to the end of the chromosome
The function works on each haplotype (maternal/paternal) separately and modifies only chromosomes that have structural variant events associated with the specific parent-to-child clone transition.
This function is typically called after SNVs have been incorporated into the genome but before cell-specific mutations are added, representing the genetic changes that define a new clone's emergence.