sim.dna | R Documentation |
Simulate DNA sequences from a tree using substitution model
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))
nodematrix |
the tree node matrix |
seqlength |
sequence length |
model |
1 JC, 2 H2P, 3 HKY, 4 GTR |
kappa |
the transition/transversion ratio |
rate |
the six rates used in GTR model |
frequency |
frequencies of four types of nucleotides |
The function returns DNA sequences simulated from the gene tree nodematrix
. The sequences are coded as 1:A, 2:C, 3:G, 4:T.
Liang Liu lliu@uga.edu
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.
sim.coaltree
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.