mutation {Ease}R Documentation

Definition of a mutation

Description

Utility function to easily generate a mutation matrix (see setMutationMatrix).

Usage

mutation(from, to, rate)

Arguments

from

name of the original allele

to

name of the mutant allele

rate

rate at which the mutation occurs

Details

Mutation occurs from one allele to another at a specific rate. Please take care to define alleles as traits, that these alleles are present in the genome you are using and that the alleles are associated with the same locus.

Value

A standardised list of input parameters that will be used by the function setMutationMatrix to generate the mutation matrix.

Examples

### Example with two loci, each with two alleles ###

# Definition of the genome
DL <- list(dl = c("A", "a"))
HL <- list(hl = c("B", "b"))
genomeObj <- setGenome(listHapLoci = HL, listDipLoci = DL)

# The mutation function allows each transition from one allele to
# another to be defined individually, to produce the mutation matrix
# as follows:
mutMatrixObj <- setMutationMatrix(genomeObj,
  mutations = list(
    mutation(from = "A", to = "a", rate = 0.1),
    mutation(from = "B", to = "b", rate = 0.1)
  )
)


[Package Ease version 0.1.2 Index]