Description Usage Arguments Details Value Examples
Simulates a host-symbiont system using a cophylogenetic birth-death process
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | sim_cophyBD_ana(
hbr,
hdr,
sbr,
sdr,
s_disp_r,
s_extp_r,
host_exp_rate,
cosp_rate,
time_to_sim,
numbsim,
host_limit = 0L,
hs_mode = FALSE
)
sim_cophylo_bdp_ana(
hbr,
hdr,
sbr,
sdr,
s_disp_r,
s_extp_r,
host_exp_rate,
cosp_rate,
time_to_sim,
numbsim,
host_limit = 0
)
|
hbr |
host tree birth rate |
hdr |
host tree death rate |
sbr |
symbiont tree birth rate |
sdr |
symbiont tree death rate |
s_disp_r |
symbiont dispersal rate to new hosts |
s_extp_r |
symbiont exirpation rate on h |
host_exp_rate |
host shift speciation rate |
cosp_rate |
cospeciation rate |
time_to_sim |
time units to simulate until |
numbsim |
number of replicates |
host_limit |
Maximum number of hosts for symbionts (0 implies no limit) |
hs_mode |
Boolean turning host expansion into host switching (explained above) (default = FALSE) |
Simulates a cophylogenetic system using birth-death processes with anagenetic processes allowing symbiont to gain or loss associations with hosts. The host tree is simulated following a constant rate birth-death process with an additional parameter - the cospeciation rate. This rate works as the speciation rate with the additional effect that if cospeciation occurs the symbiont tree also speciates. The symbiont tree is related to the host tree via an association matrix that describes which lineages are associated with which. The symbiont tree has an independent birth-death process with the addition of a host shift speciation rate that allows for the addition of more associated hosts upon symbiont speciation. The anagenetic processes are modeled using a poisson process occurring along the tree. The dispersal to hosts is at present random; there is no preferential host expansion.
Host expansions are similar to the more commonly found host switching. In this model, host-expansion speciation describes events where a symbiont speciates and at that time, both descendants retain the ancestral host associations. Randomly one of these descendant symbionts then randomly acquires a new host. When the option 'host_switch_mode = TRUE', the behavior of this changes to a more traditional host switching where one descendant retains the ancestral range and the other gains a novel host association.
A list containing the 'host_tree', the 'symbiont_tree', the association matrix in the present, with hosts as rows and smybionts as columns, and the history of events that have occurred.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | host_mu <- 0.5 # death rate
host_lambda <- 2.0 # birth rate
numb_replicates <- 10
time <- 1.0
symb_mu <- 0.2
symb_lambda <- 0.4
host_shift_rate <- 0.0
cosp_rate <- 2.0
cophylo_pair <- sim_cophyBD_ana(hbr = host_lambda,
hdr = host_mu,
cosp_rate = cosp_rate,
s_disp_r = 1,
s_extp_r = 0.4,
host_exp_rate = host_shift_rate,
sdr = symb_mu,
sbr = symb_lambda,
numbsim = numb_replicates,
time_to_sim = time)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.