Assuming that all mutations are of the same type (in SLIM simulation), different mutations at the same site are actually identical mutations from different lineages. This function re-codes these mutations so that they are only cataloged once.
combine_identicalmutations(mutmap, hapmat, mut_type)
data.frame. The SNV_map with identical mutations
sparseMatrix. The sparseMatrix of haplotypes
character. the name of the mutation type for which to re-code identical mutations
A list containing:
hapmat
A sparse matrix of haplotypes. See details.
mutmap
A data frame cataloging SNVs in hapmap
.