mstree: simulate coalescent genealogies given a species tree using...

Description Usage Arguments Details Value Author(s) Examples

Description

takes a species tree of object 'phylo' with a vector giving branch effective population sizes and simulates a coalescent genealogy. this is used internally, but may be useful for some people so it is documented here.

Usage

1
mstree(phy, msdir, nseq, nreps, samplescheme, ploidy = 1)

Arguments

phy

an ultrametric phylo object with a vector named "dmv" appended giving the effective population sizes. Species tree branch lengths are effectively divided by 2*dmv to put the branch lengths in coalescent units. dmv should therefore be 2Neu (theta/2) if species tree branch lengths are in units of substitutions per site, or 2Ne if branch lengths are in generations.

msdir

the directory containing Hudson's ms.

nseq

the number of alleles to simulate

nreps

the number of trees to simulate

samplescheme

a data frame with 2 columns and nseq rows. the first column contains the tip labels of the species tree and the second contains the number of alleles to be sampled from the corresponding population.

ploidy

a multiplier for the 'dmv' vector. if ploidy is specified, then dmv=dmv*ploidy. do not specify it unless you wish the dmv vector to be scaled by ploidy.

Details

simulates coalescent genealogies from species trees. effective population sizes on each branch must be specified in a 'dmv' vector appended to the 'phylo' object.

Value

returns a phylo or multiphylo object with branch lengths on the same scale as the species tree.

Author(s)

Noah Reid

Examples

1
2
3
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

fmichonneau/starbeastPPS documentation built on May 16, 2019, 1:47 p.m.