raphylo {aphylo} | R Documentation |
Simulation of Annotated Phylogenetic Trees
Description
Simulation of Annotated Phylogenetic Trees
Usage
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,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 |
mu_d , mu_s |
Numeric vector of length 2. Gain/loss probabilities (see |
eta |
Numeric vector of length 2. Annotation bias probabilities (see |
Pi |
Numeric scalar. Root node probability of having the function (see |
informative , maxtries |
Passed to sim_fun_on_tree. |
R |
Integer, number of replicates |
... |
Further arguments passed to |
Details
The rmultiAphylo
function is a wrapper around raphylo
.
Value
An object of class aphylo
Examples
# A simple example ----------------------------------------------------------
set.seed(1231)
ans <- raphylo(n=500)