sim.sp.tree: Simulation of phylogenetic networks under the coalescent

View source: R/network.sim.R

sim.sp.treeR Documentation

Simulation of phylogenetic networks under the coalescent

Description

Simulation of bifurcating and nonbifurcating species tree

Usage

sim.sp.tree(
  tree,
  Ne.prior,
  bifurcating = T,
  migration = F,
  admixture = F,
  mig,
  hib.clade,
  hib.priors,
  major.sister,
  minor.sister,
  bp,
  mi,
  nsims,
  nloci,
  gen.time,
  time.modif,
  time.scalar = 1
)

Arguments

tree

The bifurcating tree topology in newick format.

Ne.prior

A vector of two values representing the min and max boundaries of a uniform prior for Ne.

bifurcating

Logical. If TRUE the bifurcating topology is simulated.

migration

Logical. If TRUE gene flow between two branches is allowed. Migrarion prior need to be specified in the 'mig' argument. hib.clade, hib.priors, major.sister and minor.sister need to be specified.

admixture

Logical. If TRUE an admixture event between two branches is allowed. hib.clade, hib.priors, major.sister and minor.sister need to be specified.

mig

A vector of two values representing the min and max boundaries of a uniform prior for gene flow in number of migrant copies (4Nm).

hib.clade

a vector of numbers indicating the hybrid clade. Number associated with terminals can be checked with the get.tree.info function.

hib.priors

a vector of 5 numbers representing the lower, upper boundaries of the hybridization time; the upper boundary for the connection with the minor sister; lower and upper boundaries of the admixture proportion (between 0-1).

major.sister

vector of numbers indicating the the major sister clade. Number associated with terminals can be checked with the get.tree.info function.

minor.sister

vector of numbers indicating the minor sister clade. Number associated with terminals can be checked with the get.tree.info function.

bp

a vector of two numbers indicating the mean and SD of base pairs across all loci.

mi

a vector of two numbers indicating the min and max mutation rate across all loci.

nsims

Total number of simulations.

nloci

Number of loci to be simulated in each iteration.

gen.time

Generation time in years.

time.modif

A time modifier to alter the age of the nodes in the newick tree. This is a uniform prior for node heights and it is provided as a multiplyer. A vector of two numbers, min and max, need to be specified. For instace, if you like to simulate node heights that are min 1/2 the heights of the input tree and max 2x the heights of the input tree you should use: c(0.5,2)

time.scalar

multiplier to scale the three heights in the newick tree to years. For instance, if the node heights in the input tree are in Mya, the time.scalar should be 1000000. If time is in years, the time.scalar should be 1.


gehara/PipeMaster documentation built on April 19, 2024, 8:14 a.m.