This function inserts single nucleotide variants (SNVs) into a genome at specified positions. It groups mutations by haplotype and chromosome for efficient processing and modifies the genome sequence accordingly.
insert_mutations(genome, mutations)The modified genome list with mutations incorporated
The function is designed to be efficient when processing large numbers of mutations by minimizing the number of times each sequence needs to be modified.