gn3sim {DNAseqtest} | R Documentation |
Generating Random DNA Samples Using the Rambaut and Grassly Method
Description
This function generates random DNA samples using Rambaut and Grassly method.
Usage
gn3sim(theta, seqLength, merge2)
Arguments
theta |
a vector of variables containing the following parameters in this order–1. the first three parameters from |
seqLength |
the length of sequences we need to generate |
merge2 |
(K-1) x 2 matrix describing the tree topology |
Details
This function generates a 4^K
DNA array using Rambaut and Grassly,
(1997) method. It depends on a set of variables theta, the sequence
length and a merge matrix describing the tree topology.
Value
A n x K observed divergence matrix
References
Faisal Ababneh, Lars S Jermiin, Chunsheng Ma, John Robinson (2006). Matched-pairs tests of homogeneity with applications to homologous nucleotide sequences. Bioinformatics, 22(10), 1225-1231.
See Also
Ntml, simapp, simemb, gn, gn2, Fmatrix
Examples
# This will give 4^5 observed divergence array
theta<-(c(rep(.25,3), rep(.25,3), rep(.25,3), c(.2,.35,.79,.01,.93,.47),
3,.1,.5,.8))
n<-1000
merge2<-matrix(c(-1,-4,-3,2,-2,-5,1,3), 4, 2)
gn3<-gn3sim(theta, n, merge2)
gn3