sim.coaltree.sp.mu: Simulate a gene tree from the non-clock species tree model

sim.coaltree.sp.muR Documentation

Simulate a gene tree from the non-clock species tree model

Description

The function generates a random gene tree from the species tree under the non-clock species tree model.

Usage

sim.coaltree.sp.mu(sptree, spname, seq, numgenetree,method="dirichlet",alpha=5.0)

Arguments

sptree

species tree

spname

species names

seq

the species-sequences struction, i.e., which sequence belongs to which species

numgenetree

the number of gene trees to be generated

alpha

the parameter in the gamma distribution. see also mutation_exp

method

either gamma or dirichlet

Value

gt

the simulated gene tree

st

the node matrix of the species tree

seqname

the names of sequences

Author(s)

Liang Liu

Examples

sptree<-"(((A:0.5,B:0.5):1#0.1,C:1.5):1#0.1,D:2.5)#0.1;"
spname<-c("A","B","C","D")
seq<-c(1,1,1,1) #each species has only one sequence.
sim.coaltree.sp.mu(sptree, spname, seq, numgenetree=1,method="dirichlet",alpha=5.0)


lliu1871/phybase documentation built on April 21, 2024, 3:16 a.m.