simHGT: Simulates brownian motion with HGT between random clades via...

View source: R/simHGT.R

simHGTR Documentation

Simulates brownian motion with HGT between random clades via poisson pt process

Description

Simulates brownian motion with HGT between random clades via poisson pt process

Usage

simHGT(tree, rate, a = 0, mu = 0, sig2 = 1)

Arguments

tree

phylo class object

rate

positive real number indicating rate of horizontal gene transfer per unit edge-length in tree

a

real number ancestral state

mu

drift

sig2

volatility

Examples

library(phylofactor)
library(ape)

set.seed(5)
tree <- rtree(10)
sim <- simHGT(tree,0.3,sig2=3)
par(mfrow=c(2,1))
plot(tree)
HGTplot(sim,lwd=2,main='HGT Dynamics')

reptalex/phylofactor documentation built on Feb. 28, 2024, 3:19 p.m.