Skip to contents

Joins trees (usually the bacterial and archaeal GTDB trees) as sister clades under a new root. Each tree's root is attached to the new root by an edge of length root_edge. GTDB infers the two domains' trees separately, so the distance between them is not estimated: root_edge only sets how far apart the domains are drawn, and affects gtdb_tree_vcv() only in that taxa in different domains share no branch length.

Usage

gtdb_tree_combine(..., root_edge = 1)

Arguments

...

Trees ("phylo" objects), e.g. from gtdb_tree_read().

root_edge

Length of the edge from the new root to each tree's root.

Value

One tree.

Examples

files <- gtdb_example("tree")
bacteria <- gtdb_tree_read(files[1])
archaea <- gtdb_tree_read(files[2])
gtdb_tree_combine(bacteria, archaea)
#> 
#> Phylogenetic tree with 560 tips and 560 internal nodes.
#> 
#> Tip labels:
#>   GCF_037023725.1, GCF_900105835.1, GCF_001042985.1, GCF_001457615.1, GCF_001598695.1, GCF_002925905.1, ...
#> Node labels:
#>   , 7:d__Bacteria, 1, 0, 100:p__Pseudomonadota, 97:c__Gammaproteobacteria, ...
#> 
#> Rooted; includes branch length(s).