A function to report the smallest tip-to-tip distances in a phylogenetic tree
Source:R/min_brlen.R
min_brlen.Rd
min_brlen()
returns a table of smallest tip-to-tip distances in a phylogenetic tree.
Arguments
- tree
A path to tree file in Newick format, or a phylogenetic tree object of class phylo.
- n
Number of distances to report (default = 5).
- verbose
Logical of whether to print the result to screen (default = TRUE).
Value
an object of class tbl_df
Details
min_brlen()
tabulates the smallest tip-to-tip distances in a phylogenetic tree
using cophenetic.phylo and prints a table to screen.
This is useful when excluding identical or near-identical haplotypes
using the '–minbr' parameter in mPTP.
Examples
# estimate minimum branch length from raxml tree
min_brlen(ape::as.phylo(geophagus_raxml), n = 5)
#>
#>
#> ℹ Printing 5 smallest tip-to-tip distances in a tree with 137 tips ...
#>
#>
#> |dist | n|
#> |:--------|--:|
#> |0.000002 | 12|
#> |0.000003 | 2|
#> |0.000004 | 6|
#> |0.000005 | 2|
#> |0.001561 | 2|