Learn R Programming

SimRVSequences (version 0.2.7)

combine_identicalmutations: Combine identical mutations

Description

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.

Usage

combine_identicalmutations(mutmap, hapmat, mut_type)

Arguments

mutmap

data.frame. The SNV_map with identical mutations

hapmat

sparseMatrix. The sparseMatrix of haplotypes

mut_type

character. the name of the mutation type for which to re-code identical mutations

Value

A list containing:

hapmat

A sparse matrix of haplotypes. See details.

mutmap

A data frame cataloging SNVs in hapmap.