simemb {DNAseqtest} | R Documentation |
Generating Random DNA Samples Using Embedded Markov Chain
Description
This function generates random DNA samples using embedded chain.
Usage
simemb(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 4^K
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.
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, gn3sim, 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)
sm<-simemb(theta, n, merge2)
sm