Generating Random DNA Samples Using Embedded Markov Chain
Generating Random DNA Samples Using Embedded Markov Chain
This function generates random DNA samples using embedded chain.
simemb(theta, seqLength, merge2)
Arguments
theta: a vector of variables containing the following parameters in this order--1. the first three parameters from πX vector, 2. the first three parameters from πY vector, 3. the first three parameters from f0 vector, 4. the six off-diagonal free parameters in the S matrix, 5. a scalar ρ, 6. a vector of lengths containing K-2 values
seqLength: the length of sequences we need to generate
merge2: (K-1) x 2 matrix describing the tree topology
Details
This function generates 4K DNA array using embedded Markov chain. It depends on a set of variables theta, the sequence length and a merge matrix describing the tree topology.
Returns
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, gn3sim, gn, gn2, Fmatrix
Examples
# This will give 4^5 observed divergence arraytheta<-(c(rep(.25,3), rep(.25,3), rep(.25,3), c(.2,.35,.79,.01,.93,.47),3,.1,.5,.8))n<-1000merge2<-matrix(c(-1,-4,-3,2,-2,-5,1,3),4,2)sm<-simemb(theta, n, merge2)sm