Organizes recurrent mutations by grouping them according to their genomic location (haplotype, chromosome, and position).

group_recurrent_mutations(recurrent_mutations)

Arguments

recurrent_mutations

Data frame containing mutation information with columns: clone, cell_index, haplotype, chrom, pos, time

Value

A list where each element is a data frame containing all mutations that occurred at the same genomic location. List names are constructed as "haplotype_chromosome_position".

Details

This function takes a data frame of recurrent mutations and organizes them into groups based on their genomic coordinates. It:

  1. Creates a unique key for each mutation combining haplotype, chromosome, and position

  2. Splits the data frame into a list of smaller data frames, each containing all mutations that occurred at the same genomic location

This grouping is useful for analyzing patterns of mutations at specific sites and for further processing of recurrent mutations in evolutionary analyses.