genetree_summary_stat: Calculate summary statistics for gene trees

Description Usage Arguments Value Examples

View source: R/calculate_genetree_summary_stat.R

Description

Calculates summary statistics including Colless' statistic, gamma statistic of the locus tree input as an index as part of a list, gamma statistic of gene tree, sackin statistic, cherry statistic, and time to most recent common ancestor

Usage

1
2
3
genetree_summary_stat(lt_obj, lt_indx)

summarize_gt(lt_obj, lt_indx)

Arguments

lt_obj

Locus tree object obtain from 'sim_lt_gt_mlc'

lt_indx

Index of locus tree object of interest

Value

Dataframe with summary statistics for each gene tree

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# first simulate a species tree
mu <- 0.5
lambda <- 1.0
nt <- 6
tr <- sim_stBD(sbr = lambda, sdr = mu, numbsim = 1, n_tips = nt)
# for a locus tree with 100 genes sampled per locus tree
gentrees <- sim_msc(tr[[1]],
                    ne = 10000,
                    num_sampled_individuals = 1,
                    num_genes = 100)

gt_df <- summarize_gt(gentrees, lt_indx = 1)

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