sim.dna {phybase}R Documentation

Simulate DNA sequences from substitution models

Description

Simulate DNA sequences from a tree using substitution model

Usage

sim.dna(nodematrix, seqlength, model, kappa=2, rate=c(1,1,1,1,1,1), frequency=c(1/4,1/4,1/4,1/4))

Arguments

nodematrix the tree node matrix
seqlength sequence length
model 1 JC, 2 H2P, 3 HKP, 4 GTR
kappa the transition/transversion ratio
rate the six rates used in GTR model
frequency frequencies of four types of nucleotides

Details

~~ If necessary, more details than the description above ~~

Value

The function returns DNA sequences simulated from the gene tree nodematrix. The sequences are coded as 1:A, 2:C, 3:G, 4:T.

Author(s)

Liang Liu lliu@oeb.harvard.edu

References

Jukes, TH and Cantor, CR. 1969. Evolution of protein molecules. Pp. 21-123 in H. N. Munro, ed. Mammalian protein metabolism. Academic Press, New York.

See Also

sim.coaltree

Examples

tree<-"(((H:0.00402,C:0.00402):0.00304,G:0.00707):0.00929,O:0.01635);"
nodematrix<-read.tree.nodes(tree)$nodes
sim.dna(nodematrix,100, model=2, kappa=4)

[Package phybase version 1.1 Index]