gn3sim: Generating Random DNA Samples Using the Rambaut and Grassly...

Description Usage Arguments Details Value References See Also Examples

Description

This function generates random DNA samples using Rambaut and Grassly method.

Usage

1
gn3sim(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 f_0 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 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

1
2
3
4
5
6
7
# 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

DNAseqtest documentation built on May 1, 2019, 9:51 p.m.