mutate {genealogy}R Documentation

Put mutations on trees.

Description

A function to mutate trees. Mutations can either be infinite sites or STRs (simple tandem repeats).

Usage

mutate1(tr, nSTR = 5, theta = 1, ninf = 0)

Arguments

tr An object of class tree
nSTR The numebr of STRs
theta The scaled STR mutation rate.
ninf The number of infinite sites

Value

Returns an object of class STRtree, inftree or STRinftree depending on the parameters passed to the function. This is a list of class tree with the additional list components

STR A matrix with nSTR columns
inf A matrix with ninf columns

Author(s)

Ian Wilson <I.Wilson@maths.abdn.ac.uk>

See Also

coal1

Examples

tr <- coal1(10)
plot(mutate(tr,nSTR=5))
plot(mutate(tr,ninf=5))

[Package genealogy version 0.01 Index]