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

Arguments

child_node

Character string specifying the name of the child clone

parent_node

Character string specifying the name of the parent clone

pre_child_genome

List containing the genome sequences after SNVs have been incorporated

seg_list

List structure containing segment information for all clones

Value

A list containing the modified genome with structural variants incorporated

Details

This function applies structural variants to a genome during clone evolution by:

  1. Starting with a genome that already has SNVs incorporated (pre_child_genome)

  2. Identifying segments that are associated with the specific transition edge between parent and child clones

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