simChrom: simulates chromosome number data

Description Usage Arguments Details Value Author(s) Examples

Description

Provides a simulation of chromosome number evolution based on tree and one of 3 models. This function uses diversitrees sim.character to perform simulation.

Usage

1
simChrom(tree, pars, limits, model)

Arguments

tree

a phylogenetic tree of the class phylo

pars

numeric vector of paramters the length of this vector depends on the model specified see details below

limits

numeric vector of length 2 with upper and lower limit for chromosome number

model

A text string indicating the model for the simulation. Options are "2010", "ChromTrait", or "PloidEvol"

Details

The model chosen will determine the correct form of the numeric vector supplied to the pars argument.

If model="2010" the pars vector should be length 5:
chromosome gain
chromosome loss
demipolyploidy
polyploidy
chromosome number at the root of the tree.


If model="ChromPlus" then the numeric vector supplied to pars should be length 12:
chromosome gain in hyperstate 1
chromosome gain in hyperstate 2
chromosome loss in hyperstate 1
chromosome loss in hyperstate 2
demiploidy in hyperstate 1
demiploidy in hyperstate 2
polyploidy in hyperstate 1
polyploidy in hyperstate 2
transition from hyperstate 1 to 2
transition from hyperstate 2 to 1
chromosome number at the root of the tree
hyperstate at the root of the tree (1 or 2)


If model="PloidEvol" then the numeric vector supplied to pars should be length 11:
chromosome gain in diploids
chromosome gain in polyploids
chromosome loss in diploids
chromosome loss in polyploids
demiploidy in diploids
demiploidy in polyploids
polyploidy in diploids
polyploidy in polyploids
rediploidization
chromosome number at the root of the tree.
ploidy level at the root of the tree (0=diploid, 1=polyploid)

Value

a named numeric vector representing chromosome numbers at the tips of the tree is returned for model="2010". For model="chromRate" and model="ploidEvol" a list of length 2 is returned containing the a vector of chromosome numbers for tips of the tree as well as a vector containing the hyperstate or ploidy for each tip.

Author(s)

Heath Blackmon

Examples

1
2
3
4
5
6
7
8
9
simChrom(trees, pars=c(.2, .2, .2, .2, 10),
         limits = c(1, 100), model = "2010")         
         
simChrom(trees, pars=c(.2, .1, .1, .2, .1, .2, .4, .05, 1,  4, 0),
         limits = c(1, 20), model = "ploidEvol")
         
simChrom(trees, pars=c(.2, .4, .2, .4, .2, .4, .2, .4, 1,  1, 10, 1), 
         limits = c(1, 100), model = "ChromTrait")
         

coleoguy/chromevolR documentation built on June 10, 2019, 8:07 a.m.