raphylo function

Simulation of Annotated Phylogenetic Trees

Simulation of Annotated Phylogenetic Trees

raphylo( n = NULL, tree = NULL, edge.length = NULL, tip.type = NULL, node.type = function(n) sample.int(2, size = n, replace = TRUE, prob = c(0.2, 0.8)) - 1, P = 1L, psi = c(0.05, 0.05), mu_d = c(0.9, 0.5), mu_s = c(0.05, 0.02), eta = c(1, 1), Pi = 0.2, informative = getOption("aphylo_informative", FALSE), maxtries = 20L ) rmultiAphylo(R, ...)

Arguments

  • n: Integer scalar. Number of leafs. If not specified, then
  • tree: An object of class phylo .
  • edge.length: Passed to sim_tree .
  • tip.type, node.type: Integer vectors with values 0 or 1. 0 denotes duplication node and 1 speciation node. This is used in LogLike .
  • P: Integer scalar. Number of functions to generate.
  • psi: Numeric vector of length 2. Misclasification probabilities. (see LogLike).
  • mu_d, mu_s: Numeric vector of length 2. Gain/loss probabilities (see LogLike).
  • eta: Numeric vector of length 2. Annotation bias probabilities (see LogLike).
  • Pi: Numeric scalar. Root node probability of having the function (see LogLike).
  • informative, maxtries: Passed to sim_fun_on_tree .
  • R: Integer, number of replicates
  • ...: Further arguments passed to raphylo

Returns

An object of class aphylo

Details

The rmultiAphylo function is a wrapper around raphylo.

Examples

# A simple example ---------------------------------------------------------- set.seed(1231) ans <- raphylo(n=500)
  • Maintainer: George Vega Yon
  • License: MIT + file LICENSE
  • Last published: 2024-12-03