R/snv_relevant_functions.R
group_recurrent_mutations.RdOrganizes recurrent mutations by grouping them according to their genomic location (haplotype, chromosome, and position).
group_recurrent_mutations(recurrent_mutations)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".
This function takes a data frame of recurrent mutations and organizes them into groups based on their genomic coordinates. It:
Creates a unique key for each mutation combining haplotype, chromosome, and position
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.