get_elapsed_time_tree: Gets elapsed time tree with optional mutational aquisition...

View source: R/sim_pop.R

get_elapsed_time_treeR Documentation

Gets elapsed time tree with optional mutational aquisition modelling. Uses the model burden ~ sum(pois(mutatrateperdiv))+pois(backgroundrate*duration) If mutrateperdivision is not provide the function returns the ultrametric elapsed time tree. Note: the tree that comes out of sim_pop has branch lengths=number of symmetric divisions (i.e. edge_length=ndivs)

Description

Gets elapsed time tree with optional mutational aquisition modelling. Uses the model burden ~ sum(pois(mutatrateperdiv))+pois(backgroundrate*duration) If mutrateperdivision is not provide the function returns the ultrametric elapsed time tree. Note: the tree that comes out of sim_pop has branch lengths=number of symmetric divisions (i.e. edge_length=ndivs)

Usage

get_elapsed_time_tree(
  tree,
  mutrateperdivision = NULL,
  backgroundrate = NULL,
  odf = 1
)

Arguments

tree

simpop phylo. output from sim_pop or get_subsampled_tree.

mutrateperdivision

numeric. Mutation rate per division

backgroundrate

numeric. Negative Binomial or Poisson Distributed Mutation count

odf

numeric. Overdispersion factor.

Value

simpop/phylo - with branch lengths defined as above (sometimes stochastic)


NickWilliamsSanger/rsimpop documentation built on Sept. 6, 2024, 12:42 a.m.