calculate_expected_leaves_locustree: Calculate expected leaves of a locus tree

Description Usage Arguments Details Value References Examples

View source: R/estimate_node_heights.R

Description

Calculate expected leaves of a locus tree

Usage

1
2
3
calculate_expected_leaves_locustree(t, dup_rate, loss_rate, num_species)

ave_tips_lt(t, dup_rate, loss_rate, num_species)

Arguments

t

time to simulate until (the length of the species tree)

dup_rate

gene birth rate

loss_rate

gene death rate

num_species

number of leaves on the species tree

Details

Calculates the expected number of leaves for a birth-death simulation given a gene birth and death rate, a time, and the number of leaves on the species tree that the locus tree is to be simulated upon.

Value

The expected number of leaves

References

Mallo, D., de Oliveira Martins, L., & Posada, D. (2016). SimPhy: phylogenomic simulation of gene, locus, and species trees. Systematic biology, 65(2), 334-344.

Examples

1
2
3
4
5
6
7
8
gene_birth_rate <- 1.0
gene_death_rate <- 0.5
time <- 2
num_species <- 10
ave_tips_lt(time,
                                    gene_birth_rate,
                                    gene_death_rate,
                                    num_species)

treeducken documentation built on March 3, 2021, 1:11 a.m.